Eval
Aware · M68 · lesson 68 of 149 · queued
Preview — browse every lesson free. Enroll to mark lessons complete, open partner links and save your progress. Login & enroll →
Eval Legal
📖
now learning

Eval Legal

15 min

When an AI Lawyer Gets It Wrong, People Go to Prison

In 2023, a New York attorney submitted a legal brief containing six fabricated case citations generated by ChatGPT. The cases did not exist. The attorney was sanctioned, fined, and became a cautionary tale. But the stakes extend far beyond professional embarrassment. Legal AI systems are being deployed for contract review, case research, regulatory compliance analysis, and even sentencing risk assessment. When these systems hallucinate precedents, miss relevant statutes, or apply incorrect legal reasoning, the consequences fall on real people -- defendants, litigants, and organizations making compliance decisions. Evaluating legal AI demands domain-specific rigor that generic LLM benchmarks cannot provide. This lesson gives you the evaluation framework for legal AI that the domain's stakes demand.

Legal AI evaluation spans a hierarchy of capabilities, each requiring different evaluation approaches. Citation accuracy: does the system reference real cases, statutes, and regulations with correct citations? Legal reasoning: does the system correctly apply legal rules to facts, identify relevant exceptions, and distinguish binding from persuasive authority? Jurisdictional awareness: does the system correctly identify which laws apply in which jurisdictions, and flag when a question spans multiple jurisdictions? Document analysis: can the system extract key provisions from contracts, identify risks, and compare terms against market standards? Regulatory compliance: does the system correctly map regulations to organizational activities and identify compliance gaps? Outcome prediction: does the system accurately estimate case outcomes based on facts and jurisdiction? Each level builds on the previous: citation accuracy is a prerequisite for legal reasoning evaluation, which is a prerequisite for outcome prediction.

Evaluating Citation Accuracy and Hallucination

Citation hallucination is the most measurable and most dangerous failure mode in legal AI. Build a citation verification eval by constructing queries that require citing specific authorities. For each response, verify: does the cited case exist (check against Westlaw, LexisNexis, or CourtListener databases)? Is the case citation format correct (volume, reporter, page number)? Does the cited case actually say what the AI claims it says? Is the case still good law (not overruled or distinguished into irrelevance)? Automate what you can: case existence can be checked programmatically against legal databases. But holding verification -- whether the case actually supports the stated proposition -- requires legal expertise. Build a test set of 200+ legal queries across practice areas. Measure hallucination rate (percentage of citations that are fabricated), accuracy rate (percentage of real citations that correctly support the stated proposition), and currency rate (percentage of citations to cases that are still good law). Industry targets as of 2026: hallucination rate below 1% for production legal tools.

Legal reasoning follows specific structures that create testable evaluation criteria. IRAC (Issue, Rule, Application, Conclusion) is the standard framework. Evaluate whether the AI correctly identifies the legal issue from the facts, states the applicable legal rule (statutory or case-based), applies the rule to the specific facts (the most error-prone step), and reaches a logically sound conclusion. Build reasoning eval sets using law school exam hypotheticals -- they are designed to test reasoning, not just knowledge recall. Have practicing attorneys score responses on a rubric: issue identification (0-2), rule statement accuracy (0-3), application quality (0-3), conclusion soundness (0-2). Compute agreement across at least three attorney reviewers. A critical evaluation dimension: does the AI identify counterarguments and limitations? Legal reasoning that presents only one side is not just incomplete; it is misleading. Test with fact patterns that have strong arguments on both sides and evaluate whether the system acknowledges the tension.

Jurisdictional Accuracy and Conflict of Laws

Legal AI must correctly identify which law applies in a given situation, and this is a domain where models frequently fail. Build jurisdictional eval sets that test: federal vs. state law distinctions (a question about employment discrimination in Texas requires both Title VII and Texas Labor Code analysis), cross-border issues (a contract dispute between a California company and a UK supplier involves choice-of-law analysis), and temporal accuracy (did the cited statute version apply at the time of the events?). A practical eval approach: construct 100 fact patterns where the jurisdiction matters to the outcome, and have the AI identify applicable law. Score as correct only if the system identifies all relevant jurisdictions and their hierarchy. Common failure modes: models default to federal law when state law controls, cite the wrong version of a statute (pre- or post-amendment), and fail to identify when a question requires conflict-of-laws analysis. These failures are testable and should be permanent regression tests in your eval suite.

Evaluating Contract Review and Analysis

