Source-linked AI summary
LexAgentHallu: A Hierarchical Benchmark for Profiling Hallucinations in Legal Agents
Yujin Zhou, Mingxuan Zheng, Chuxue Cao, Huang Yidan, Jiale Chen, Yike Guo, Sirui Han
TL;DR
Existing evaluations do not jointly diagnose how legal agents hallucinate across multi-step trajectories or distinguish legal-content errors from agentic-process failures. LexAgentHallu addresses this gap with an expert-in-the-loop benchmark, dual-layer taxonomy, and step-level metrics; evaluation across agents reveals systematic hallucination profiles and a Right-Answer-Wrong-Reason effect.
Problem
Existing legal benchmarks evaluate mainly single-turn outputs, while general agent benchmarks lack legal grounding and do not attribute failures across legal and agentic layers.
Method
LexAgentHallu combines expert-verified benchmark materials, a dual-layer taxonomy, taxonomy-driven rubrics, and fine-grained metrics with step-level attribution.
Results
Across 18 agents, LexAgentHallu reveals pervasive hallucination, framework-dependent profiles, a Right-Answer-Wrong-Reason effect, and clustered hallucination subclasses.
Takeaways & Limitations
LexAgentHallu provides diagnostic evaluation of where and how legal-agent hallucinations occur beyond outcome-level scoring.
Takeaways & Limitations
The benchmark is grounded in the Chinese legal system and evaluates single-model legal agents, limiting direct coverage of other jurisdictions and multi-agent systems.
Abstract
from arXiv · showhide
As large language models are increasingly deployed as tool-augmented legal agents, they introduce agentic hallucinations where tool-call and reasoning errors cascade into fabricated holdings and miscited authority. However, existing legal benchmarks evaluate only single-turn QA with outcome-level metrics, while agentic hallucination benchmarks lack legal-specific diagnostic capability. Neither answers to what extent and how a legal agent hallucinates along its trajectory. To address these limitations, we introduce LexAgentHallu, a legal agentic hallucination benchmark designed to evaluate to what extent and how legal agents fail along multi-step trajectories. Built through a four-stage expert-in-the-loop pipeline, LexAgentHallu contains 3414 instances across 17 legal categories and 6 task types. Each instance is annotated under a dual-layer hallucination taxonomy of 7 high-level categories and 27 fine-grained subclasses, covering both substantive errors and agent-procedural failures. We further design fine-grained metrics that quantify to what extent and localize how each failure occurs along an agent's execution path. Our evaluation across 18 proprietary and open-source agents uncovers a Right-Answer-Wrong-Reason effect and reveals that hallucination subclasses cluster rather than scatter, forming distinct agentic framework, legal task, and category profiles. These findings, invisible to outcome-level evaluation, validate the diagnostic power of LexAgentHallu for evaluating agentic hallucination in law.
1 Introduction
LexAgentHallu addresses the need to evaluate hallucinations in multi-step legal agents at both the legal-knowledge and agentic-process levels. It introduces an expert-curated benchmark, dual-layer taxonomy, and fine-grained metrics that diagnose failures beyond final-answer correctness.
- Motivation: Existing legal evaluations largely omit tool use, planning, multi-turn interaction, and attribution of errors to legal knowledge versus agentic processes.This leaves users unable to determine whether a hallucinated conclusion reflects flawed legal knowledge or faulty agentic processes.
- Benchmark: LexAgentHallu is an expert-in-the-loop benchmark with expert-authored and verified queries, gold trajectories, and rubric-based annotations across diverse legal tasks.Licensed legal professionals author and verify the benchmark materials.
- Taxonomy: Its dual-layer taxonomy separates substantive legal-knowledge errors from agentic process-level failures during reasoning.The taxonomy jointly captures what the agent gets wrong about law and about the agentic process.
- Metrics: Taxonomy-aligned metrics measure hallucination frequency, density, substantive/procedural cleanliness, and Right-Answer-Wrong-Reason rates beyond outcome-only scoring.These metrics quantify how often and how broadly rollouts hallucinate and localize failure patterns by layer and subclass.
- Evaluation: The benchmark evaluates proprietary and open-source legal and general agents, revealing systematic analyses that outcome-level evaluation misses.The detailed findings are reported in the evaluation section.
2 Related Work
Prior work covers legal task accuracy, legal hallucinations, or generic agent hallucinations, but these efforts remain fragmented across single-turn settings, coarse taxonomies, and domain-agnostic evaluations.
- Legal benchmarks: Legal benchmarks such as LawBench, LexEval, LegalBench, PLawBench, J1-Eval, and LEXam emphasize broad task accuracy in single-turn, closed-book settings.These benchmarks span Chinese law, common-law reasoning, procedural law, judicial reasoning, and bar-exam-style questions.
- Research gap: Existing work therefore does not jointly evaluate multi-step, tool-augmented legal workflows across both substantive and procedural hallucinations.This gap motivates a benchmark that combines legal grounding with agent-level trajectory analysis.
- Hallucination benchmarks: General hallucination benchmarks evaluate factual errors, while LegalHal-Bench and CitaLaw extend hallucination evaluation to legal statutes and citations.These approaches treat hallucination primarily as a property of an isolated output.
L1 Substantive
The paper’s substantive hallucination taxonomy organizes legal errors hierarchically, while prior legal hallucination benchmarks remain confined to single-turn outputs and generic agent benchmarks lack legal grounding.
- Positioning: Prior legal hallucination studies address legal-content errors only at coarse granularity, whereas general agentic evaluations address process errors in a domain-agnostic manner.Neither line of work alone suffices for legal agents.
3 Benchmark
LEXAGENTHALLU is designed to diagnose both what legal agents say and how they arrive there, using a two-layer taxonomy, expert curation, and taxonomy-anchored evaluation. The benchmark combines broad legal coverage with trajectory-level metrics that identify hallucination frequency, severity, and procedural patterns.
- Benchmark design: LEXAGENTHALLU evaluates legal hallucinations along two orthogonal dimensions: substantive legal errors and agent-procedural errors.Layer 1 captures what the agent says about the law, while Layer 2 captures how it reaches that statement.
- Curation pipeline: The benchmark uses a four-stage human-in-the-loop pipeline covering data collection, task-specific filtering, expert annotation, and taxonomy-driven rubric construction.The curation process combines multiple data sources, difficulty filtering, legal verification, and checklist development.
- Curation pipeline: Closed-ended items are retained only when all rollouts from six models fail, creating a hard-case subset where hallucination is empirically likely.Open-ended items instead use existing expert annotations or LLM-based quality filtering, depending on the source.
- Evaluation framework: Each instance receives a taxonomy-driven rubric checklist whose items identify applicable hallucination subclasses and support interpretable diagnosis.Legal experts verify checklist factual correctness, taxonomy alignment, and non-redundancy before the checklists are used by the judge system.
- Dataset statistics: 3,414 expert-curated instances span 17 legal categories and 6 task types, including 1,542 subjective and 1,872 objective items.The collection is anchored in criminal and civil law while also covering intellectual property, commercial, administrative, constitutional, international, and legal-history domains.
- Evaluation framework: The judge evaluates full trajectories rather than final answers alone, then aggregates binary rubric decisions into frequency, density, cleanliness, RAWR, and co-occurrence metrics.Full trajectories include final answers, intermediate reasoning, memory states, and tool-call observations, enabling detection of Layer-2 errors.
4 Experiments
Across 18 agents, hallucinations remain widespread, vary by orchestration framework and model backbone, and often persist even when final answers are correct. Task, legal-category, and subclass analyses reveal structured rather than independent failure patterns.
- Framework Profiles: Model rankings shift across frameworks: ReAct best suppresses overall and substantive hallucinations, whereas LawThinker best suppresses procedural hallucinations.Plan-and-Execute does not win any reported metric column.
- Scaling Behavior: Within the Qwen family under LawThinker, scaling from 3.5-9B to 3.5-27B to 3.6-27B monotonically reduces HFL2 from 0.931 to 0.754.Frontier closed-source models still outperform the largest open-source variants on most metrics.
- Right-Answer-Wrong-Reason: Correct answers still contain substantive and procedural hallucinations, with average RAWR-S of 68% and RAWR-P of 37%.RAWR-S varies narrowly from 0.61–0.78, while RAWR-P varies more widely from 0.07–0.85.
- Task-Type Profiles: Open-ended Adjudication Analysis and Case Analysis approach HFL1=1.00, while constrained Legal Knowledge QA and Judgement Prediction are lower at 0.82 and 0.81.HFL2 orders tasks differently: Adjudication Analysis is 0.83 and Judgement Prediction is 0.71.
- Legal-Category and Subclass Profiles: Criminal Procedure and Civil Law form high-hallucination category clusters at 0.95 and 0.93, while Constitutional Law and Jurisprudence rank lowest at 0.79 and 0.65.The subclass matrix also shows within-layer coupling and strong mechanistic pairs, including a maximum reported Lift of 7.07.
5 Conclusion
LEXAGENTHALLU is a benchmark for measuring and localizing hallucinations in legal agents’ multi-step trajectories. Its expert-built dataset, dual-layer taxonomy, and fine-grained metrics support analysis of both substantive and agentic failures.
- Benchmark: LEXAGENTHALLU contains 3,414 instances across 17 legal categories and 6 task types, built through a four-stage expert-in-the-loop pipeline.Each instance uses expert-curated queries, gold references, and taxonomy-driven annotations.
- Taxonomy: Its dual-layer taxonomy includes 7 mid-level categories and 27 fine-grained subclasses covering substantive and agentic failures.The taxonomy separates legal knowledge errors from process-level failures.
- Diagnostics: Fine-grained metrics enable step-level attribution of where failures occur along an agent’s execution path.The benchmark is designed to evaluate both the extent and location of hallucinations.
- Implication: The authors anticipate that LEXAGENTHALLU will support development of more trustworthy legal agents.
Limitations
LexAgentHallu’s limitations concern jurisdictional scope, model-evolution drift, and evaluation restricted to single-model legal agents.
- Jurisdictional scope: The benchmark is grounded in the Chinese legal system, with Chinese queries and annotations anchored to PRC legal authorities.This jurisdiction-specific design limits cross-jurisdictional generalizability because other systems may require different hallucination categories.
- Model evolution: Newer models may exhibit performance and hallucination patterns that differ from those reported in the paper.The authors plan an online platform to update subclass frequencies, co-occurrences, and RAWR profiles.
- Agent setting: Experiments are limited to single-model legal agents to preserve control and attribute hallucinations to individual reasoning trajectories.Multi-agent systems may show different or lower hallucination rates but introduce additional variables and higher deployment costs.
- Data governance: The dataset uses publicly available or properly licensed sources and contains no personally identifiable or sensitive information.Human participation was limited to expert annotation and quality verification.
B Datasets
The dataset appendix describes the source benchmarks, their cognitive coverage, annotation process, and the taxonomy used to classify legal hallucinations. It also characterizes hallucination frequencies across legal categories and agent frameworks.
- Source benchmarks: Five Chinese legal benchmarks span recall, concept recognition, multi-step reasoning, consultation, case analysis, and document generation.The sources include LexEval, LawBench, UniLaw-Eval, DISC-LawEval, and PLawBench.
- Benchmark scale and focus: LexEval organizes approximately 14,150 questions across 23 tasks, while UniLaw-Eval contains 800 multi-step deductive or analogical reasoning items.LexEval covers knowledge recall, statute interpretation, and case-based reasoning; UniLaw-Eval probes doctrinal and subsumption hallucinations.
- Benchmark scale and focus: PLawBench contains 850 questions across 13 practice scenarios with approximately 12,500 rubric items assessing issue identification, fact extraction, reasoning, and document coherence.It is designed to connect academic evaluation with real-world legal workflows.
- Annotation: Two experts completed annotation over 21 days, producing or verifying gold-standard labels through approximately 170–250 person-hours.They contributed an average of 4–6 hours per day each.
- Category profiles: In the category profile, Criminal Procedure, Civil Procedure, Criminal Law, and Civil Law have HFL1 values above 0.93, whereas Constitutional Law and Jurisprudence are lower.The figure reports hallucination frequency for the top-12 legal categories sorted by HFL1 descending.
- Hallucination taxonomy: The substantive layer organizes legal-reasoning errors along source → rule → procedure → application and contains 4 mid-level categories with 19 fine-grained subcategories.The taxonomy distinguishes source citation errors, doctrinal misunderstandings, procedural-law errors, and application or subsumption failures.
- Hallucination taxonomy: Doctrinal errors include conceptual confusion, element misstatement, outcome-determinative exception omission, consequence error, doctrinal-position confusion, and discretionary-judgment error.The diagnostic distinction between conceptual confusion and element misstatement is whether the model chose the wrong conceptual branch.
- Hallucination taxonomy: Procedural-law errors cover jurisdiction, procedural-step requirements, and remedy paths such as reconsideration, appeal, retrial, and enforcement objections.Examples include assigning a case to the wrong court, misstating filing requirements, and advising litigation before mandatory administrative reconsideration.
E.1 Metrics
This section defines metrics for answer correctness, cleanliness, right-answer-wrong-reasoning, subclass frequency, joint hallucination frequency, and Lift-based co-occurrence analysis.
- Answer correctness compares the model’s extracted answer with the gold answer for each rollout.
- Substantive and Procedural Cleanliness quantify the absence of their respective hallucination types.
- The RAWR rate identifies cases where the answer is correct despite incorrect reasoning.
- Subclass hallucination frequency measures each subclass’s hit rate across rollouts, while joint frequency measures simultaneous hits by two subclasses.
- Lift compares subclass co-occurrence with independence: Lift(s, t) > 1 indicates positive association, Lift(s, t) = 1 independence, and Lift(s, t) < 1 negative association.
E.2 Judge Robustness
The evaluation validates the automated judge against independent legal-expert annotations, assessing both judge–human consistency and inter-annotator agreement.
- 2,391 rubric items and 1,395 valid judge decisions were independently labeled by three certified legal experts.
- The study measures both consistency between the LLM judge and human annotations and agreement among the three experts.
- The reported results indicate high inter-expert agreement and close alignment between the automated judge and expert assessment.
F.1 Hardware and Compute Environment
Experiments use a shared deterministic infrastructure and legal tool suite across ReAct, Plan-and-Execute, and LawThinker, with framework-specific workflow configurations.
- Hardware and compute: Experiments run on DGX nodes with 8×NVIDIA H800 80 GB GPUs, 224 vCPU, and approximately 2 TB host RAM per node.
- Inference configuration: All systems use deterministic decoding with temperature = 0.0, top_p = 0.8, top_k = 20, and max_tokens = 4,096 per call.
- Agent workflows: ReAct allows 8 steps, while Plan-and-Execute allows 10 steps with typed JSON planning and shared tool execution.
- Agent workflows: LawThinker uses a two-turn Questioner–trainee scenario with an optional deep-analysis pass, and can suppress backbone-native chain-of-thought tags.
- Tool suite: The frameworks share an identical legal tool suite, while LawThinker phases knowledge-exploration tools before verification tools.
- Tool suite: The catalogue includes retrieval, recommendation, drafting, procedural, verification, and web-search tools, with discipline rules limiting repeated calls and requiring escalation or closure.
G.2 Per-Task and Per-Domain Difficulty
The benchmark reports full hallucination-frequency and hallucination-density results by task type and presents corresponding metrics for the top 12 legal categories.
- Per-task difficulty: Table 5 reports full HF/HD results across the six LEXAGENTHALLU task types.
- Per-domain difficulty: Figure 8 reports the same metrics for the top 12 legal categories, sorted by HFL1 descending.
H Prompt Templates
The appendix specifies rollout prompts and tool-use protocols for legal agents, including planning, retrieval, verification, output formatting, and search constraints. It also identifies the evaluation table as a per-task hallucination profile sorted by HDL1.
- Rollout prompts: The rollout section provides prompts for LawThinker, LRAS, Plan-and-Execute, and ReAct agents.
- Rollout prompts: Agents must reason within designated tags, use search when needed, and return concise or detailed answers according to question type.
- Tool usage: Tool instructions define web_search for public legal information, including newly released policies, local regulations, foreign laws, procedures, and service channels.
- Tool usage: Tool-use rules prohibit duplicate calls, limit retries, require switching tools after repeated failures, and prioritize direct conclusions when general legal knowledge suffices.
- ReAct format: ReAct outputs must contain exactly one tool action or final answer per round, with valid JSON tool arguments and a maximum of 8 rounds.
- Plan-and-Execute format: Plan-and-Execute outputs require a JSON object whose plan is an executable string array with at least two specific, progressive steps.
- Plan-and-Execute tools: The Plan-and-Execute tool list covers legal retrieval, recommendations, charge and case expansion, document templates, writing plans, court procedures, and legal checks.
- Plan-and-Execute tools: Retrieval guidance prioritizes law_check for known article numbers, law_retrieval for natural-language descriptions, one revised query, and Chinese mainland legal sources.