Legal reasoning improved by combining expert graph retrieval and chain of thought
LEGO: Synergizing Expert GraphRAG and Expert Chain-of-Thought for Legal Reasoning
Computation and LanguageInformation Retrieval
Summary
Legal reasoning is hard because laws are complex and connected in special ways. The authors made a system called LEGO that uses a map of laws and a step-by-step thinking process to better answer legal questions. This system looks at specific legal rules and facts carefully to come up with conclusions, doing better than other methods. It works well especially for tricky multi-step legal questions, making it easier for AI to reason about the law.
What this means in practice
- •For legal tech developers: Build AI tools that answer complex civil law questions by effectively linking legal provisions with case facts using a structured reasoning approach.
- •For compliance teams: Improve automated legal compliance checks by integrating provision-specific retrieval and reasoning over regulatory texts.
Authors
Qingjing Chen, Junkai Zhang, Shaochun Wang, Jiahao Ding, Siyuan Zheng, Yukun Yan, Zhi Zheng, Antonino Rotolo, Yun Liu, Weixing Shen
Abstract
Large language models are increasingly applied to high-risk domains such as law, yet complex legal reasoning remains limited by two structural challenges. First, existing RAG and GraphRAG methods emphasize lexical or semantic similarity while overlooking normative relations among legal provisions. Second, vanilla Chain-of-Thought prompting may generate plausible rationales without enforcing the normative structure of legal reasoning. To deal with the bottleneck of pipelines in the legal reasoning domain, we propose LEGO, a dual-module framework that synergizes Legal Expert GraphRAG and expert Chain-of-thought for complex legal reasoning. ExpertGraphRAG uses an expert-annotated civil code graph encoding these normative relations with a greedy normative-coverage retrieval algorithm to dynamically extract instance-specific provision subgraphs, while ExpertCoT organizes the retrieved provisions and case facts into structured Provision-Fact-Conclusion reasoning. With a Qwen3-8B backbone, LEGO achieves 40.53% exact-match accuracy on LawExamQA_Civil, outperforming the evaluated RAG and CoT baselines and performing comparably to the evaluated larger models, while remaining robust on multi-hop questions. It also achieves the best results among the evaluated baselines on the open-ended benchmarks. Ablation studies confirm the individual and complementary contributions of both modules, demonstrating LEGO's effectiveness in improving LLMs' complex legal reasoning ability. Code and dataset can be found in the link: https://github.com/BLK-WHT/LEGO