Mitigating Legal Hallucinations via Symbolic Constraints and Analogical Precedents
Zixuan Huang, Yanxiang Ma, Luhan Wang, Yunke Wang, Duo Shi, Chang Xu
Abstract
With the growing potential of large language models (LLMs) in the legal domain, domainspecific finetuning and retrieval-augmented generation (RAG) methods have received widespread attention. However, current methods still suffer from hallucination risk and failing to resolve semantic drift and adapt to varying citation numbers. To address this, we propose Authoritative and Accurate Lawyer (AALawyer), a complementary dual-retriever framework based on the Legal Syllogism and the nature of different legal data. First, we introduce Symbolic Constrained Retrieval (SCR) for closed-set article retrieval, by constraining retrieval to the generative prediction. Second, we build Analogical Precedent Retrieval (APR) to retrieve open-set judicial precedents for reasoning with a newly collected large criminal dataset. Extensive experiments, including Law-Bench, our Hallucination Risk-Benchmark, and comprehensive ablation studies, demonstrate the effectiveness of AALawyer, which mitigates hallucinations while improving the explainability of legal reasoning. Code is available here.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 396d542e-8445-4cd6-bbd7-57112a28a71eBuilds on20
- Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksPatrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni et al.NeurIPS 2020 · 19,162 citations
- LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
- Autoregressive Search Engines: Generating Substrings as Document IdentifiersMichele Bevilacqua, Giuseppe Ottaviano, Patrick Lewis, Scott Yih et al.NeurIPS 2022 · 242 citations
- JEC-QA: A Legal-Domain Question Answering DatasetHaoxi Zhong, Chaojun Xiao, Cunchao Tu, Tianyang Zhang et al.AAAI 2020 · 212 citations
- Autoregressive Entity RetrievalNicola De Cao, Gautier Izacard, Sebastian Riedel, Fabio PetroniICLR 2021 · 200 citations
Related papers
- Learning Interpretable Legal Case Retrieval via Knowledge-Guided Case ReformulationChenlong Deng, Kelong Mao, Zhicheng DouEMNLP 2024 · 3 citations
- Syllogistic Reasoning for Legal Judgment AnalysisWentao Deng, Jiahuan Pei, Keyi Kong, Zhe Chen et al.EMNLP 2023 · 17 citations
- LegalSearchLM: Rethinking Legal Case Retrieval as Legal Elements GenerationChaeeun Kim, Jinu Lee, Wonseok HwangEMNLP 2025 · 4 citations
- UniLR: Unleashing the Power of LLMs on Multiple Legal Tasks with a Unified Legal RetrieverAng Li, Yiquan Wu, Yifei Liu, Ming Cai et al.ACL 2025
- Automating Legal Interpretation with LLMs: Retrieval, Generation, and EvaluationKangcheng Luo, Quzhe Huang, Cong Jiang, Yansong FengACL 2025 · 4 citations
