Hallucinated Citation Detection: Building Verifiable Legal Evals
Hallucinated Citation Detection: Building Verifiable Legal Evals
Legal citation hallucination is not a corner case. It is a systematic failure mode in every frontier language model evaluated on legal tasks to date. A model that fabricates a plausible-sounding case name, docket number, or statutory reference is not merely wrong. It is producing output that a practitioner could act on, with professional and legal consequences. Hallucinated citation detection is therefore the first verification problem any team must solve before deploying or evaluating a language model in a legal context. This post describes how to build verifiable legal evals that catch this failure class with precision, not just probability.
What hallucinated citation detection means in a legal eval
A hallucinated legal citation is any reference to a case, statute, regulation, or secondary source that does not exist as described, or that exists but does not support the proposition for which it is cited. Verifiable legal evals catch both subtypes: fabricated citations and misattributed citations. Detection requires a verifier, not just a rubric. Aggregate accuracy scores on legal benchmarks do not separate these failure types.
There are two distinct citation failure modes, and conflating them produces misleading eval results:
Fabrication: The citation does not exist. The case name, reporter volume, page number, or docket identifier resolves to nothing in an authoritative database.
Misattribution: The citation exists, but the case does not say what the model claims. The holding, dicta, or facts are distorted or reversed.
Most legal eval designs catch fabrication reasonably well through lookup-based verifiers. Misattribution is harder and requires a secondary verification layer: either a human expert reviewer or a grounded retrieval check against the actual case text.
Why standard benchmarks miss this failure mode
Standard legal benchmarks, including bar exam question sets and statutory interpretation tasks, are not designed to surface citation hallucination. They test whether a model selects the correct answer from a fixed option set, or produces a plausible legal argument. Neither format requires the model to produce a verifiable citation. A model can score well on these benchmarks while hallucinating citations in every open-ended legal memo it generates.
This is a construct validity problem. The benchmark measures something correlated with legal competence but not the specific capability that breaks in deployment. For a deeper treatment of why benchmark scores fail to transfer to operational settings, see why benchmark scores do not transfer to real tasks.
The implication for eval design is direct: if citation accuracy in open-ended generation is the capability that matters, the eval must elicit open-ended generation and verify the citations produced. Multiple-choice proxies will not do.
How to structure a verifiable legal citation eval
A verifiable legal citation eval has three components: a task design that elicits citation generation, a lookup-based fabrication verifier, and an expert-graded misattribution check. Each component has distinct design requirements.
Component 1: Task design
The task must require the model to produce citations as part of its output, not select from provided options. Effective task formats include:
Write a memorandum of law supporting a specified legal position on a given fact pattern, citing relevant authority.
Identify the controlling precedent in a specified jurisdiction for a described legal issue and cite it with full citation format.
Identify the statutory basis for a regulatory requirement and provide the U.S. Code or C.F.R. citation.
Each task must specify the jurisdiction, the legal issue, and the citation format required (Bluebook, ALWD, or jurisdiction-specific). Underspecified tasks produce output that is difficult to verify because the expected citation space is undefined.
Task difficulty should be calibrated empirically against frontier models. A task on which all evaluated models produce a correct, verifiable citation provides no signal. Target a pass rate that creates headroom: tasks that frontier models fail at least some of the time. For a protocol on calibrating headroom using pass@k, see designing evals with headroom for frontier models.
Component 2: Fabrication verifier
The fabrication verifier checks whether a cited source exists as described. The verification pipeline has four steps:
Parse: Extract all citations from the model output using a citation parser. For case law, extract case name, reporter, volume, and page. For statutes, extract title, section, and subsection. For regulations, extract C.F.R. or Federal Register references.
Normalize: Standardize extracted citations to a canonical format to handle minor formatting variation.
Lookup: Query an authoritative database. For U.S. case law, Westlaw and Lexis are the standard authorities. For statutes, the U.S. Code online edition (uscode.house.gov) and the Electronic Code of Federal Regulations (ecfr.gov) are primary sources. For academic secondary sources, check the journal volume and page against the publisher or a legal database.
Score: Assign a binary fabrication score per citation: exists or does not exist. Aggregate across all citations in the response to compute a citation existence rate.
The verifier must handle partial matches. A model may produce a real case name with a wrong reporter or wrong page number. These are not fabrications in the strict sense but are still unusable citations. Define in advance whether partial matches count as passing or failing, and apply that rule consistently across all tasks.
Component 3: Misattribution check
For citations that pass the fabrication check, a secondary check determines whether the cited source supports the proposition for which it is cited. This step cannot be fully automated without a retrieval system grounded in the actual case text.
A practical protocol:
Retrieve the full text of the cited case or statute from the authoritative source.
Extract the passage the model appears to be citing (the holding, the statutory language, or the relevant section).
Compare the model's characterization of the source against the actual text.
Grade as: accurate, partially accurate (holding is real but scope is overstated or understated), or misattributed (the source does not support the proposition).
Step 4 requires expert judgment. A retrieval-augmented LLM-as-judge can assist, but agreement between the judge and a human expert reviewer must be measured and reported. Do not treat LLM-as-judge agreement with itself as a proxy for accuracy. For the limits of automated grading in tasks that resist it, see when verifiable rewards fail.
Worked example: a citation verification task
Illustrative example. Numbers and outputs are constructed to demonstrate the method; they do not represent a specific model evaluation.
Task: A tenant in New York withheld rent after the landlord failed to repair a heat outage lasting 14 days in January. The landlord has filed an eviction proceeding. Write a one-paragraph legal argument for the tenant, citing the controlling New York case law on the warranty of habitability and the relevant provision of the New York Real Property Law.
Model output (abbreviated): The tenant has a complete defense under the implied warranty of habitability established in Park West Management Corp. v. Mitchell, 47 N.Y.2d 316 (1979), and codified at N.Y. Real Property Law section 235-b. A fourteen-day heat outage in winter constitutes a material breach...
Fabrication check:
Park West Management Corp. v. Mitchell, 47 N.Y.2d 316 (1979): Lookup confirms this citation exists in the New York Court of Appeals reporter. Pass.
N.Y. Real Property Law section 235-b: Lookup confirms this statute exists and addresses the warranty of habitability. Pass.
Misattribution check: The actual holding in Park West does establish the warranty of habitability in residential leases. The model's characterization is accurate in scope. The statute does impose the warranty on landlords. No misattribution detected in this instance.
Result for this task: Citation existence rate: 2/2. Misattribution rate: 0/2. This task did not surface a failure. At scale, across a set of tasks designed to elicit citations in lower-profile areas of law where training data is sparser, fabrication and misattribution rates rise. That is where the eval becomes informative.
Common failure modes in legal citation eval design
1. Evaluating only high-salience citations
Detection: All tasks involve landmark cases that appear frequently in legal training corpora. Fix: Include tasks that require citations to lower-court decisions, administrative rulings, and secondary sources in specialized practice areas. Hallucination rates are higher where training data is sparse.
2. Accepting partial citation matches as correct
Detection: The verifier returns a pass for a citation where the case name is correct but the volume or page number is wrong. Fix: Define the minimum citation elements required for a pass before scoring begins and apply the rule uniformly. A citation that cannot be located precisely is not a usable citation.
3. No misattribution check
Detection: The eval reports only a citation existence rate, not a proposition accuracy rate. Fix: Add the misattribution check as a required second stage. A model that always cites real cases but consistently mischaracterizes their holdings is not safer than one that fabricates.
4. Using the model under evaluation as the verifier
Detection: The grading pipeline asks the same model (or a model from the same family) to verify its own citations. Fix: Use an authoritative external database for fabrication checks and a human expert for misattribution checks. Self-verification is not independent.
5. Contamination from public legal datasets
Detection: Tasks are drawn from published legal problem sets, bar exam prep materials, or publicly available memos. Models may have memorized both the task and the correct citation. Fix: Author original tasks with novel fact patterns. For the contamination problem in legal evals specifically, the same logic that applies to other expert domains applies here: original, expert-authored tasks resist memorization in ways that recycled tasks do not. The expert task authoring playbook describes how to move from a domain to a verifiable task specification.
6. Static eval sets that do not rotate
Detection: The same task set is used across multiple model versions over time. Fix: Treat the eval set as perishable. Rotate tasks as models improve and as the task set becomes known. For governance of held-out evals, see private held-out evals governance and rotation.
Where this approach breaks down
The lookup-based fabrication verifier depends on database access. Not all legal databases are freely queryable at scale, and API access to Westlaw or Lexis carries cost and rate limits. Teams running large-scale evals must plan for this infrastructure cost or use a tiered approach: automated lookup for a sample, expert review for the remainder.
The misattribution check does not scale cheaply. Expert legal reviewers with jurisdiction-specific knowledge are expensive and slow. For large eval sets, a retrieval-augmented LLM-as-judge can handle first-pass misattribution scoring, but the agreement rate between the judge and a human expert must be measured on a calibration set before the automated score is trusted. If agreement is below a threshold the team sets in advance, the automated score is not reliable enough to report.
Finally, this eval design measures citation accuracy in isolation. It does not measure whether the overall legal argument is sound, whether the model applies the cited authority correctly to the facts, or whether the advice would be appropriate for a licensed practitioner to give. Citation accuracy is a necessary condition for a trustworthy legal AI system. It is not sufficient.
FAQ
What is the difference between a fabricated citation and a misattributed citation?
A fabricated citation refers to a source that does not exist: the case name, docket number, or reporter reference resolves to nothing in an authoritative database. A misattributed citation refers to a real source that does not support the proposition for which it is cited. Both are failure modes. Evals must test for both separately because they have different detection methods and different implications for downstream risk.
Can a retrieval-augmented model still hallucinate citations?
Yes. Retrieval-augmented generation reduces fabrication rates by grounding the model in retrieved documents, but it does not eliminate misattribution. A model can retrieve a real case and mischaracterize its holding, selectively quote language out of context, or apply a holding from one jurisdiction to a different one. Eval design must test for misattribution even when the model has retrieval access.
How many tasks are needed for a reliable citation hallucination rate estimate?
The minimum sample size depends on the expected failure rate and the precision required. If the true fabrication rate is approximately 20 percent and the team needs a 95 percent confidence interval of plus or minus 5 percentage points, the required sample is approximately 246 tasks, derived from the standard proportion confidence interval formula. At lower base rates, more tasks are needed. Sample size should be computed before the eval runs, not after.
Is LLM-as-judge reliable for misattribution grading in legal tasks?
LLM-as-judge is unreliable for misattribution grading unless it is grounded in the actual case text via retrieval and its agreement with human expert reviewers has been measured on a calibration set. Without a measured agreement rate, the judge's score is an opinion, not a verification. Report the human-LLM agreement rate alongside any automated misattribution scores.
How do I author legal citation tasks that are not contaminated by public datasets?
Construct novel fact patterns that do not appear in published case books, bar prep materials, or publicly available legal memos. The controlling authority the task requires can be a real case, but the fact pattern that elicits the citation must be original. Practitioners and legal instructors who work with hypotheticals regularly are the right authors for this task class. Verify authorship and originality before including tasks in an eval set.
What this means in practice
Hallucinated citation detection requires a three-layer verification stack: a task design that elicits citations, a lookup-based fabrication check against authoritative databases, and an expert-graded misattribution check. None of these layers is optional. Omitting any one of them produces an eval that gives false confidence. The fabrication check is automatable with the right database access. The misattribution check requires expert judgment, at least for calibration. Both must be in place before citation accuracy scores are reported as meaningful.
The hardest part of this eval class is not the verifier design. It is authoring tasks that are original enough to resist contamination, specific enough to have a verifiable answer, and difficult enough to produce signal against frontier models. That combination requires practitioners who understand both the legal domain and the failure modes of language models.
If you are building evals or post-training data pipelines for legal AI tasks, get in touch with Chiron Data Labs.
Have questions or want personalised guidance? Contact us and we'll be happy to help.
Legal citation hallucination is not a corner case. It is a systematic failure mode in every frontier language model evaluated on legal tasks to date. A model that fabricates a plausible-sounding case name, docket number, or statutory reference is not merely wrong. It is producing output that a practitioner could act on, with professional and legal consequences. Hallucinated citation detection is therefore the first verification problem any team must solve before deploying or evaluating a language model in a legal context. This post describes how to build verifiable legal evals that catch this failure class with precision, not just probability.
What hallucinated citation detection means in a legal eval
A hallucinated legal citation is any reference to a case, statute, regulation, or secondary source that does not exist as described, or that exists but does not support the proposition for which it is cited. Verifiable legal evals catch both subtypes: fabricated citations and misattributed citations. Detection requires a verifier, not just a rubric. Aggregate accuracy scores on legal benchmarks do not separate these failure types.
There are two distinct citation failure modes, and conflating them produces misleading eval results:
Fabrication: The citation does not exist. The case name, reporter volume, page number, or docket identifier resolves to nothing in an authoritative database.
Misattribution: The citation exists, but the case does not say what the model claims. The holding, dicta, or facts are distorted or reversed.
Most legal eval designs catch fabrication reasonably well through lookup-based verifiers. Misattribution is harder and requires a secondary verification layer: either a human expert reviewer or a grounded retrieval check against the actual case text.
Why standard benchmarks miss this failure mode
Standard legal benchmarks, including bar exam question sets and statutory interpretation tasks, are not designed to surface citation hallucination. They test whether a model selects the correct answer from a fixed option set, or produces a plausible legal argument. Neither format requires the model to produce a verifiable citation. A model can score well on these benchmarks while hallucinating citations in every open-ended legal memo it generates.
This is a construct validity problem. The benchmark measures something correlated with legal competence but not the specific capability that breaks in deployment. For a deeper treatment of why benchmark scores fail to transfer to operational settings, see why benchmark scores do not transfer to real tasks.
The implication for eval design is direct: if citation accuracy in open-ended generation is the capability that matters, the eval must elicit open-ended generation and verify the citations produced. Multiple-choice proxies will not do.
How to structure a verifiable legal citation eval
A verifiable legal citation eval has three components: a task design that elicits citation generation, a lookup-based fabrication verifier, and an expert-graded misattribution check. Each component has distinct design requirements.
Component 1: Task design
The task must require the model to produce citations as part of its output, not select from provided options. Effective task formats include:
Write a memorandum of law supporting a specified legal position on a given fact pattern, citing relevant authority.
Identify the controlling precedent in a specified jurisdiction for a described legal issue and cite it with full citation format.
Identify the statutory basis for a regulatory requirement and provide the U.S. Code or C.F.R. citation.
Each task must specify the jurisdiction, the legal issue, and the citation format required (Bluebook, ALWD, or jurisdiction-specific). Underspecified tasks produce output that is difficult to verify because the expected citation space is undefined.
Task difficulty should be calibrated empirically against frontier models. A task on which all evaluated models produce a correct, verifiable citation provides no signal. Target a pass rate that creates headroom: tasks that frontier models fail at least some of the time. For a protocol on calibrating headroom using pass@k, see designing evals with headroom for frontier models.
Component 2: Fabrication verifier
The fabrication verifier checks whether a cited source exists as described. The verification pipeline has four steps:
Parse: Extract all citations from the model output using a citation parser. For case law, extract case name, reporter, volume, and page. For statutes, extract title, section, and subsection. For regulations, extract C.F.R. or Federal Register references.
Normalize: Standardize extracted citations to a canonical format to handle minor formatting variation.
Lookup: Query an authoritative database. For U.S. case law, Westlaw and Lexis are the standard authorities. For statutes, the U.S. Code online edition (uscode.house.gov) and the Electronic Code of Federal Regulations (ecfr.gov) are primary sources. For academic secondary sources, check the journal volume and page against the publisher or a legal database.
Score: Assign a binary fabrication score per citation: exists or does not exist. Aggregate across all citations in the response to compute a citation existence rate.
The verifier must handle partial matches. A model may produce a real case name with a wrong reporter or wrong page number. These are not fabrications in the strict sense but are still unusable citations. Define in advance whether partial matches count as passing or failing, and apply that rule consistently across all tasks.
Component 3: Misattribution check
For citations that pass the fabrication check, a secondary check determines whether the cited source supports the proposition for which it is cited. This step cannot be fully automated without a retrieval system grounded in the actual case text.
A practical protocol:
Retrieve the full text of the cited case or statute from the authoritative source.
Extract the passage the model appears to be citing (the holding, the statutory language, or the relevant section).
Compare the model's characterization of the source against the actual text.
Grade as: accurate, partially accurate (holding is real but scope is overstated or understated), or misattributed (the source does not support the proposition).
Step 4 requires expert judgment. A retrieval-augmented LLM-as-judge can assist, but agreement between the judge and a human expert reviewer must be measured and reported. Do not treat LLM-as-judge agreement with itself as a proxy for accuracy. For the limits of automated grading in tasks that resist it, see when verifiable rewards fail.
Worked example: a citation verification task
Illustrative example. Numbers and outputs are constructed to demonstrate the method; they do not represent a specific model evaluation.
Task: A tenant in New York withheld rent after the landlord failed to repair a heat outage lasting 14 days in January. The landlord has filed an eviction proceeding. Write a one-paragraph legal argument for the tenant, citing the controlling New York case law on the warranty of habitability and the relevant provision of the New York Real Property Law.
Model output (abbreviated): The tenant has a complete defense under the implied warranty of habitability established in Park West Management Corp. v. Mitchell, 47 N.Y.2d 316 (1979), and codified at N.Y. Real Property Law section 235-b. A fourteen-day heat outage in winter constitutes a material breach...
Fabrication check:
Park West Management Corp. v. Mitchell, 47 N.Y.2d 316 (1979): Lookup confirms this citation exists in the New York Court of Appeals reporter. Pass.
N.Y. Real Property Law section 235-b: Lookup confirms this statute exists and addresses the warranty of habitability. Pass.
Misattribution check: The actual holding in Park West does establish the warranty of habitability in residential leases. The model's characterization is accurate in scope. The statute does impose the warranty on landlords. No misattribution detected in this instance.
Result for this task: Citation existence rate: 2/2. Misattribution rate: 0/2. This task did not surface a failure. At scale, across a set of tasks designed to elicit citations in lower-profile areas of law where training data is sparser, fabrication and misattribution rates rise. That is where the eval becomes informative.
Common failure modes in legal citation eval design
1. Evaluating only high-salience citations
Detection: All tasks involve landmark cases that appear frequently in legal training corpora. Fix: Include tasks that require citations to lower-court decisions, administrative rulings, and secondary sources in specialized practice areas. Hallucination rates are higher where training data is sparse.
2. Accepting partial citation matches as correct
Detection: The verifier returns a pass for a citation where the case name is correct but the volume or page number is wrong. Fix: Define the minimum citation elements required for a pass before scoring begins and apply the rule uniformly. A citation that cannot be located precisely is not a usable citation.
3. No misattribution check
Detection: The eval reports only a citation existence rate, not a proposition accuracy rate. Fix: Add the misattribution check as a required second stage. A model that always cites real cases but consistently mischaracterizes their holdings is not safer than one that fabricates.
4. Using the model under evaluation as the verifier
Detection: The grading pipeline asks the same model (or a model from the same family) to verify its own citations. Fix: Use an authoritative external database for fabrication checks and a human expert for misattribution checks. Self-verification is not independent.
5. Contamination from public legal datasets
Detection: Tasks are drawn from published legal problem sets, bar exam prep materials, or publicly available memos. Models may have memorized both the task and the correct citation. Fix: Author original tasks with novel fact patterns. For the contamination problem in legal evals specifically, the same logic that applies to other expert domains applies here: original, expert-authored tasks resist memorization in ways that recycled tasks do not. The expert task authoring playbook describes how to move from a domain to a verifiable task specification.
6. Static eval sets that do not rotate
Detection: The same task set is used across multiple model versions over time. Fix: Treat the eval set as perishable. Rotate tasks as models improve and as the task set becomes known. For governance of held-out evals, see private held-out evals governance and rotation.
Where this approach breaks down
The lookup-based fabrication verifier depends on database access. Not all legal databases are freely queryable at scale, and API access to Westlaw or Lexis carries cost and rate limits. Teams running large-scale evals must plan for this infrastructure cost or use a tiered approach: automated lookup for a sample, expert review for the remainder.
The misattribution check does not scale cheaply. Expert legal reviewers with jurisdiction-specific knowledge are expensive and slow. For large eval sets, a retrieval-augmented LLM-as-judge can handle first-pass misattribution scoring, but the agreement rate between the judge and a human expert must be measured on a calibration set before the automated score is trusted. If agreement is below a threshold the team sets in advance, the automated score is not reliable enough to report.
Finally, this eval design measures citation accuracy in isolation. It does not measure whether the overall legal argument is sound, whether the model applies the cited authority correctly to the facts, or whether the advice would be appropriate for a licensed practitioner to give. Citation accuracy is a necessary condition for a trustworthy legal AI system. It is not sufficient.
FAQ
What is the difference between a fabricated citation and a misattributed citation?
A fabricated citation refers to a source that does not exist: the case name, docket number, or reporter reference resolves to nothing in an authoritative database. A misattributed citation refers to a real source that does not support the proposition for which it is cited. Both are failure modes. Evals must test for both separately because they have different detection methods and different implications for downstream risk.
Can a retrieval-augmented model still hallucinate citations?
Yes. Retrieval-augmented generation reduces fabrication rates by grounding the model in retrieved documents, but it does not eliminate misattribution. A model can retrieve a real case and mischaracterize its holding, selectively quote language out of context, or apply a holding from one jurisdiction to a different one. Eval design must test for misattribution even when the model has retrieval access.
How many tasks are needed for a reliable citation hallucination rate estimate?
The minimum sample size depends on the expected failure rate and the precision required. If the true fabrication rate is approximately 20 percent and the team needs a 95 percent confidence interval of plus or minus 5 percentage points, the required sample is approximately 246 tasks, derived from the standard proportion confidence interval formula. At lower base rates, more tasks are needed. Sample size should be computed before the eval runs, not after.
Is LLM-as-judge reliable for misattribution grading in legal tasks?
LLM-as-judge is unreliable for misattribution grading unless it is grounded in the actual case text via retrieval and its agreement with human expert reviewers has been measured on a calibration set. Without a measured agreement rate, the judge's score is an opinion, not a verification. Report the human-LLM agreement rate alongside any automated misattribution scores.
How do I author legal citation tasks that are not contaminated by public datasets?
Construct novel fact patterns that do not appear in published case books, bar prep materials, or publicly available legal memos. The controlling authority the task requires can be a real case, but the fact pattern that elicits the citation must be original. Practitioners and legal instructors who work with hypotheticals regularly are the right authors for this task class. Verify authorship and originality before including tasks in an eval set.
What this means in practice
Hallucinated citation detection requires a three-layer verification stack: a task design that elicits citations, a lookup-based fabrication check against authoritative databases, and an expert-graded misattribution check. None of these layers is optional. Omitting any one of them produces an eval that gives false confidence. The fabrication check is automatable with the right database access. The misattribution check requires expert judgment, at least for calibration. Both must be in place before citation accuracy scores are reported as meaningful.
The hardest part of this eval class is not the verifier design. It is authoring tasks that are original enough to resist contamination, specific enough to have a verifiable answer, and difficult enough to produce signal against frontier models. That combination requires practitioners who understand both the legal domain and the failure modes of language models.
If you are building evals or post-training data pipelines for legal AI tasks, get in touch with Chiron Data Labs.
Have questions or want personalised guidance? Contact us and we'll be happy to help.