Back to feed
News Story
机器之心
1 sources

HKUST proposes LexAgentHallu to trace hidden hallucinations in legal agents

A research team at Hong Kong University of Science and Technology has proposed LexAgentHallu, a hierarchical benchmark for evaluating hallucinations in legal agents that extends evaluation from final answers to full execution traces and localizes errors to specific steps. The benchmark includes a two-layer taxonomy with 7 mid-level categories and 27 fine-grained subclasses, and 3,414 instances covering 17 legal categories and 6 task types. Evaluating 18 agent configurations, the study found that even the best configuration had at least one hallucination in 89% of traces, and among correct-answer samples, an average of 68% of traces still contained at least one legal-content hallucination.

SynthePulse Insight · AI deep reading

Right Answer Doesn't Mean Trustworthy: Legal Agent Hallucinations Hide in the Execution Chain

Version 1 · 1 source

HKUST proposes LexAgentHallu, extending the evaluation target of legal agents from final answers to complete execution trajectories. In tests emphasizing hard cases, the best-performing configuration still had 89% of trajectories with at least one hallucination; and among samples with correct answers, an average of 68% of trajectories still contained legal content hallucinations.

  • LexAgentHallu was proposed by a research team at the Hong Kong University of Science and Technology, positioned as an agent hallucination evaluation benchmark, expanding the observation target from final answers to complete trajectories and localizing errors to specific steps.
  • The benchmark includes 3,414 instances, covering 17 legal categories and 6 task types, with a taxonomy containing 7 mid-level categories and 27 fine-grained subcategories.
  • The paper evaluated 18 closed-source and open-source agent configurations: the best-performing configuration still had 89% of execution trajectories with at least one hallucination, and all systems had a legal content hallucination frequency of no less than 87.5%.
  • The RAWR metric only looks at samples with correct answers: on average, 68% of trajectories contained at least one type of legal content hallucination, and 37% contained at least one agent process hallucination.
  • Task type affects hallucination distribution: the legal content hallucination frequency for judgment analysis reached 1.00, and for case analysis 0.95; among process hallucinations, judgment analysis reached 0.83 and judgment prediction 0.71.
  • The paper cautions against overgeneralization: the benchmark is mainly based on the Chinese legal system and focuses on single-agent scenarios.
Open section navigationWhy the Evaluation Target Must Move from Answers to Trajectories

Why the Evaluation Target Must Move from Answers to Trajectories

Legal large models are moving from single-turn Q&A to agents: systems no longer just generate a piece of text, but plan tasks, call retrieval tools, read materials, and continue acting based on intermediate results. LexAgentHallu, proposed by a research team at HKUST, precisely expands the observation target from the final answer to the complete trajectory and localizes errors to specific steps.

The reason for this shift is that the way errors propagate has changed. Writing a statute name incorrectly may only leave a textual error; treating a repealed provision as current law, or treating a lower-level norm as a higher-level one, may alter subsequent rule selection, fact application, and remedy recommendations. The risk of agents therefore comes not only from fabrication, but also from finding real materials but using them incorrectly, calling the right tool but filling in wrong parameters, or seeing relevant results but misreading the scope of their support.

LexAgentHallu therefore checks step by step along the execution trajectory: how the system plans, what tools it calls, what results it reads, what information it retains, and how it connects facts with rules. Evaluation no longer only asks whether the conclusion is correct, but also checks whether the reasons supporting the conclusion are true, accurate, and internally consistent.

How the Benchmark Is Built: Hard Cases, Verifiability, and a Two-Layer Taxonomy

LexAgentHallu establishes a two-layer taxonomy. The first layer focuses on legal content itself, including errors in legal sources, legal principles, procedural rules, and fact application; the second layer focuses on the agent execution process, including errors in planning and reasoning, memory, and tool invocation and interpretation of observations. Together, the two layers contain 7 mid-level categories and 27 fine-grained subcategories.

The purpose of the taxonomy is not to give errors a new set of names, but to make problems localizable: fabricated legal sources require citation verification, fact-rule mismatches require rechecking the elements, tool parameter errors require constraining the invocation interface, and memory drift points to context management.

The benchmark construction revolves around hard cases and verifiability: the research team collected data from multiple types of legal tasks, filtered out easy samples, then had annotators with legal training backgrounds check answers, legal sources, and reasoning trajectories, and finally completed hallucination classification and expert review. The final collection includes 3,414 instances, covering 17 legal categories and 6 task types.

High Hallucination Rates Are Not a Marginal Phenomenon

