metadata
license: apache-2.0
task_categories:
- text-classification
- text-generation
language:
- en
tags:
- legal
- legal-reasoning
- multiple-choice
- regression
pretty_name: LegalBench Processed by DatologyAI
size_categories:
- 1K<n<10K
configs:
- config_name: canada_tax_court_outcomes
data_files:
- split: train
path: canada_tax_court_outcomes/train-*
- split: test
path: canada_tax_court_outcomes/test-*
- config_name: citation_prediction_classification
data_files:
- split: train
path: citation_prediction_classification/train-*
- split: test
path: citation_prediction_classification/test-*
- config_name: diversity_3
data_files:
- split: train
path: diversity_3/train-*
- split: test
path: diversity_3/test-*
- config_name: diversity_5
data_files:
- split: train
path: diversity_5/train-*
- split: test
path: diversity_5/test-*
- config_name: diversity_6
data_files:
- split: train
path: diversity_6/train-*
- split: test
path: diversity_6/test-*
- config_name: jcrew_blocker
data_files:
- split: train
path: jcrew_blocker/train-*
- split: test
path: jcrew_blocker/test-*
- config_name: learned_hands_benefits
data_files:
- split: train
path: learned_hands_benefits/train-*
- split: test
path: learned_hands_benefits/test-*
- config_name: maud_ability_to_consummate_concept_is_subject_to_mae_carveouts
data_files:
- split: train
path: maud_ability_to_consummate_concept_is_subject_to_mae_carveouts/train-*
- split: test
path: maud_ability_to_consummate_concept_is_subject_to_mae_carveouts/test-*
- config_name: maud_additional_matching_rights_period_for_modifications_cor
data_files:
- split: train
path: maud_additional_matching_rights_period_for_modifications_cor/train-*
- split: test
path: maud_additional_matching_rights_period_for_modifications_cor/test-*
- config_name: maud_change_in_law_subject_to_disproportionate_impact_modifier
data_files:
- split: train
path: maud_change_in_law_subject_to_disproportionate_impact_modifier/train-*
- split: test
path: maud_change_in_law_subject_to_disproportionate_impact_modifier/test-*
- config_name: >-
maud_changes_in_gaap_or_other_accounting_principles_subject_to_disproportionate_impact_modifier
data_files:
- split: train
path: >-
maud_changes_in_gaap_or_other_accounting_principles_subject_to_disproportionate_impact_modifier/train-*
- split: test
path: >-
maud_changes_in_gaap_or_other_accounting_principles_subject_to_disproportionate_impact_modifier/test-*
- config_name: maud_cor_permitted_in_response_to_intervening_event
data_files:
- split: train
path: maud_cor_permitted_in_response_to_intervening_event/train-*
- split: test
path: maud_cor_permitted_in_response_to_intervening_event/test-*
- config_name: maud_fls_mae_standard
data_files:
- split: train
path: maud_fls_mae_standard/train-*
- split: test
path: maud_fls_mae_standard/test-*
- config_name: maud_includes_consistent_with_past_practice
data_files:
- split: train
path: maud_includes_consistent_with_past_practice/train-*
- split: test
path: maud_includes_consistent_with_past_practice/test-*
- config_name: maud_initial_matching_rights_period_cor
data_files:
- split: train
path: maud_initial_matching_rights_period_cor/train-*
- split: test
path: maud_initial_matching_rights_period_cor/test-*
- config_name: maud_ordinary_course_efforts_standard
data_files:
- split: train
path: maud_ordinary_course_efforts_standard/train-*
- split: test
path: maud_ordinary_course_efforts_standard/test-*
- config_name: >-
maud_pandemic_or_other_public_health_event_specific_reference_to_pandemic_related_governmental_responses_or_measures
data_files:
- split: train
path: >-
maud_pandemic_or_other_public_health_event_specific_reference_to_pandemic_related_governmental_responses_or_measures/train-*
- split: test
path: >-
maud_pandemic_or_other_public_health_event_specific_reference_to_pandemic_related_governmental_responses_or_measures/test-*
- config_name: >-
maud_pandemic_or_other_public_health_event_subject_to_disproportionate_impact_modifier
data_files:
- split: train
path: >-
maud_pandemic_or_other_public_health_event_subject_to_disproportionate_impact_modifier/train-*
- split: test
path: >-
maud_pandemic_or_other_public_health_event_subject_to_disproportionate_impact_modifier/test-*
- config_name: maud_type_of_consideration
data_files:
- split: train
path: maud_type_of_consideration/train-*
- split: test
path: maud_type_of_consideration/test-*
- config_name: personal_jurisdiction
data_files:
- split: train
path: personal_jurisdiction/train-*
- split: test
path: personal_jurisdiction/test-*
- config_name: sara_entailment
data_files:
- split: train
path: sara_entailment/train-*
- split: test
path: sara_entailment/test-*
- config_name: sara_numeric
data_files:
- split: train
path: sara_numeric/train-*
- split: test
path: sara_numeric/test-*
- config_name: supply_chain_disclosure_best_practice_accountability
data_files:
- split: train
path: supply_chain_disclosure_best_practice_accountability/train-*
- split: test
path: supply_chain_disclosure_best_practice_accountability/test-*
- config_name: supply_chain_disclosure_best_practice_certification
data_files:
- split: train
path: supply_chain_disclosure_best_practice_certification/train-*
- split: test
path: supply_chain_disclosure_best_practice_certification/test-*
- config_name: supply_chain_disclosure_best_practice_training
data_files:
- split: train
path: supply_chain_disclosure_best_practice_training/train-*
- split: test
path: supply_chain_disclosure_best_practice_training/test-*
- config_name: telemarketing_sales_rule
data_files:
- split: train
path: telemarketing_sales_rule/train-*
- split: test
path: telemarketing_sales_rule/test-*
dataset_info:
- config_name: canada_tax_court_outcomes
features:
- name: answer
dtype: string
- name: index
dtype: string
- name: text
dtype: string
- name: input
dtype: string
splits:
- name: train
num_bytes: 7864
num_examples: 6
- name: test
num_bytes: 392042
num_examples: 244
download_size: 161532
dataset_size: 399906
- config_name: citation_prediction_classification
features:
- name: answer
dtype: string
- name: citation
dtype: string
- name: index
dtype: string
- name: text
dtype: string
- name: input
dtype: string
splits:
- name: train
num_bytes: 1471
num_examples: 2
- name: test
num_bytes: 60272
num_examples: 108
download_size: 30302
dataset_size: 61743
- config_name: diversity_3
features:
- name: aic_is_met
dtype: string
- name: answer
dtype: string
- name: index
dtype: string
- name: parties_are_diverse
dtype: string
- name: text
dtype: string
- name: input
dtype: string
splits:
- name: train
num_bytes: 3040
num_examples: 6
- name: test
num_bytes: 153782
num_examples: 300
download_size: 38926
dataset_size: 156822
- config_name: diversity_5
features:
- name: aic_is_met
dtype: string
- name: answer
dtype: string
- name: index
dtype: string
- name: parties_are_diverse
dtype: string
- name: text
dtype: string
- name: input
dtype: string
splits:
- name: train
num_bytes: 3520
num_examples: 6
- name: test
num_bytes: 177382
num_examples: 300
download_size: 45990
dataset_size: 180902
- config_name: diversity_6
features:
- name: aic_is_met
dtype: string
- name: answer
dtype: string
- name: index
dtype: string
- name: parties_are_diverse
dtype: string
- name: text
dtype: string
- name: input
dtype: string
splits:
- name: train
num_bytes: 5087
num_examples: 6
- name: test
num_bytes: 253115
num_examples: 300
download_size: 66869
dataset_size: 258202
- config_name: jcrew_blocker
features:
- name: answer
dtype: string
- name: index
dtype: string
- name: text
dtype: string
- name: input
dtype: string
splits:
- name: train
num_bytes: 16657
num_examples: 6
- name: test
num_bytes: 137273
num_examples: 54
download_size: 79424
dataset_size: 153930
- config_name: learned_hands_benefits
features:
- name: answer
dtype: string
- name: index
dtype: string
- name: text
dtype: string
- name: input
dtype: string
splits:
- name: train
num_bytes: 17791
num_examples: 6
- name: test
num_bytes: 188795
num_examples: 66
download_size: 134816
dataset_size: 206586
- config_name: maud_ability_to_consummate_concept_is_subject_to_mae_carveouts
features:
- name: answer
dtype: string
- name: index
dtype: string
- name: text
dtype: string
- name: input
dtype: string
splits:
- name: train
num_bytes: 10943
num_examples: 1
- name: test
num_bytes: 628674
num_examples: 69
download_size: 226362
dataset_size: 639617
- config_name: maud_additional_matching_rights_period_for_modifications_cor
features:
- name: answer
dtype: string
- name: index
dtype: string
- name: text
dtype: string
- name: input
dtype: string
splits:
- name: train
num_bytes: 4807
num_examples: 1
- name: test
num_bytes: 698844
num_examples: 158
download_size: 242597
dataset_size: 703651
- config_name: maud_change_in_law_subject_to_disproportionate_impact_modifier
features:
- name: answer
dtype: string
- name: index
dtype: string
- name: text
dtype: string
- name: input
dtype: string
splits:
- name: train
num_bytes: 12303
num_examples: 1
- name: test
num_bytes: 927240
num_examples: 99
download_size: 323047
dataset_size: 939543
- config_name: >-
maud_changes_in_gaap_or_other_accounting_principles_subject_to_disproportionate_impact_modifier
features:
- name: answer
dtype: string
- name: index
dtype: string
- name: text
dtype: string
- name: input
dtype: string
splits:
- name: train
num_bytes: 12331
num_examples: 1
- name: test
num_bytes: 921626
num_examples: 98
download_size: 314921
dataset_size: 933957
- config_name: maud_cor_permitted_in_response_to_intervening_event
features:
- name: answer
dtype: string
- name: index
dtype: string
- name: text
dtype: string
- name: input
dtype: string
splits:
- name: train
num_bytes: 5545
num_examples: 1
- name: test
num_bytes: 419104
num_examples: 100
download_size: 149850
dataset_size: 424649
- config_name: maud_fls_mae_standard
features:
- name: answer
dtype: string
- name: index
dtype: string
- name: text
dtype: string
- name: input
dtype: string
splits:
- name: train
num_bytes: 9773
num_examples: 1
- name: test
num_bytes: 733140
num_examples: 77
download_size: 237744
dataset_size: 742913
- config_name: maud_includes_consistent_with_past_practice
features:
- name: answer
dtype: string
- name: index
dtype: string
- name: text
dtype: string
- name: input
dtype: string
splits:
- name: train
num_bytes: 2551
num_examples: 1
- name: test
num_bytes: 333827
num_examples: 181
download_size: 108295
dataset_size: 336378
- config_name: maud_initial_matching_rights_period_cor
features:
- name: answer
dtype: string
- name: index
dtype: string
- name: text
dtype: string
- name: input
dtype: string
splits:
- name: train
num_bytes: 6559
num_examples: 1
- name: test
num_bytes: 698682
num_examples: 158
download_size: 249943
dataset_size: 705241
- config_name: maud_ordinary_course_efforts_standard
features:
- name: answer
dtype: string
- name: index
dtype: string
- name: text
dtype: string
- name: input
dtype: string
splits:
- name: train
num_bytes: 2407
num_examples: 1
- name: test
num_bytes: 340523
num_examples: 181
download_size: 111087
dataset_size: 342930
- config_name: >-
maud_pandemic_or_other_public_health_event_specific_reference_to_pandemic_related_governmental_responses_or_measures
features:
- name: answer
dtype: string
- name: index
dtype: string
- name: text
dtype: string
- name: input
dtype: string
splits:
- name: train
num_bytes: 7851
num_examples: 1
- name: test
num_bytes: 932728
num_examples: 98
download_size: 331916
dataset_size: 940579
- config_name: >-
maud_pandemic_or_other_public_health_event_subject_to_disproportionate_impact_modifier
features:
- name: answer
dtype: string
- name: index
dtype: string
- name: text
dtype: string
- name: input
dtype: string
splits:
- name: train
num_bytes: 7790
num_examples: 1
- name: test
num_bytes: 926750
num_examples: 98
download_size: 344444
dataset_size: 934540
- config_name: maud_type_of_consideration
features:
- name: answer
dtype: string
- name: index
dtype: string
- name: text
dtype: string
- name: input
dtype: string
splits:
- name: train
num_bytes: 859
num_examples: 1
- name: test
num_bytes: 337302
num_examples: 172
download_size: 100428
dataset_size: 338161
- config_name: personal_jurisdiction
features:
- name: answer
dtype: string
- name: index
dtype: string
- name: slice
dtype: string
- name: text
dtype: string
- name: input
dtype: string
splits:
- name: train
num_bytes: 4587
num_examples: 4
- name: test
num_bytes: 57966
num_examples: 50
download_size: 25202
dataset_size: 62553
- config_name: sara_entailment
features:
- name: answer
dtype: string
- name: case id
dtype: string
- name: description
dtype: string
- name: index
dtype: string
- name: question
dtype: string
- name: statute
dtype: string
- name: text
dtype: string
- name: input
dtype: string
splits:
- name: train
num_bytes: 4156
num_examples: 4
- name: test
num_bytes: 362718
num_examples: 272
download_size: 118893
dataset_size: 366874
- config_name: sara_numeric
features:
- name: answer
dtype: string
- name: case id
dtype: string
- name: description
dtype: string
- name: index
dtype: string
- name: question
dtype: string
- name: statute
dtype: string
- name: text
dtype: string
- name: input
dtype: string
splits:
- name: train
num_bytes: 357847
num_examples: 4
- name: test
num_bytes: 8595263
num_examples: 96
download_size: 1133960
dataset_size: 8953110
- config_name: supply_chain_disclosure_best_practice_accountability
features:
- name: answer
dtype: string
- name: index
dtype: string
- name: text
dtype: string
- name: input
dtype: string
splits:
- name: train
num_bytes: 41722
num_examples: 8
- name: test
num_bytes: 2870825
num_examples: 379
download_size: 1320868
dataset_size: 2912547
- config_name: supply_chain_disclosure_best_practice_certification
features:
- name: answer
dtype: string
- name: index
dtype: string
- name: text
dtype: string
- name: input
dtype: string
splits:
- name: train
num_bytes: 46104
num_examples: 8
- name: test
num_bytes: 2770224
num_examples: 378
download_size: 1303303
dataset_size: 2816328
- config_name: supply_chain_disclosure_best_practice_training
features:
- name: answer
dtype: string
- name: index
dtype: string
- name: text
dtype: string
- name: input
dtype: string
splits:
- name: train
num_bytes: 52370
num_examples: 8
- name: test
num_bytes: 2883341
num_examples: 379
download_size: 1325423
dataset_size: 2935711
- config_name: telemarketing_sales_rule
features:
- name: answer
dtype: string
- name: index
dtype: string
- name: text
dtype: string
- name: input
dtype: string
splits:
- name: train
num_bytes: 2886
num_examples: 4
- name: test
num_bytes: 39244
num_examples: 47
download_size: 19388
dataset_size: 42130
DatologyAI/legalbench
Overview
This dataset contains 26 legal reasoning tasks from LegalBench, processed for easy use in language model evaluation. Each task preserves its original data and includes an additional input
column with a formatted prompt, generated using the LegalBench registry, ready to be fed directly into language models.
Task Categories
- Basic Legal:
canada_tax_court_outcomes
,jcrew_blocker
,learned_hands_benefits
,telemarketing_sales_rule
- Citation:
citation_prediction_classification
- Diversity Analysis:
diversity_3
,diversity_5
,diversity_6
- Jurisdiction:
personal_jurisdiction
- SARA Analysis:
sara_entailment
,sara_numeric
- Supply Chain Disclosure:
supply_chain_disclosure_best_practice_accountability
,supply_chain_disclosure_best_practice_certification
,supply_chain_disclosure_best_practice_training
- MAUD Contract Analysis:
maud_ability_to_consummate_concept_is_subject_to_mae_carveouts
,maud_additional_matching_rights_period_for_modifications_cor
,maud_change_in_law_subject_to_disproportionate_impact_modifier
,maud_changes_in_gaap_or_other_accounting_principles_subject_to_disproportionate_impact_modifier
,maud_cor_permitted_in_response_to_intervening_event
,maud_fls_mae_standard
,maud_includes_consistent_with_past_practice
,maud_initial_matching_rights_period_cor
,maud_ordinary_course_efforts_standard
,maud_pandemic_or_other_public_health_event_subject_to_disproportionate_impact_modifier
,maud_pandemic_or_other_public_health_event_specific_reference_to_pandemic_related_governmental_responses_or_measures
,maud_type_of_consideration
Task Details
Task Name | Type | Description |
---|---|---|
canada\_tax\_court\_outcomes | multiple_choice | INSTRUCTIONS: Indicate whether the following judgment excerpt from a Tax Court of Canada decision allows the appeal or dismisses the appeal. Where the result is mixed, indicate that the appeal was allowed. Ignore costs orders. Where the outcome is unclear indicate other. Options: allowed, dismissed, other |
citation\_prediction\_classification | multiple_choice | Can the case can be used as a citation for the provided text? |
diversity\_3 | multiple_choice | Diversity jurisdiction exists when there is (1) complete diversity between plaintiffs and defendants, and (2) the amount-in-controversy (AiC) is greater than $75k. |
diversity\_5 | multiple_choice | Diversity jurisdiction exists when there is (1) complete diversity between plaintiffs and defendants, and (2) the amount-in-controversy (AiC) is greater than $75k. |
diversity\_6 | multiple_choice | Diversity jurisdiction exists when there is (1) complete diversity between plaintiffs and defendants, and (2) the amount-in-controversy (AiC) is greater than $75k. |
jcrew\_blocker | multiple_choice | The JCrew Blocker is a provision that typically includes (1) a prohibition on the borrower from transferring IP to an unrestricted subsidiary, and (2) a requirement that the borrower obtains the consent of its agent/lenders before transferring IP to any subsidiary. Do the following provisions contain JCrew Blockers? |
learned\_hands\_benefits | multiple_choice | Does the post discuss public benefits and social services that people can get from the government, like for food, disability, old age, housing, medical help, unemployment, child care, or other social needs? |
maud\_ability\_to\_consummate\_concept\_is\_subject\_to\_mae\_carveouts | multiple_choice | Instruction: Read the segment of a merger agreement and answer the multiple-choice question by choosing the option that best characterizes the agreement. Question: Is the 'ability to consummate' concept subject to Material Adverse Effect (MAE) carveouts? Option A: No Option B: Yes |
maud\_additional\_matching\_rights\_period\_for\_modifications\_cor | multiple_choice | Instruction: Read the segment of a merger agreement and answer the multiple-choice question by choosing the option that best characterizes the agreement. Question: How long is the additional matching rights period for modifications in case the board changes its recommendation? Option A: 2 business days or less Option B: 3 business days Option C: 3 days Option D: 4 business days Option E: 5 business days Option F: > 5 business days Option G: None |
maud\_change\_in\_law\_subject\_to\_disproportionate\_impact\_modifier | multiple_choice | Instruction: Read the segment of a merger agreement and answer the multiple-choice question by choosing the option that best characterizes the agreement. Question: Do changes in law that have disproportionate impact qualify for Material Adverse Effect (MAE)? Option A: No Option B: Yes |
maud\_changes\_in\_gaap\_or\_other\_accounting\_principles\_subject\_to\_disproportionate\_impact\_modifier | multiple_choice | Instruction: Read the segment of a merger agreement and answer the multiple-choice question by choosing the option that best characterizes the agreement. Question: Do changes in GAAP or other accounting principles that have disproportionate impact qualify for Material Adverse Effect (MAE)? Option A: No Option B: Yes |
maud\_cor\_permitted\_in\_response\_to\_intervening\_event | multiple_choice | Instruction: Read the segment of a merger agreement and answer the multiple-choice question by choosing the option that best characterizes the agreement. Question: Is Change of Recommendation permitted in response to an intervening event? Option A: No Option B: Yes |
maud\_fls\_mae\_standard | multiple_choice | Instruction: Read the segment of a merger agreement and answer the multiple-choice question by choosing the option that best characterizes the agreement. Question: What is the Forward Looking Standard (FLS) with respect to Material Adverse Effect (MAE)? Option A: "Could" (reasonably) be expected to Option B: "Would" Option C: "Would" (reasonably) be expected to Option D: No Option E: Other forward-looking standard |
maud\_includes\_consistent\_with\_past\_practice | multiple_choice | Instruction: Read the segment of a merger agreement and answer the multiple-choice question by choosing the option that best characterizes the agreement. Question: Does the wording of the Efforts Covenant clause include 'consistent with past practice'? Option A: No Option B: Yes |
maud\_initial\_matching\_rights\_period\_cor | multiple_choice | Instruction: Read the segment of a merger agreement and answer the multiple-choice question by choosing the option that best characterizes the agreement. Question: How long is the initial matching rights period in case the board changes its recommendation? Option A: 2 business days or less Option B: 3 business days Option C: 3 calendar days Option D: 4 business days Option E: 4 calendar days Option F: 5 business days Option G: Greater than 5 business days |
maud\_ordinary\_course\_efforts\_standard | multiple_choice | Instruction: Read the segment of a merger agreement and answer the multiple-choice question by choosing the option that best characterizes the agreement. Question: What is the efforts standard? Option A: Commercially reasonable efforts Option B: Flat covenant (no efforts standard) Option C: Reasonable best efforts |
maud\_pandemic\_or\_other\_public\_health\_event\_subject\_to\_disproportionate\_impact\_modifier | multiple_choice | Instruction: Read the segment of a merger agreement and answer the multiple-choice question by choosing the option that best characterizes the agreement. Question: Do pandemics or other public health events have to have disproportionate impact to qualify for Material Adverse Effect (MAE)? Option A: No Option B: Yes |
maud\_pandemic\_or\_other\_public\_health\_event\_specific\_reference\_to\_pandemic\_related\_governmental\_responses\_or\_measures | multiple_choice | Instruction: Read the segment of a merger agreement and answer the multiple-choice question by choosing the option that best characterizes the agreement. Question: Is there specific reference to pandemic-related governmental responses or measures in the clause that qualifies pandemics or other public health events for Material Adverse Effect (MAE)? Option A: No Option B: Yes |
maud\_type\_of\_consideration | multiple_choice | Instruction: Read the segment of a merger agreement and answer the multiple-choice question by choosing the option that best characterizes the agreement. Question: What type of consideration is specified in this agreement? Option A: All Cash Option B: All Stock Option C: Mixed Cash/Stock Option D: Mixed Cash/Stock: Election |
personal\_jurisdiction | multiple_choice | There is personal jurisdiction over a defendant in the state where the defendant is domiciled, or when (1) the defendant has sufficient contacts with the state, such that they have availed itself of the privileges of the state and (2) the claim arises out of the nexus of the defendant's contacts with the state. |
sara\_entailment | multiple_choice | Determine whether the following statements are entailed under the statute. |
sara\_numeric | regression | Answer the following questions. |
supply\_chain\_disclosure\_best\_practice\_accountability | multiple_choice | Evaluates supply chain disclosure practices |
supply\_chain\_disclosure\_best\_practice\_certification | multiple_choice | Evaluates supply chain disclosure practices |
supply\_chain\_disclosure\_best\_practice\_training | multiple_choice | Evaluates supply chain disclosure practices |
telemarketing\_sales\_rule | multiple_choice | The Telemarketing Sales Rule is provided by 16 C.F.R. § 310.3(a)(1) and 16 C.F.R. § 310.3(a)(2). |
Data Format
Each dataset retains its original columns from LegalBench and adds an input
column containing a pre-formatted prompt based on the task's instructions and template from the LegalBench registry. This input
column is designed for direct use with language models. The column structure varies by task; common examples include:
- Basic Legal:
answer
,index
,text
,input
- Citation:
answer
,citation
,index
,text
,input
- Diversity Analysis:
aic_is_met
,answer
,index
,parties_are_diverse
,text
,input
- Jurisdiction:
answer
,index
,slice
,text
,input
- SARA Analysis:
answer
,case id
,description
,index
,question
,statute
,text
,input
- Supply Chain Disclosure:
answer
,index
,text
,input
- MAUD Contract Analysis:
answer
,index
,text
,input
Usage
Load and use a task dataset as follows:
from datasets import load_dataset
# Load a specific task
dataset = load_dataset("DatologyAI/legalbench", "canada_tax_court_outcomes")
# Access the formatted input and answer
example = dataset["test"][0]
print("Input:", example["input"])
print("Answer:", example["answer"])
Model Evaluation Example
Evaluate a language model on a task:
from datasets import load_dataset
from transformers import AutoTokenizer, AutoModelForCausalLM
# Load model and tokenizer
model_name = "meta-llama/Llama-2-7b-chat-hf"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
# Load a task
dataset = load_dataset("DatologyAI/legalbench", "personal_jurisdiction")
example = dataset["test"][0]
# Generate response
inputs = tokenizer(example["input"], return_tensors="pt")
outputs = model.generate(inputs["input_ids"], max_new_tokens=10, temperature=0.0)
response = tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)
print(f"Gold answer: {example['answer']}")
print(f"Model response: {response}")