Contract review is one of the highest-volume legal AI applications. Evaluation requires both extraction accuracy and risk identification. For extraction, measure precision and recall on key provisions: parties, effective date, term length, termination clauses, indemnification provisions, limitation of liability, governing law, and assignment restrictions. Use a test set of 50-100 contracts with human-annotated provision locations and text. For risk identification, provide contracts with deliberately embedded problematic clauses and evaluate whether the AI flags them. Include one-sided indemnification provisions, unusual liability caps, broad IP assignment language, and non-standard termination triggers. Score risk identification using the standard confusion matrix: true positives (correctly flagged risks), false positives (non-issues flagged as risks), false negatives (missed risks), and true negatives (correctly passed provisions). For contract review, false negatives are far more costly than false positives -- a missed risk is worse than an unnecessary flag.

Legal AI systems can encode and amplify historical biases present in legal data. Sentencing risk assessment tools like COMPAS have been shown to produce racially disparate predictions. Legal research tools can surface precedents that reflect outdated social norms. Evaluate for bias across multiple dimensions. Counterfactual fairness: change protected attributes (race, gender, nationality) in fact patterns and measure whether the AI's legal conclusions change. If replacing 'Maria Garcia' with 'John Smith' in an immigration fact pattern changes the recommended strategy, you have a bias problem. Representational analysis: does the system's case selection over-represent majority perspectives? Outcome parity: across demographic groups, does the system's accuracy remain consistent? Build bias eval sets with matched pairs of fact patterns differing only in protected attributes. Measure demographic parity difference and equalized odds across groups. For high-stakes legal AI (bail, sentencing, immigration), engage independent fairness auditors.

Evaluating Regulatory Compliance Analysis

Regulatory compliance is a growing legal AI application area. Your AI must map regulatory requirements to organizational activities and identify gaps. Evaluation requires two layers. First, regulatory knowledge coverage: present the system with regulatory questions across your relevant frameworks (GDPR, HIPAA, SOX, PCI DSS, sector-specific regulations) and measure factual accuracy. Second, application accuracy: present the system with organizational scenarios and evaluate whether it correctly identifies which regulations apply, what specific requirements are triggered, and what compliance actions are needed. Build eval sets using real regulatory exam questions (bar exam, compliance certification exams) for knowledge coverage. For application accuracy, construct scenarios with known compliance gaps and measure the system's detection rate. A regulatory compliance AI that identifies 80% of applicable regulations but misses 20% is dangerous: the missed regulations are often the ones that trigger enforcement actions because they are the ones organizations are least aware of.

Evaluating Information Security and Privilege Protection

Legal AI systems handle privileged, confidential, and sensitive information. Your evaluation must test whether the system protects this information appropriately. Build test scenarios that probe: does the AI ever include privileged attorney-client communications in outputs visible to non-privileged parties? Does it correctly identify when information is subject to work-product protection? Does it maintain confidentiality boundaries when processing documents from opposing parties in litigation? For RAG-based legal systems, test for information leakage: insert privileged documents into the knowledge base alongside non-privileged documents, then query the system as a non-privileged user and verify that privileged content never surfaces. Test with prompt injection attacks designed to extract confidential information. These security evaluations should run alongside functional evaluations, not as a separate afterthought.

Try This Now: Citation Hallucination Test

Select a legal AI tool your organization uses or is evaluating (or use a general-purpose LLM). Construct 10 legal research queries spanning at least 3 practice areas (e.g., employment law, contract disputes, regulatory compliance). For each query, ask the AI to provide relevant case citations with holdings. Then verify every citation: (1) Does the case exist? Search the case name and citation in a legal database or Google Scholar. (2) Is the citation format correct? (3) Does the case actually address the legal issue in question? (4) Is the holding accurately described? Compute your hallucination rate (percentage of non-existent citations) and accuracy rate (percentage of real citations that correctly support the proposition). This exercise takes about 60 minutes and provides an immediate, concrete assessment of the legal AI's reliability for research tasks.

Key Takeaways

Legal AI evaluation requires domain-specific methodology because generic benchmarks cannot assess citation accuracy, legal reasoning quality, or jurisdictional correctness. Citation verification is the highest-priority evaluation: target hallucination rates below 1% and build automated verification pipelines against legal databases. Evaluate legal reasoning using the IRAC framework with practicing attorney reviewers, focusing on whether the system identifies counterarguments and limitations. Jurisdictional accuracy evaluation must test federal/state distinctions, cross-border issues, and temporal statute validity. Contract review evaluation requires both extraction accuracy (precision/recall on key provisions) and risk identification (prioritizing recall over precision). Bias evaluation using counterfactual fairness testing is essential for any legal AI touching decisions about individuals. Always test information security boundaries to ensure privileged and confidential information is protected.