The paper evaluated 18 closed-source and open-source agent configurations. The results show that even for the best-performing configuration, 89% of execution trajectories still had at least one hallucination; all systems had a legal content hallucination frequency of no less than 87.5%.

This set of results does not mean that all legal answers carry the same risk. What it shows is that in this evaluation, which emphasizes difficult samples and complete execution trajectories, current systems find it very difficult to maintain a clean, verifiable reasoning chain from beginning to end.

Models, tools, and orchestration methods also jointly change the error distribution. ReAct-style action-observation loops have an advantage in overall hallucinations and legal content hallucinations; legal-specific workflows are better at reducing process errors; the approach of planning in advance and then executing did not show a stable lead in this experiment. Therefore, when deploying agents, models, tools, and processes cannot be evaluated separately.

If the Answer Is Right, Why Are the Reasons Still Untrustworthy?

The paper proposes the RAWR metric, namely Right-Answer-Wrong-Reason, which only looks at samples with correct final answers and then checks whether hallucinations still exist in the execution trajectories of these samples. The results show that even when the answer is correct, on average 68% of trajectories still contain at least one type of legal content hallucination, and 37% of trajectories contain at least one type of agent process hallucination.

A correct answer only shows that the conclusion hit the mark; it cannot prove that the reasoning chain is clean. For applications such as legal consultation, contract review, and litigation assistance, users need not just a sentence that looks correct, but also a chain of reasons that can be traced, verified, and withstand questioning. If the system only gives conclusions at the output end without exposing the quality of citations, reasoning, and tool calls, errors may continue to persist under the appearance of a correct answer.

Hallucination frequencies are not uniform across tasks. Open-ended, long-chain tasks that require integrating facts and rules are more likely to expose legal content and process errors: the legal content hallucination frequency for judgment analysis reached 1.00, and for case analysis 0.95; among process hallucinations, judgment analysis reached 0.83 and judgment prediction 0.71. Shorter outputs are not necessarily safe—as long as a task requires multi-step evidence integration, deadline judgment, or rule application, planning and memory can still become risk points.

Errors Appear Together, and Defenses Must Move Forward

The paper also analyzed the co-occurrence relationships among 27 fine-grained hallucination subcategories, and the results show that these errors are not random scattered points, but form structured combinations. The co-occurrence lift between procedural deadline errors and remedy path errors reached 2.82, and between procedural step errors and procedural consequence errors reached 2.59; the strongest cross-group signal appeared between legal source hierarchy errors and legal stance confusion, with a lift of 7.07.

This means that many seemingly scattered errors may share the same upstream cause: once the legal source hierarchy is judged incorrectly, subsequent rule stances and fact application may shift together; once the procedural clock is miscalculated, deadlines, steps, and remedy paths may also go wrong in succession. For system governance, high-risk errors can be regarded as early signals—once anomalies are detected in legal source hierarchy, deadline calculation, procedural steps, or fact-element mapping, secondary retrieval, rule verification, or human review should be triggered, rather than passively correcting errors after the final answer is generated.

In products, an agent needs at least three checks: clarify boundaries before generation, confirming the applicable jurisdiction, task scope, and answerability, and not directly giving definitive judgments when jurisdiction, limitation periods, or procedural paths are unclear; verify grounds during execution, continuously checking retrieval results, cited sources, key facts, and tool return values; check consistency before output, verifying the validity of legal sources, procedural deadlines, constitutive elements, and remedy paths. The evaluation target should also expand from a single model to the model-tool-workflow as a whole.

The paper also cautions against overgeneralization: LexAgentHallu is mainly based on the Chinese legal system and focuses on single-agent scenarios; when transferred to common law, multi-jurisdiction retrieval, or multi-agent collaboration, the authority of legal sources, application of precedents, and procedural rules all need to be redefined.

Credibility boundary

All information in this article comes from Machine Heart's report on the HKUST paper LexAgentHallu. It is a second-hand account and the original paper was not independently verified. All numbers in the text (3,414 instances, 17 legal categories, 6 task types, 7 mid-level categories, 27 subcategories, 18 configurations, 89%, 87.5%, 68%, 37%, 1.00, 0.95, 0.83, 0.71, 2.82, 2.59, 7.07) come from that report and should be regarded as source claims rather than confirmed facts.

Insight takeaway

The value of LexAgentHallu is not in proving that legal agents are unusable, but in breaking hallucinations down into localizable, actionable failure types: at which step the error occurs, which category it belongs to, and whether it will contaminate subsequent steps. When a correct answer no longer equals trustworthy reasons, both evaluation and product defenses must move forward from the output end to the execution chain.

Primary report

机器之心

Primary source