Paper deep dive
LegalGraphRAG: Multi-Agent Graph Retrieval-Augmented Generation for Reliable Legal Reasoning
Zerui Chen, Qinggang Zhang, Zhishang Xiang, Zhimin Wei, Linfeng Gao, Xiao Huang, Zhihong Zhang, Jinsong Su
Intelligence
Status: succeeded | Model: Gemma-4-26B-A4B | Prompt: intel-v1 | Confidence: 93%
Last extracted: 7/8/2026, 9:28:33 PM
Summary
LegalGraphRAG is a novel framework for reliable legal reasoning that combines a hierarchical legal graph (HierarGraph) with a multi-agent system (Researcher, Auditor, Adjudicator) to address the limitations of flat RAG in handling heterogeneous legal corpora and ensuring verifiable, evidence-based judgments.
Entities (10)
Relation Signals (10)
LegalGraphRAG → uses → HierarGraph
confidence 97% · LegalGraphRAG consists of two key components: (i) Hierarchical legal graph (HierarGraph), which organizes legal knowledge into a hierarchical graph
HierarGraph → contains → Rule Graph
confidence 95% · The HierarGraph is composed of three specialized subgraphs: ... Rule Graph (G rul )...
HierarGraph → contains → Fact Graph
confidence 95% · The HierarGraph is composed of three specialized subgraphs: Fact Graph (G fac )...
HierarGraph → contains → Ontology Graph
confidence 95% · The HierarGraph is composed of three specialized subgraphs: ... Ontology Graph (G ont )...
Auditor → verifiesusing → Rule Graph
confidence 94% · we verify its applicability by evaluating the case facts using the associated Diagnostic Checklist and Judicial Interpretations encoded in the G rul
Researcher → retrievesfrom → Ontology Graph
confidence 93% · Researcher perform structured evidence retrieval over the G ont and the G fac
Researcher → retrievesfrom → Fact Graph
confidence 93% · Researcher perform structured evidence retrieval over the G ont and the G fac
Adjudicator → synthesizesfrom → Auditor
confidence 92% · Auditor rigorously verifies its validity against source documents, and an Adjudicator synthesizes the set of verified evidence to render a final judgment
LegalGraphRAG → evaluatedon → CAIL
confidence 90% · Table 2: Performance comparison on CAIL and CMDL.
LegalGraphRAG → evaluatedon → CMDL
confidence 90% · Table 2: Performance comparison on CAIL and CMDL.
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Graph-based Retrieval-Augmented Generation (GraphRAG) advances flat document retrieval by structuring knowledge as relational graphs, enabling more coherent and effective reasoning. However, applying it to specific domains like legal reasoning faces critical challenges. (i) Legal corpora are heterogeneous, containing multi-granular knowledge from cases, articles and interpretations. A flat knowledge graph cannot adequately differentiate between factual details, applied rules, and abstract principles, limiting accurate retrieval. (ii) Reliable legal judgment demands transparent, evidence-based reasoning. Traditional RAG passes retrieved context directly to an LLM without verification, resulting in opaque, error-prone reasoning. To this end, we propose LegalGraphRAG, a framework designed for reliable legal reasoning. Our approach introduces two core components: a hierarchical legal graph that hierarchically organizes legal sources to enable retrieval at appropriate abstraction levels, and a multi-agent system for reliable legal reasoning, where a Researcher retrieves candidate evidence, an Auditor rigorously verifies its validity against source documents, and an Adjudicator synthesizes the set of verified evidence to render a final judgment. Extensive experiments show that LegalGraphRAG achieves the state-of-the-art performance, outperforming existing GraphRAG baselines in accurate and trustworthy legal analysis. Our code, datasets and implementation details are available at this https URL.
Tags
Links
- Source: https://arxiv.org/abs/2605.28120v1
- Canonical: https://arxiv.org/abs/2605.28120v1
Trouble viewing inline? Open PDF directly →
Full Text
113,102 characters extracted from source content.
Expand or collapse full text
LegalGraphRAG: Multi-Agent Graph Retrieval-Augmented Generation for Reliable Legal Reasoning Zerui Chen 1 , Qinggang Zhang 3† , Zhishang Xiang 2 , Zhimin Wei 1 , Linfeng Gao 2 , Xiao Huang 3 , Zhihong Zhang 1† , Jinsong Su 1† 1 School of Informatics, Xiamen University 2 Institute of Artificial Intelligence, Xiamen University 3 The Hong Kong Polytechnic University chenzerui1@stu.xmu.edu.cn; qinggang.zhang@polyu.edu.hk; zhihong,jssu@xmu.edu.cn Abstract Graph-based Retrieval-Augmented Generation (GraphRAG) advances flat document retrieval by structuring knowledge as relational graphs, enabling more coherent and effective reason- ing. However, applying it to specific domains like legal reasoning faces critical challenges. (i) Legal corpora are heterogeneous, containing multi-granular knowledge from cases, articles, and interpretations. A flat knowledge graph cannot adequately differentiate between factual details, applied rules, and abstract principles, limiting accurate retrieval. (i) Reliable legal judgment demands transparent, evidence-based reasoning. Traditional RAG passes retrieved context directly to an LLM without verification, resulting in opaque, error-prone reasoning. To this end, we proposeLegalGraphRAG, a frame- work designed for reliable legal reasoning. Our approach introduces two core components: a hierarchical legal graph that hierarchically or- ganizes legal sources to enable retrieval at ap- propriate abstraction levels, and a multi-agent system for reliable legal reasoning, where a Re- searcher retrieves candidate evidence, an Audi- tor rigorously verifies its validity against source documents, and an Adjudicator synthesizes the set of verified evidence to render a final judg- ment. Extensive experiments show that Legal- GraphRAG achieves the state-of-the-art per- formance, outperforming existing GraphRAG baselines in accurate and trustworthy legal anal- ysis. Our code, datasets and implementation details are available athttps://github.com/ XMUDeepLIT/LegalGraphRAG. 1 Introduction The rapid advancement of Large Language Models (LLMs), like GPT (Achiam et al., 2023), Gem- ini (Comanici et al., 2025) and Qwen (Yang et al., 2025a) series, has driven significant progress in † Corresponding author. Domain-Specific Query: Please adjudicate the following cases: Defendant Zhang signed a labor contract ... serving as the head chef of the project department. His main responsibility was handling the financial... (a) Heterogeneous Knowledge Base (b) The Semantic Similarity Trap (c) Trust & Verification Issues Answer: Referencing the similar case (Fragment A), such acts of utilizing...with the provisions of Article 382...liable for the crime of Corruption. How can I trust this unexplainable verdict? This answer is risky. I missed the governing Rules needed to solve this. Legal Medical Financail Tree Graph Vector DB Flat Knowledge Construction Mixed Granularity Similarity ≠ Utility Blind Trust in Context Case A: defendant Bai has... (irrelavant) Article 271: Employees of... (relavant) Article 382: If a state functionary...(irrelavant) indexing Facts/Rules/Principles Figure 1: Challenges of Traditional RAG in Domain- Specific Tasks. (i) Flat Graph Structure: Struggles to handle heterogeneous documents. (i) Unverified Retrieval: Contains excessive irrelevant information. intelligent decision-making across various real- world tasks (Zhao et al., 2023; Naveed et al., 2025). However, deploying these models in specialized, knowledge-intensive fields like legal reasoning re- mains challenging due to the domain’s demand- ing standards of rigor and reliability (Lai et al., 2024; Hou et al., 2025; Siino et al., 2025). Domain- specific tasks necessitate a comprehensive under- standing and multi-step reasoning across a vast knowledge base of specialized concepts, rigorous rules, and complex dependencies (Wang et al., 2023; Kim et al., 2025), which requires strict logi- cal reasoning and domain expertise that exceed the capabilities of general-purpose LLMs. While Su- pervised Fine-Tuning (SFT) (Ouyang et al., 2022; Hu et al., 2022) on domain corpora enables mod- els to internalize that expertise, this approach in- arXiv:2605.28120v1 [cs.CL] 27 May 2026 Figure 2: Retrieval performance comparison revealing that conventional RAG methods struggle with hetero- geneous domain documents, suffering from high error rates and limited effectiveness. detailed experimental setup is introduced in Section 3.1 and Appendix A.3. curs substantial computational costs and often risks critical catastrophic forgetting in many real-world scenarios (Yue et al., 2024; Luo et al., 2025). Recently, Retrieval-Augmented Generation (RAG) (Lewis et al., 2020; Borgeaud et al., 2022; Li et al., 2025; Zhang et al., 2025b) offers a prac- tical solution to adapt LLMs for specific domains. RAG systems enable LLMs to generate responses by leveraging not only their parametric knowl- edge but also real-time retrieved domain knowl- edge, thereby providing more accurate and reli- able answers (Mallen et al., 2023; Zhang et al., 2025b). However, standard RAG systems typi- cally retrieve information based on semantic simi- larity (Karpukhin et al., 2020; Chen et al., 2024), treating documents as independent text segments. This hinders complex multi-hop reasoning over hi- erarchical legal concepts and multiple documents, limiting effectiveness in legal analysis. Graph-based Retrieval-Augmented Generation (GraphRAG) (Edge et al., 2024; Zhang et al., 2025a; Xiang et al., 2025; Yang et al., 2026) ad- vances this paradigm by organizing domain corpora into structured relational graphs. This structural awareness captures hierarchical relationships be- tween different concepts, thereby enabling more precise retrieval and supporting the multi-hop rea- soning required for complex queries. However, directly applying standard GraphRAG to the legal domain faces critical challenges (as illustrated in Figure 1):❶A flat graph structure cannot cap- ture the multi-granular hierarchies present in legal corpora, which span factual details, applied rules, and abstract principles across legal cases, articles, and interpretations, thereby limiting accurate re- trieval.❷Lack of verifiable, evidence-based rea- soning. Traditional RAG passes retrieved context directly to an LLM without any verification. This “retrieve-then-generate” pipeline often results in opaque, error-prone reasoning. In this paper, we propose LegalGraphRAG, a novel framework that synergizes graph-based retrieval with the multi-agent reasoning system for reliable legal reasoning. Specifically, Legal- GraphRAG consists of two key components: (i) Hierarchical legal graph (HierarGraph), which or- ganizes legal knowledge into a hierarchical graph to effectively decouple historical cases, relevant statutes, and judicial interpretations, and (i) a multi-agent system for evidence-based reason- ing (?Xiang et al., 2026), where the legal judgment process is structured as a transparent pipeline that retrieves, verifies, and reasons over graph-grounded evidence to produce interpretable decisions. Gener- ally, our contributions are summarized as follows: •We propose LegalGraphRAG, an evidence- based legal reasoning framework driven by a multi-agent system operating on a hierar- chical knowledge graph, which address legal heterogeneity and ensure reliable reasoning. •We design a hierarchical legal knowledge graph with Ontology, Fact, and Rule layers to model multi-granular legal knowledge and support accurate retrieval. •We establish a multi-agent system for evidence-based reasoning that performs ad- judication through a transparent pipeline of retrieval, validation, and synthesis, grounding judgments in verifiable evidence chains. •Extensive experiments show that Legal- GraphRAG consistently outperforms existing GraphRAG baselines and legal language mod- els in accurate and trustworthy legal analysis. 2 Problem Statement Complex legal reasoning is formulated as an open- ended generation task evaluating the decision- making capabilities of LLMs within the legal do- main. Formally, given a criminal fact descriptionf and a defendantd, a LLM is tasked with predicting the applicable chargesy. In this paper, we focus on integrating this reasoning framework with RAG to assess the model’s ability to leverage external legal knowledge for judicial reasoning. This task can be organized into the following stages: Knowledge Organization. Given an offline corpus of legal documentsD, including historical cases, articles and interpretations we construct a domain- specific legal knowledge graph: KG = Φ(D),(1) where Φ(·) denotes the organization function. Knowledge Retrieval. For a legal query charac- terized by criminal factsfand a defendantd, we retrieve relevant evidence fromKGto form a con- textual reference: C =R(f,d,KG),(2) whereR(·) represents the retrieval operator. Judgment Generation. Finally, the legal judgment (e.g., charge)yis inferred by reasoning over the query and retrieved evidence: P (y | f,d,C) =G(f,d,C),(3) whereG(·) denotes the generator LLM. 3 Preliminary Study Applying standard retrieval paradigms to the spe- cialized, knowledge-intensive legal domain faces critical challenges due to the inherent structural complexity and rigorous standards of such fields. To illustrate these challenges, we conduct two pre- liminary experiments to empirically investigate the specific limitations of existing methods regarding knowledge granularity and generation quality. 3.1 Investigation on Knowledge Granularity Complex domain knowledge possesses an inherent hierarchy. In the legal context, this necessitates dis- tinguishing between abstract statutory principles and concrete case facts. We hypothesize that stan- dard retrieval strategies fail to distinguish between these semantic granularities because they treat all text segments in the same way. To verify this, we compare a Flat Strategy against a naive Hierarchi- cal Strategy that explicitly segregates articles from case narratives (detailed in Appendix A.3). As illustrated in Figure 2, the empirical results confirm our hypothesis. Flat Strategy exhibit a distinct “granularity bias”, frequently prioritizing high-frequency factual details due to surface-level semantic overlaps, often at the expense of essential abstract principles. Conversely, Hierarchical Strat- egy aligns better with the domain’s logical structure, improving retrieval performance by 25.3%. This observation suggests that structural flatness consti- tutes a fundamental bottleneck for standard RAG when handling multi-granular knowledge. 3.2 Investigation on Generation Quality Reliable domain reasoning demands not only in- formation retrieval but also evidence verification. Real-world legal environments often contain docu- ments that share similar keywords but differ funda- mentally in their domain applicability. To simulate this realistic challenge, we conduct a test (detailed in Appendix A.4). Specifically, we inject legally plausible but factually irrelevant documents into the retrieval context to evaluate the model’s ability to focus on relevant evidence. ChargeArticlesTerm of Penalty Method ACC↑ ∆ ACC↑ ∆ MAE↓ ∆ (%)(%)(months) RAG (Correct Context)42.8–74.7–24.3– RAG + 2 Irrelevant Docs34.9↓ 7.957.2↓ 17.527.7↑ 3.4 RAG + 4 Irrelevant Docs32.9↓ 9.951.1↓ 23.628.4↑ 4.1 RAG + 6 Irrelevant Docs29.8↓ 13.046.8↓ 27.931.7↑ 7.4 Table 1: Performance degradation under varying levels of simulated retrieval noise. ACC (↑) denotes Accuracy for Charge and Articles prediction. MAE (↓) represents Mean Absolute Error for Term of Penalty. As summarized in Table 1, standard RAG mod- els exhibit significant sensitivity to context purity. The inclusion of irrelevant information precipitates a sharp performance drop. This observation shows that without a dedicated verification mechanism to filter irrelevant content, the model struggles to distinguish valid evidence from misleading infor- mation, which undermines reasoning reliability. 3.3 Discussion and Motivation The findings from these two studies highlight fun- damental limitations in applying standard RAG to complex domains:❶Flat retrieval mechanisms fail to navigate the hierarchical nature of domain knowledge (e.g., distinguishing rules from facts), resulting in biased context.❷The lack of an ex- plicit verification step makes the system fragile to misleading information, which is unacceptable in rigorous fields like law. These insights motivate the design of LegalGraphRAG, which incorporates a Hierarchical Legal Graph to resolve granularity conflicts and a Evidence-based Legal Reasoning (Researcher-Auditor-Adjudicator) framework to en- force rigorous verification. 4 The Framework of LegalGraphRAG 4.1 Overview Traditional GraphRAG approaches face limitations in legal judgment due to the heterogeneous and HierarGraph Defendant Zhang signed a labor contract with the Xiangjiaba Hydropower Station Yaojiaba Tunnel Project Department of the original Sichuan Road and ... Query Researcher Case Feature Candidate charges D: Employee... C: Misappropriation of funds... V: Company funds... M: Subjective intent... Embezzlement, Misappropriation of funds... Stage1: Exploring Heterogeneous Legal Knowledge Mapping to legal essence Predict directly A2 J4 A1 J1 J3 J2 O2 C4 C2 A1 O1 C1 C3 A2 F2 F3 Com1 F6 F4 F5 Com2 F1 Ontology Graph Fact Graph Rule Graph : Community Node : Case Node : Case Feature Node : Offence Node : Article Node(G i ) : Article Node(G e ) : Judicial Interpretation Node Symbols : Forward Process : Edges between nodes The defendant Zhang Mou entered into a labor contract with the ... serving as the head chef of the project department. His main responsibility was handling the financial reimbursement for the monthly expenses of all canteens ... Query Article 382 State functionaries who, taking advantage of their office, misappropriate, steal, swindle, or use other illegal means to take possession of public property are to be convicted of the crime of embezzlement... Article 271 Final Context Final Results Charge: job-related embezzlement Articles: 271 Imprisonment: 18 Resoning: Zhang served as the head chef of the project department and was ... [1] corresponds to Article 271 Paragraph 1... [2] corresponds to Cases1([Charges: job-related embezzlement] [Name: Xu 3Mou])... Searched Results A1 C2 C3 A2 C4 A1 C2 C3 A2 C4 Auditor Adjudicator Stage2: Evidence-Based Reasoning ..."state functionaries" refers to persons performing public service... Judicial Interpretation Chef is not State functionaries Fine-grained Evidence Check Prune Irrelevant Documents Figure 3: The architecture of LegalGraphRAG. The framework consists of two main phases: (1) Hierarchical Knowledge Construction, which builds a Hierarchical Legal Graph (HierarGraph) comprising an Fact Graph, Ontology Graph and Rule Graph to organize heterogeneous legal knowledge; and (2) Evidence-based Legal Reasoning, where a multi-agent system (Researcher, Auditor, and Adjudicator) performs structured retrieval, validation, and synthesis over the HierarGraph to generate interpretable legal decisions. multi-granular nature of legal corpora. To address this challenge, We propose LegalGraphRAG, an evidence-based legal reasoning framework driven by a multi-agent system operating on a hierarchical knowledge graph. The framework operates in two distinct phases: (i) Hierarchical Knowledge Con- struction, which organizes legal knowledge into a layered graph structure to effectively decouple historical cases, relevant statutes, and judicial in- terpretations, and (i) Evidence-based Legal Rea- soning, structures the legal judgment process as a transparent pipeline that retrieves, verifies, and reasons over graph-grounded evidence to produce interpretable decisions. The whole framework is illustrated in Figure 3. 4.2 Hierarchical Knowledge Construction Legal reasoning involves heterogeneous informa- tion sources, including historical cases, abstract legal articles, and interpretations. Employing a flat storage structure is not enough to handle the in- herent structural differences of these data sources, leading to disorganized information and inefficient retrieval. To address this challenge, we construct a Hierarchical Legal Graph (HierarGraph)Hthat organizes legal knowledge into distinct semantic layers, enabling explicit differentiation among le- gal concepts and providing a structured basis for reliable reasoning. The HierarGraph is composed of three specialized subgraphs: Fact Graph (G f ac ), which serves as a structured collection of verified legal precedents, providing the essential factual basis for ensuring legally grounded judgments. Accordingly,G fac models the natural structure of legal documents by explicitly connecting Cases (C), Articles (A), and Offense (O) nodes. Relationships are established viae ca , linking a casecto its cited articlea, ande co , linking a casecto its convicted offenseo. This structure provides the factual granularity required for evi- dence gathering. Formally, it is defined as: G fac = (V fac ,E fac ) = c i ,a i ,o i |G fac | i=1 .(4) Ontology Graph (G ont ), which bridges the seman- tic gap and mitigates noise by abstracting case features.G ont distills raw narratives containing instance-specific details (e.g., dates and locations) into a purified semantic space that reflects the “legal essence”. Specifically, we design a domain-specific legal ontology based on legal theory (Rüthers et al., 2013), encompassing four key dimensions: Defen- dant Attributes, Criminal Behaviors, Victim Char- acteristics and Subjective Mental States. Keywords and entities are extracted and aligned with these properties to form structured embeddings, serving as indices for Case Feature Nodes (F ). To reveal hidden connections between different cases, we employ the k-Nearest Neighbors (k-N) algorithm to connect nodes with high semantic sim- ilarity. We then apply the Leiden algorithm (Traag et al., 2019) to group related cases into communi- ties, each treated as a Community Node (K). Each kcontains the summarized information of the cases inside it, facilitating hierarchical retrieval that navi- gates from broad contexts to specific details. For- mally, this subgraph is defined as: G ont = (V ont ,E ont ) = c i ,k j |G ont | i=1,j=1 .(5) Rule Graph (G rul ), which resolves statutory am- biguities by systematically linking Articles (A) with its corresponding Judicial Interpretations (J). This explicit alignment establishes the contextual grounding necessary for precise legal reasoning. Moreover, applying the correct article often de- pends on specific conditions. A small difference can lead to a completely different judgment for the same crime. (e.g. whether the defendant is an adult or a minor). Simple semantic matching often fails to distinguish these subtle differences. To address this, we equip eachawith a Diagnostic Checklist (D). This mechanism breaks down complex legal rules into specific verification steps. Formally, this subgraph is defined as: G rul = (V rul ,E rul ) = a i ,j i |G rul | i=1 .(6) where D(a i ) =d 1 ,...,d |C| (7) By integrating these three layers, HierarGraph Htransforms heterogeneous legal corpora into a structured ecosystem. This architecture directly addresses the limitations of flat retrieval by offer- ing multi-granular support for following evidence- based legal reasoning. The detailed construction procedures are provided in Appendix B.1. 4.3 Evidence-based Legal Reasoning To leverage the multi-granular knowledge encoded in our HierarGraph, we propose a multi-agent sys- tem for evidence-based reasoning, in which spe- cialized agents sequentially traverse the graph to perform evidence retrieval, validation, and synthe- sis. Specifically, the workflow consists of three agents:1) Researcher, 2) Auditor, and 3) Adjudica- tor. Through structured graph traversal and logical analysis, the framework resolves the raw case query by constructing a final, verifiable judgment. 4.3.1 Evidence Retrieval A reliable evidence-based reasoning process begins with grounding a raw case description in relevant legal evidence. To this end, Researcher perform structured evidence retrieval over theG ont and the G fac , transforming unstructured case narratives into a coherent set of related Cases (C) and Articles (A). Specifically, the Researcher aligns the case de- scription with the ontological dimensions defined in Section 4.2. Based on these features, We for- mulate the evidence retrieval processR(q)as the union of three operators, whereqis the legal query: R(q) =R sem (q)∪R com (q)∪R chg (q)(8) First, we employ Semantic Match Retrieval to lo- cate direct evidence via semantic similarity, where φ(·) denotes ontology-aligned embeddings: R sem (q) = Top-k c∈G ont sim φ(q),φ(c) (9) Next, to capture structural context, we conduct Community Expansion Retrieval. We first identify the top-ranked communities by topicS K aligned with the query, and then retrieve the most similar cases within these communities: K ∗ = argmax K∈G ont sim φ(q),φ(K) R com (q) = Top-k c∈K ∗ sim φ(q),φ(c) (10) Finally, we implement Charge-Anchored Re- trieval to anchor the legal basis by collecting cases linked to inferred charges. Here,O(q)denotes the set of predicted charges andNrepresents the neighboring cases connected to charge o inG f ac : R chg (q) = [ o∈O(q) N G fac (o)(11) The specific retrieval algorithms and parameter settings are detailed in Appendix B.2. 4.3.2 Evidence Validation Given the candidate evidence retrieved in the Ev- idence Retrieval, this stage focuses on validating whether the case facts genuinely satisfy the con- ditions required by the law, rather than relying on surface-level semantic relevance. Specifically, for each candidate article, we verify its applicability by evaluating the case facts using the associated Diagnostic Checklist and Judicial Interpretations encoded in theG rul . The verifica- tion outcomes are then aggregated to produce a definitive applicability judgment for each article. Based on these judgments, Auditor filters the retrieval subgraph by pruning inapplicable articles and their associated case and charge nodes. Finally, CAILCMDLAverage ModelSize Public SafetyEconomicSocial OrderPerson RightsPublic SafetyEconomicSocial OrderPerson Rights All∆ACC / F1ACC / F1ACC / F1ACC / F1ACC / F1ACC / F1ACC / F1ACC / F1 Open-Source Models Qwen-2.5-7B-Instruct7B-Inst24.045.823.142.522.936.727.446.025.832.428.735.827.242.132.849.626.7↑ 22.8 Qwen-3-8B8B-Inst 31.749.225.842.726.339.827.647.844.052.344.753.142.751.953.057.735.2↑ 19.9 Internlm3-8b-instruct8B-Inst29.849.126.742.025.234.328.147.325.432.135.737.027.536.234.153.626.6↑ 22.9 Glm-4-9b-chat9B-Inst18.433.719.736.115.832.126.044.523.534.223.640.819.137.041.547.021.2↑ 28.2 Advanced Models GPT-4o-mini∼8B19.735.519.633.315.535.229.046.318.028.022.731.921.932.035.950.328.4↑ 21.1 DeepSeek-V3.1∼200B31.051.329.048.429.850.235.254.835.064.054.762.758.261.962.571.642.8↑ 6.7 Legal Specific Methods DISC-LawLLM-7B7B-Inst40.150.931.051.534.847.734.556.049.753.639.652.130.349.548.463.330.3↑ 19.1 ADAPT7B-Inst38.743.732.743.427.641.735.250.754.558.857.159.440.943.461.562.142.8↑ 6.7 Legal ∆7B-Inst40.850.625.137.432.143.734.153.658.361.551.855.850.254.865.864.442.4↑ 7.1 RAG Based Methods Naive RAG8B-Inst31.045.724.438.728.138.434.546.845.857.344.855.246.858.549.657.833.3↑ 16.1 G-retriever8B-Inst33.848.026.039.823.839.332.650.136.840.042.548.845.350.746.252.434.4↑ 13.2 LightRAG8B-Inst20.443.621.742.519.042.526.950.637.950.143.245.144.251.343.746.930.5↑ 19.0 RAPTOR8B-Inst34.650.431.643.932.145.632.445.753.862.653.660.152.562.852.166.943.1↑ 6.3 HippoRAG28B-Inst34.538.224.033.528.835.031.036.353.556.550.652.753.555.062.462.843.1↑ 6.3 LegalGraphRAG (Ours)8B-Inst42.954.338.553.637.651.137.258.365.566.559.865.158.563.770.172.749.5– Table 2: Performance comparison on CAIL and CMDL. We employ Qwen3-8B as the default backbone model. The best results are highlighted in bold, and the second-best areunderlined. We visualize the gains of LegalGraphRAG over each baseline in the∆ columns . it organizes the remaining nodes into a legally con- sistent and evidence-supported subgraph, which serves as a validated knowledge basis for subse- quent decision-making. Further implementation details can be found in Appendix B.2. 4.3.3 Evidence Synthesis In the final stage, the validated evidence produced in the previous steps is synthesized to derive a legally grounded judgment. Based on the verified subgraph, Adjudicator integrates the confirmed ar- ticles (A f ), cases (C f ), and offense information (O f ) to determine the applicable charges and their statutory basis. This process is formulated as: J = Adjudicator(q⊕A f ⊕C f ⊕O f )(12) Crucially, the judgment is not produced as a di- rect verdict. Instead, it is accompanied by explicit citations to the statutory articles and judicial inter- pretations used in the reasoning process, ensuring that every conclusion is directly traceable to veri- fied evidence in the HierarGraph. Overall, LegalGraphRAG formulates legal judg- ment as a transparent, evidence-based reasoning pipeline rather than a black-box generation process. Through sequential evidence grounding, validation, and synthesis, the system enforces stepwise verifi- cation and ensures that every conclusion is explic- itly derived from and supported by verified legal evidence, resulting in reliable judicial decisions. 5 Experiment This section presents a comprehensive evaluation of LegalGraphRAG on two legal judgment bench- marks. Our experiments are designed to answer the following three questions. Q1 (Generation Accu- racy): Does LegalGraphRAG outperform SOTA GraphRAG methods and leading legal-domain LLMs in generation quality? Q2 (Case Study): How does LegalGraphRAG handle specific legal cases, and does it provide more interpretable out- puts compared to baselines? Q3 (Ablation Study): What is the contribution of each core component to the final performance of LegalGraphRAG? More additional experiments are provided in Appendix C 5.1 Experiment Setup Datasets We evaluate on two widely used legal benchmarks: CAIL2018 (Xiao et al., 2018) and CMDL (Huang et al., 2024), covering diverse crim- inal sub-fields such as Public Safety, Social Order, Economic Offenses, and Person Rights. The re- trieval knowledge base is built from a collection of authoritative legal sources, including case datasets and statutory texts. Further dataset details are pro- vided in Appendix D.1 & D.2. Baselines To ensure a comprehensive evalua- tion, we categorize our comparative experiments into four distinct groups: (i) Open-Source Mod- els, utilizing Qwen-series (Yang et al., 2025a), In- ternLM (Fei et al., 2025) and GLM (GLM et al., 2024) as foundational backbones; (i) Advanced Query Please render a judgment against the defendant Zhang based on the following facts: “Defendant Zhang signed a labor contract ... On December 19, 2016, the Yaojiaba Tunnel Project Department transferred 98,160 yuan into Zhang's account after the canteen expense reimbursement. Zhang withdrew 95,000 yuan ... and took an additional 3,000 yuan the following day.” Answer Charge: job-related embezzlement Article: 271 Imprisonment: 18 months Answer Charge:Embezzlement Article: 382 Imprisonment: 36 months Answer Charge:Embezzlement Article: 382 Imprisonment: 36 months Answer Charge: Job-Related Embezzlement Article: 271 Imprisonment: 18 months RAG Based Methods Legal Syllogism Based Methods IndexingRetrieval and Inference Major premise Minor premise GraphRAGEvidence-Based Reasoning HierarGraph Multi-Agent Reasoning Execution Process Tree Graph Vector DB Flat Knowledge Construction Similarity: 0.94 Content: defendant Bai has... Similarity: 0.92 Content: From 2009 to 2011... Similarity: ... Content: ... Similarity: 0.79 Content: Article 271 ... Missing key Articles for reasoning Due to a lack of key knowledge, I am unable to perform credible reasoning. Considering relevant articles Obstacles encountered during reasoning due to a lack of external knowledge. Article 382: If a state functionary... Article 383: Those who commit... Article 385: A state functionary... Article 271: Employees of... Missing Articles because of Model bias Reasoning with fact According to Article 382, I need to first check whether the defendant is a state employee, but I do not know the definition of a state employee? ResearcherAuditorAdjudicator Searching Cases and Articles in HierarGraph Article 382: If a state functionary... Article 271: Employees of... Case 1: defendant Bai has... Case 2: From 2009 to 2011... Auditor each Articles with Fact Final Judge Based on the Auditor’s result Article 382: If a state functionary... Article 271: Employees of... Case 1: defendant Bai has... Case 2: From 2009 to 2011... Defendant Zhang is found guilty of ... He was an employee of the project department [2] and used his position to illegally take possession of ... [1] Criminal Law, Article 271 [2] Criminal Law, Article 92 [3] Judici... Figure 4: A comparative case study illustrating the reasoning trajectories of different methods. While Naive RAG fails due to missing legal articles and syllogism-based methods struggle with ambiguities, LegalGraphRAG derives the correct judgment. By leveraging the HierarGraph and Evidence-based Legal Reasoning, our framework demonstrates transparency and reliability, providing a verifiable reasoning chain grounded in legal evidence. Figure 5: Retrieval Performance Comparison. Legal- GraphRAG demonstrates superior retrieval effectiveness and significantly lower error ratios compared to conven- tional flat graph baselines. Models, represented by GPT-4o-mini (Achiam et al., 2023) and DeepSeek-V3.1 (Liu et al., 2024). (i) Legal-Specific Methods, which in- clude domain-specialized approaches such as Disc- LLM (Yue et al., 2024), Legal∆(Dai et al., 2025), and ADAPT (Deng et al., 2024b); and (iv) RAG-Based Methods, encompassing Naive RAG and advanced graph-augmented strategies like G- retriever (He et al., 2024a), RAPTOR (Sarthi et al., 2024), LightRAG (Guo et al., 2024), and Hip- poRAG2 (Gutiérrez et al., 2025). Detailed con- figurations are provided in Appendix D.4. Evaluation Metrics We employ Accuracy and Micro-F1 score to evaluate prediction performance. Detailed definitions are provided in Appendix D.3. Implementation Details We utilize GPT-4o- mini for graph construction and BGE-m3 (Chen et al., 2024) for embedding generation. Various LLMs serve as backbone models for the reasoning phase. We employ Qwen3-8B (Yang et al., 2025a) as the default backbone model for our main experi- ments. Full hyperparameter settings and hardware specifications are detailed in Appendix D.5. 5.2 Generation Accuracy (Q1) To address Q1, we evaluate LegalGraphRAG against SOTA RAG methods and specialized le- gal LLMs on two legal judgment datasets. The primary comparison results for charge prediction are reported in Table 2, with extended analyses in Tables 4, 5, and 6 in Appendix. We summarize the key observations below. Obs.1. LegalGraphRAG consistently outper- forms baselines in legal datasets. Our method achieves the best results on most evaluation metrics across both datasets. Notably, LegalGraphRAG de- livers significant improvements ranging from 6.3% to 19.1% over the strongest baselines. Unlike stan- dard GraphRAG methods that struggle in the legal domain, our approach effectively structures het- erogeneous knowledge, thereby enhancing legal reasoning capabilities and improving charge pre- diction accuracy overall. Obs.2. LegalGraphRAG substantially surpasses existing specialized legal LLMs. Our approach outperforms Legal∆and ADAPT by an average of 1.3 8.0 13.4 12.3 38.1 14.3 20.1 19.2 19.6 2.4 0 5 10 15 20 25 30 35 40 45 G-retrieverLightRAGRaptorHippoRAG2LegalGraphRAG (Ours) Accuracy (%) Traceable CorrectUntraceable Correct 15.6 28.1 32.6 31.9 40.5 Figure 6: Reliability Analysis. LegalGraphRAG signif- icantly increases the proportion of Traceable Correct samples, effectively minimizing Untraceable Correct predictions where the answer is correct but lacks sup- porting evidence in the retrieved context. 7.1% and 6.7%, respectively. Moreover, as shown in Table 4 in Appendix, LegalGraphRAG integrates flexibly with different backbone models, achieving a peak performance of 78.7% on CMDL when com- bined with strong backbones. This demonstrates strong adaptability and robust reasoning compared to specialized legal-domain baselines. 5.3 Case Study (Q2) To demonstrate the superior interpretability of our framework, we present a qualitative analysis of a representative criminal case in Figure 4. More cases are provided in Appendix E. Obs.3. LegalGraphRAG retrieves significantly more relevant and comprehensive evidence. As illustrated in Figure 5, conventional flat graph struc- tures (e.g., HippoRAG2) struggle to handle hetero- geneous legal documents, often failing to capture essential statutes. This structural limitation leads to fragmented context. In contrast, our hierarchical organization effectively structures legal knowledge, ensuring that the retrieved context is sufficient to support robust reasoning. Obs.4. LegalGraphRAG guarantees decision traceability through rigorous evidence ground- ing. While baseline models often achieve cor- rect predictions, our reliability analysis (Figure 6) reveals a critical issue of “unsupported correct- ness”, where the model predicts the right charge but fails to retrieve the necessary supporting evi- dence. This implies that the prediction is not sup- ported by relevant evidence or a valid reasoning chain. LegalGraphRAG significantly increases the ratio of “Traceable Correct” samples (defined in Appendix A.5). By enforcing strict verification, our system ensures that every statute cited in the judg- CAIL SettingsACC∆ LegalGraphRAG (Full)40.9– w/o HierarGraph33.7↓ 7.2 w/o Researcher36.9↓ 4.0 w/o Semantic Match39.1↓ 1.8 w/o Community Exp.38.5↓ 2.4 w/o Charge-Anchored39.3↓ 1.6 w/o Auditor37.5↓ 3.4 Table 3: Ablation study of LegalGraphRAG compo- nents on the CAIL dataset. Results underscore the in- dispensable role of the HierarGraph for knowledge or- ganization and the synergy between the Researcher and Auditor agents in ensuring reasoning accuracy. ment is explicitly present in the retrieved context, transforming opaque predictions into transparent, traceable decisions. 5.4 Ablation Study (Q3) To quantify the impact of each component, we per- formed a systematic ablation study by removing specific modules from the full LegalGraphRAG framework. Results are detailed in Table 3. Obs.5. Hierarchical structure is the cornerstone of performance. Removing the hierarchical graph (w/o HierarGraph) causes the sharpest accuracy drop of 7.2%. This confirms that separating con- crete facts from abstract rules into distinct granular levels is essential, providing structural precision that flat indexing lacks. Obs.6. The multi-agent workflow guarantees reasoning reliability. Excluding the Researcher and Auditor degrades accuracy by 4.0% and 3.4%, respectively. This validates their synergis- tic roles: the Researcher maximizes evidence cov- erage through diverse retrieval strategies, while the Auditor enforces rigorous verification, ensuring only validated evidence supports the judgment. 6 Conclusion In conclusion, we have presented LegalGraphRAG, an evidence-based legal reasoning framework that addresses the critical challenges of legal hetero- geneity and reasoning reliability. By integrating a hierarchical knowledge graph with a collaborative multi-agent system, our approach transforms the le- gal reasoning process into a transparent pipeline of retrieval, verification, and synthesis. Extensive ex- periments on legal judgment benchmarks validate that LegalGraphRAG establishes a new state-of- the-art, significantly advancing accurate and trust- worthy AI for reliable and complex legal analysis. Limitation While LegalGraphRAG demonstrates significant proficiency in processing textual legal documents and statutes, its current scope is confined to uni- modal textual inputs. Real-world judicial proceed- ings, however, often rely on a heterogeneity of evidence types, including crime scene photogra- phy, surveillance footage, scanned handwritten doc- uments, and audio recordings of court hearings. Currently, our framework requires all non-textual evidence to be transcribed or described textually before processing, which may result in the loss of critical visual or auditory nuances essential for fact verification. For instance, distinguishing be- tween “inten” and “negligence” might sometimes rely on visual cues in surveillance video that tex- tual descriptions fail to capture fully. Extending the Hierarchical Legal Knowledge Graph to incor- porate multimodal nodes (e.g., embedding visual evidence into the Fact Graph) represents a promis- ing avenue for future research. Such an extension would enable the model to perform cross-modal reasoning, verifying textual testimony against vi- sual evidence, thereby moving closer to a holistic and robust “Smart Court” system. Ethics Statement We confirm that this study fully complies with the ACL Ethics Policy. Below, we address specific eth- ical considerations regarding the data and the ap- plication of our proposed model, LegalGraphRAG. Data Privacy and ComplianceOur experiments involve four publicly available datasets (CAIL2018, CMDL, JuDGE, and LeCaRDv2) and statutory texts. These resources are established benchmarks in the legal NLP community. We emphasize that all court judgments utilized in this work have been pre-processed and anonymized by the original data providers. Private details, including the real names of defendants and victims, have been removed or masked to ensure no personally identifiable infor- mation (PII) is exposed. We strictly use this data for academic research purposes and adhere to their respective data usage licenses. Bias and Fairness We acknowledge that mod- els trained on historical legal judgment data may inadvertently capture or amplify inherent biases present in the judicial system, such as those related to region or gender. While our work focuses on improving the logical reasoning and retrieval capa- bilities of legal LLMs through GraphRAG, where the outputs are interpreted with clear evidence. Intended Use and Misuse The proposed Legal- GraphRAG is designed as an assistive tool to sup- port legal professionals and researchers in retriev- ing precedents and analyzing case facts. It is not intended to replace human judges or lawyers, nor should it be deployed as a fully automated decision- making system in real-world judicial scenarios. The “prison term” and “judgment” predictions gen- erated by the model should be viewed as reference probabilities rather than enforceable verdicts. References Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Altman, Shyamal Anadkat, and 1 others. 2023. Gpt-4 techni- cal report. arXiv preprint arXiv:2303.08774. Sebastian Borgeaud, Arthur Mensch, Jordan Hoff- mann, Trevor Cai, Eliza Rutherford, Katie Milli- can, George Bm Van Den Driessche, Jean-Baptiste Lespiau, Bogdan Damoc, Aidan Clark, and 1 others. 2022. Improving language models by retrieving from trillions of tokens. In International conference on machine learning. PMLR. Jianlv Chen, Shitao Xiao, Peitian Zhang, Kun Luo, Defu Lian, and Zheng Liu. 2024. Bge m3-embedding: Multi-lingual, multi-functionality, multi-granularity text embeddings through self-knowledge distillation. arXiv preprint arXiv:2402.03216. Pierre Colombo, Telmo Pessoa Pires, Malik Boudiaf, Dominic Culver, Rui Melo, Caio Corro, Andre FT Martins, Fabrizio Esposito, Vera Lúcia Raposo, Sofia Morgado, and 1 others. 2024. Saullm-7b: A pioneer- ing large language model for law. arXiv preprint arXiv:2403.03883. Gheorghe Comanici, Eric Bieber, Mike Schaekermann, Ice Pasupat, Noveen Sachdeva, Inderjit Dhillon, Mar- cel Blistein, Ori Ram, Dan Zhang, Evan Rosen, and 1 others. 2025. Gemini 2.5: Pushing the frontier with advanced reasoning, multimodality, long context, and next generation agentic capabilities. arXiv preprint arXiv:2507.06261. Jiaxi Cui, Munan Ning, Zongjian Li, Bohua Chen, Yang Yan, Hao Li, Bin Ling, Yonghong Tian, and Li Yuan. 2023. Chatlaw: A multi-agent collaborative legal assistant with knowledge graph enhanced mixture- of-experts large language model. arXiv preprint arXiv:2306.16092. Xin Dai, Buqiang Xu, Zhenghao Liu, Yukun Yan, Huiyuan Xie, Xiaoyuan Yi, Shuo Wang, and Ge Yu. 2025. Legalδ: Enhancing legal reasoning in llms via reinforcement learning with chain-of-thought guided information gain. arXiv preprint arXiv:2508.12281. Hudson de Martim. 2025. Graph rag for legal norms: A hierarchical and temporal approach. arXiv preprint arXiv:2505.00039. Chenlong Deng, Kelong Mao, and Zhicheng Dou. 2024a. Learning interpretable legal case retrieval via knowledge-guided case reformulation. arXiv preprint arXiv:2406.19760. Chenlong Deng, Kelong Mao, Yuyao Zhang, and Zhicheng Dou. 2024b. Enabling discriminative rea- soning in llms for legal judgment prediction. arXiv preprint arXiv:2407.01964. Darren Edge, Ha Trinh, Newman Cheng, Joshua Bradley, Alex Chao, Apurva Mody, Steven Truitt, Dasha Metropolitansky, Robert Osazuwa Ness, and Jonathan Larson. 2024. From local to global: A graph rag approach to query-focused summarization. arXiv preprint arXiv:2404.16130. Zhiwei Fei, Xiaoyu Shen, Dawei Zhu, Fengzhe Zhou, Zhuo Han, Alan Huang, Songyang Zhang, Kai Chen, Zhixin Yin, Zongwen Shen, and 1 others. 2024. Law- bench: Benchmarking legal knowledge of large lan- guage models. In Proceedings of the 2024 conference on empirical methods in natural language process- ing. Zhiwei Fei, Songyang Zhang, Xiaoyu Shen, Dawei Zhu, Xiao Wang, Jidong Ge, and Vincent Ng. 2025. Internlm-law: An open-sourced chinese legal large language model. In Proceedings of the 31st Interna- tional Conference on Computational Linguistics. Sudipto Ghosh, Devanshu Verma, Balaji Ganesan, Purn- ima Bindal, Vikas Kumar, and Vasudha Bhatnagar. 2024. Inlegalllama: Indian legal knowledge en- hanced large language model. In International Joint Conference on Artificial Intelligence. Team GLM, Aohan Zeng, Bin Xu, Bowen Wang, Chen- hui Zhang, Da Yin, Dan Zhang, Diego Rojas, Guanyu Feng, Hanlin Zhao, and 1 others. 2024. Chatglm: A family of large language models from glm-130b to glm-4 all tools. arXiv preprint arXiv:2406.12793. Zirui Guo, Lianghao Xia, Yanhua Yu, Tu Ao, and Chao Huang. 2024.Lightrag: Simple and fast retrieval-augmented generation.arXiv preprint arXiv:2410.05779. Bernal Jiménez Gutiérrez, Yiheng Shu, Weijian Qi, Sizhe Zhou, and Yu Su. 2025. From rag to memory: Non-parametric continual learning for large language models. arXiv preprint arXiv:2502.14802. Zhang Han and Dou Zhicheng. 2023. Case retrieval for legal judgment prediction in legal artificial intelli- gence. In Proceedings of the 22nd Chinese National Conference on Computational Linguistics. Xiaoxin He, Yijun Tian, Yifei Sun, Nitesh Chawla, Thomas Laurent, Yann LeCun, Xavier Bresson, and Bryan Hooi. 2024a.G-retriever: Retrieval- augmented generation for textual graph understand- ing and question answering. Advances in Neural Information Processing Systems, 37:132876–132907. Zhitao He, Pengfei Cao, Chenhao Wang, Zhuoran Jin, Yubo Chen, Jiexin Xu, Huaijun Li, Kang Liu, and Jun Zhao. 2024b. Agentscourt: Building judicial decision-making agents with court debate simula- tion and legal knowledge augmentation. In Find- ings of the Association for Computational Linguis- tics: EMNLP 2024. Mengzhe Hei, Qingbao Liu, Sheng Zhang, Honglin Shi, Jiashun Duan, and Xin Zhang. 2024. A het- erogeneous graph based on legal documents and le- gal statute hierarchy for chinese legal case retrieval. IEEE Access, 12:93502–93516. Justin Ho, Alexandra Colby, and William Fisher. 2025. Incorporating legal structure in retrieval-augmented generation: A case study on copyright fair use. arXiv preprint arXiv:2505.02164. Zhitian Hou, Zihan Ye, Nanli Zeng, Tianyong Hao, and Kun Zeng. 2025. Large language models meet le- gal artificial intelligence: A survey. arXiv preprint arXiv:2509.09969. Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, Weizhu Chen, and 1 others. 2022. Lora: Low-rank adaptation of large language models. ICLR, 1(2):3. Wanhong Huang, Yi Feng, Chuanyi Li, Honghan Wu, Ji- dong Ge, and Vincent Ng. 2024. Cmdl: A large-scale chinese multi-defendant legal judgment prediction dataset. In Findings of the Association for Computa- tional Linguistics ACL 2024. Cong Jiang and Xiaolei Yang. 2023. Legal syllogism prompting: Teaching large language models for legal judgment prediction. In Proceedings of the nine- teenth international conference on artificial intelli- gence and law. Vladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick SH Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih. 2020. Dense passage re- trieval for open-domain question answering.In EMNLP (1), pages 6769–6781. Zixuan Ke, Fangkai Jiao, Yifei Ming, Xuan-Phi Nguyen, Austin Xu, Do Xuan Long, Minzhi Li, Chengwei Qin, Peifeng Wang, Silvio Savarese, and 1 others. 2025. A survey of frontiers in llm reasoning: Inference scal- ing, learning to reason, and agentic systems. arXiv preprint arXiv:2504.09037. Hyunjae Kim, Jiwoong Sohn, Aidan Gilson, Nicholas Cochran-Caggiano, Serina Applebaum, Heeju Jin, Seihee Park, Yujin Park, Jiyeong Park, Seoyoung Choi, and 1 others. 2025.Rethinking retrieval- augmented generation for medicine: A large-scale, systematic expert evaluation and practical insights. arXiv preprint arXiv:2511.06738. Jinqi Lai, Wensheng Gan, Jiayang Wu, Zhenlian Qi, and Philip S Yu. 2024. Large language models in law: A survey. AI Open, 5:181–196. Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Hein- rich Küttler, Mike Lewis, Wen-tau Yih, Tim Rock- täschel, and 1 others. 2020. Retrieval-augmented gen- eration for knowledge-intensive nlp tasks. Advances in neural information processing systems, 33:9459– 9474. Haitao Li, Yifan Chen, Hu YiRan, Qingyao Ai, Jun- jie Chen, Xiaoyu Yang, Jianhui Yang, Yueyue Wu, Zeyang Liu, and Yiqun Liu. 2025. Lexrag: Bench- marking retrieval-augmented generation in multi-turn legal consultation conversation. In Proceedings of the 48th International ACM SIGIR Conference on Research and Development in Information Retrieval. Haitao Li, Yunqiu Shao, Yueyue Wu, Qingyao Ai, Yix- iao Ma, and Yiqun Liu. 2024. Lecardv2: A large- scale chinese legal case retrieval dataset. In Proceed- ings of the 47th International ACM SIGIR Confer- ence on Research and Development in Information Retrieval. Aixin Liu, Bei Feng, Bing Xue, Bingxuan Wang, Bochao Wu, Chengda Lu, Chenggang Zhao, Chengqi Deng, Chenyu Zhang, Chong Ruan, and 1 others. 2024. Deepseek-v3 technical report. arXiv preprint arXiv:2412.19437. Antoine Louis, Gijs Van Dijck, and Gerasimos Spanakis. 2023. Finding the law: Enhancing statutory article retrieval via graph neural networks. arXiv preprint arXiv:2301.12847. Antoine Louis, Gijs van Dijck, and Gerasimos Spanakis. 2024. Interpretable long-form legal question answer- ing with retrieval-augmented large language models. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38. Yun Luo, Zhen Yang, Fandong Meng, Yafu Li, Jie Zhou, and Yue Zhang. 2025. An empirical study of catas- trophic forgetting in large language models during continual fine-tuning. IEEE Transactions on Audio, Speech and Language Processing. Alex Mallen, Akari Asai, Victor Zhong, Rajarshi Das, Daniel Khashabi, and Hannaneh Hajishirzi. 2023. When not to trust language models: Investigating effectiveness of parametric and non-parametric mem- ories. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Vol- ume 1: Long Papers). Humza Naveed, Asad Ullah Khan, Shi Qiu, Muhammad Saqib, Saeed Anwar, Muhammad Usman, Naveed Akhtar, Nick Barnes, and Ajmal Mian. 2025. A com- prehensive overview of large language models. ACM Transactions on Intelligent Systems and Technology, 16(5):1–72. Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, and 1 others. 2022. Training language models to follow in- structions with human feedback. Advances in neural information processing systems, 35:27730–27744. Xiao Peng and Liang Chen. 2024. Athena: Retrieval- augmented legal judgment prediction with large lan- guage models. arXiv preprint arXiv:2410.11195. Nicholas Pipitone and Ghita Houir Alami. 2024. Legalbench-rag:A benchmark for retrieval- augmented generation in the legal domain. arXiv preprint arXiv:2408.10343. B. Rüthers, C. Fischer, and A. Birk. 2013. Rechtstheo- rie mit juristischer Methodenlehre. Grundrisse des Rechts. C.H. Beck. Pranab Sahoo, Ayush Kumar Singh, Sriparna Saha, Vinija Jain, Samrat Mondal, and Aman Chadha. 2024. A systematic survey of prompt engineering in large language models: Techniques and applications. arXiv preprint arXiv:2402.07927. Parth Sarthi, Salman Abdullah, Aditi Tuli, Shubh Khanna, Anna Goldie, and Christopher D Manning. 2024. Raptor: Recursive abstractive processing for tree-organized retrieval. In The Twelfth International Conference on Learning Representations. Jeffrey A Segal. 1984. Predicting supreme court cases probabilistically: The search and seizure cases, 1962- 1981. American Political Science Review, 78(4):891– 900. Dong Shu, Haoran Zhao, Xukun Liu, David Demeter, Mengnan Du, and Yongfeng Zhang. 2024. Lawllm: Law large language model for the us legal system. In Proceedings of the 33rd ACM International Confer- ence on information and knowledge management. Marco Siino, Mariana Falco, Daniele Croce, and Paolo Rosso. 2025. Exploring llms applications in law: A literature review on current legal nlp approaches. IEEE Access. Weihang Su, Baoqing Yue, Qingyao Ai, Yiran Hu, Jiaqi Li, Changyue Wang, Kaiyuan Zhang, Yueyue Wu, and Yiqun Liu. 2025. Judge: Benchmarking judg- ment document generation for chinese legal system. In Proceedings of the 48th International ACM SI- GIR Conference on Research and Development in Information Retrieval. Octavia-Maria Sulea, Marcos Zampieri, Shervin Mal- masi, Mihaela Vela, Liviu P Dinu, and Josef Van Gen- abith. 2017. Exploring the use of text classification in the legal domain. arXiv preprint arXiv:1710.09306. Vincent A Traag, Ludo Waltman, and Nees Jan Van Eck. 2019. From louvain to leiden: guaranteeing well- connected communities. Scientific reports, 9(1):1– 12. Zhen Wan, Yating Zhang, Yexiang Wang, Fei Cheng, and Sadao Kurohashi. 2024. Reformulating domain adaptation of large language models as adapt-retrieve- revise: A case study on chinese legal domain. In Findings of the Association for Computational Lin- guistics: ACL 2024. Cunxiang Wang, Xiaoze Liu, Yuanhao Yue, Xiangru Tang, Tianhang Zhang, Cheng Jiayang, Yunzhi Yao, Wenyang Gao, Xuming Hu, Zehan Qi, and 1 others. 2023. Survey on factuality in large language models: Knowledge, retrieval and domain-specificity. arXiv preprint arXiv:2310.07521. Xuran Wang, Xinguang Zhang, Vanessa Hoo, Zhouhang Shao, and Xuguang Zhang. 2024. Legalreasoner: A multi-stage framework for legal judgment prediction via large language models and knowledge integration. IEEE Access. Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, and 1 others. 2022. Chain-of-thought prompting elic- its reasoning in large language models. Advances in neural information processing systems, 35:24824– 24837. Hannes Westermann. 2024. Dallma: Semi-structured legal reasoning and drafting with large language mod- els. In 2nd Workshop on Generative AI and Law. Nirmalie Wiratunga, Ramitha Abeyratne, Lasal Jayawar- dena, Kyle Martin, Stewart Massie, Ikechukwu Nkisi- Orji, Ruvan Weerasinghe, Anne Liret, and Bruno Fleisch. 2024. Cbr-rag: case-based reasoning for retrieval augmented generation in llms for legal ques- tion answering. In International Conference on Case- Based Reasoning. Springer. Shiguang Wu, Zhongkun Liu, Zhen Zhang, Zheng Chen, Wentao Deng, Wenhao Zhang, Jiyuan Yang, Zhi- tao Yao, Yougang Lyu, Xin Xin, Shen Gao, Pengjie Ren, Zhaochun Ren, and Zhumin Chen. 2023a. fuzi.mingcha. Yiquan Wu, Siying Zhou, Yifei Liu, Weiming Lu, Xi- aozhong Liu, Yating Zhang, Changlong Sun, Fei Wu, and Kun Kuang. 2023b. Precedent-enhanced legal judgment prediction with llm and domain-model col- laboration. arXiv preprint arXiv:2310.09241. Zhishang Xiang, Chuanjie Wu, Qinggang Zhang, Shengyuan Chen, Zijin Hong, Xiao Huang, and Jin- song Su. 2025. When to use graphs in rag: A com- prehensive analysis for graph retrieval-augmented generation. arXiv preprint arXiv:2506.05690. Zhishang Xiang, Chengyi Yang, Zerui Chen, Zhimin Wei, Yunbo Tang, Zongpei Teng, Zexi Peng, Zongxia Li, Chengsong Huang, Yicheng He, and 1 others. 2026. Agentic self-evolution for large language mod- els: Taxonomy, techniques, and applications. Au- thorea Preprints. Chaojun Xiao, Haoxi Zhong, Zhipeng Guo, Cunchao Tu, Zhiyuan Liu, Maosong Sun, Yansong Feng, Xi- anpei Han, Zhen Hu, Heng Wang, and 1 others. 2018. Cail2018: A large-scale legal dataset for judgment prediction. arXiv preprint arXiv:1807.02478. Nuo Xu, Pinghui Wang, Long Chen, Li Pan, Xiaoyan Wang, and Junzhou Zhao. 2020. Distinguish confus- ing law articles for legal judgment prediction. arXiv preprint arXiv:2004.02557. An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chengen Huang, Chenxu Lv, and 1 others. 2025a. Qwen3 technical report. arXiv preprint arXiv:2505.09388. Chang Yang, Chuang Zhou, Yilin Xiao, Su Dong, Luyao Zhuang, Yujing Zhang, Zhu Wang, Zijin Hong, Zheng Yuan, Zhishang Xiang, and 1 others. 2026. Graph-based agent memory: Taxonomy, techniques, and applications. arXiv preprint arXiv:2602.05665. Rui Yang. 2024. Casegpt: a case reasoning framework based on language models and retrieval-augmented generation. Preprint, arXiv:2407.07913. Xinyu Yang, Chenlong Deng, and Zhicheng Dou. 2025b. Glare: Agentic reasoning for legal judgment predic- tion. arXiv preprint arXiv:2508.16383. Fangyi Yu, Lee Quartey, and Frank Schilder. 2022. Le- gal prompting: Teaching a language model to think like a lawyer. Preprint, arXiv:2212.01326. Weikang Yuan, Junjie Cao, Zhuoren Jiang, Yangyang Kang, Jun Lin, Kaisong Song, Tianqianjin Lin, Peng- wei Yan, Changlong Sun, and Xiaozhong Liu. 2024. Can large language models grasp legal theories? en- hance legal reasoning with insights from multi-agent collaboration. In Findings of the Association for Computational Linguistics: EMNLP 2024, Miami, Florida, USA. Association for Computational Lin- guistics. Shengbin Yue, Wei Chen, Siyuan Wang, Bingxuan Li, Chenchen Shen, Shujun Liu, Yuxuan Zhou, Yao Xiao, Song Yun, Xuanjing Huang, and 1 others. 2023. Disc-lawllm: Fine-tuning large language mod- els for intelligent legal services. arXiv preprint arXiv:2309.11325. Shengbin Yue, Shujun Liu, Yuxuan Zhou, Chenchen Shen, Siyuan Wang, Yao Xiao, Bingxuan Li, Yun Song, Xiaoyu Shen, Wei Chen, and 1 others. 2024. Lawllm: Intelligent legal system with legal reason- ing and verifiable retrieval. In International Confer- ence on Database Systems for Advanced Applications. Springer. Jianqiiu Zhang. 2024. Should we fear large language models? a structural analysis of the human reason- ing system for elucidating llm capabilities and risks through the lens of heidegger’s philosophy. arXiv preprint arXiv:2403.03288. Qinggang Zhang, Shengyuan Chen, Yuanchen Bei, Zheng Yuan, Huachi Zhou, Zijin Hong, Hao Chen, Yilin Xiao, Chuang Zhou, Junnan Dong, and 1 others. 2025a. A survey of graph retrieval-augmented gener- ation for customized large language models. arXiv preprint arXiv:2501.13958. Qinggang Zhang, Zhishang Xiang, Yilin Xiao, Le Wang, Junhui Li, Xinrun Wang, and Jinsong Su. 2025b. Faithfulrag: Fact-level conflict modeling for context- faithful retrieval-augmented generation. In Proceed- ings of the 63rd Annual Meeting of the Association for Computational Linguistics. Wayne Xin Zhao, Kun Zhou, Junyi Li, Tianyi Tang, Xiaolei Wang, Yupeng Hou, Yingqian Min, Beichen Zhang, Junjie Zhang, Zican Dong, and 1 others. 2023. A survey of large language models. arXiv preprint arXiv:2303.18223, 1(2). Zhi Zhou, Jiang-Xin Shi, Peng-Xiao Song, Xiao-Wen Yang, Yi-Xuan Jin, Lan-Zhe Guo, and Yu-Feng Li. 2024.Lawgpt: A chinese legal knowledge- enhanced large language model.arXiv preprint arXiv:2406.04614. A Frequently Asked Questions (FAQs) A.1 What are the advantages of LegalGraphRAG? LegalGraphRAG introduces several key advance- ments over traditional retrieval-augmented genera- tion methods and specialized legal LLMs, address- ing critical challenges in the legal domain through its hierarchical structure and multi-agent workflow. Superior Retrieval Effectiveness. First, our framework significantly improves how legal infor- mation is retrieved. While traditional flat retrieval methods often struggle to differentiate between spe- cific case facts and abstract statutory rules, our hier- archical graph organizes this complex information into distinct levels. This structure ensures that the system captures both detailed evidence and high- level principles, providing a much more compre- hensive context than standard baselines. Trustworthy and Transparent Reasoning.Sec- ond, LegalGraphRAG addresses the “black box” issue common in standard LLMs. Instead of gen- erating answers directly, which can lead to hallu- cinations or correct predictions based on wrong premises, our system employs a multi-agent work- flow. This process strictly verifies the retrieved evi- dence against the facts of the case. Consequently, it constructs a logical chain of evidence, ensuring that the final judgment is grounded in valid legal logic rather than statistical probability. Flexibility and Model Agnosticism.Finally, the framework offers superior flexibility compared to rigid, specialized legal models. Unlike methods that require extensive and costly fine-tuning on le- gal datasets, LegalGraphRAG functions as a mod- ular system. It allows users to easily swap the underlying backbone model. As demonstrated in our experiments, this capability enables the inte- gration of powerful advanced models to achieve state-of-the-art performance without the need for additional training. A.2 How to Evaluate Legal Reasoning? We utilize Legal Judgment Prediction (LJP) as the primary experimental testbed because it serves as a rigorous “cognitive touchstone” for evaluating complex reasoning in specialized domains. While our introduction highlights broader challenges in healthcare, finance, and law, LJP uniquely encapsu- lates the core difficulties of high-stakes reasoning. Validating Hierarchical Knowledge Alignment Introduction Challenge (i) highlights the difficulty of managing heterogeneous knowledge. LJP ex- emplifies this struggle by requiring the model to bridge the semantic gap between concrete case facts and abstract statutory rules. Successfully mapping these distinct granularities validates the effectiveness of our hierarchical graph structure in organizing multi-level domain knowledge. Evaluating Rigorous Logical DeductionUnlike general Question Answering tasks that may rely on surface-level semantic matching, LJP necessi- tates strict syllogistic reasoning (Major Premise →Minor Premise→Conclusion). This structural dependency provides an ideal setting to stress-test our Multi-Agent framework, specifically validating whether the Auditor can effectively filter irrelevant distractions and enforce the logical consistency. Benchmarking High-Stakes ReliabilityIn pro- fessional domains, plausibility is insufficient; accu- racy is paramount. LJP imposes a zero-tolerance standard for hallucination, as every judgment must be supported by cited articles. By demonstrat- ing that LegalGraphRAG can produce verifiable, evidence-based judgments in this demanding con- text, we establish a strong precedent for its applica- bility to critical domains like medicine and finance. A.3 How was the retrieval performance evaluated and compared across different strategies? To ensure consistent assessment throughout our study (spanning both the preliminary investigation and main comparative experiments), we established a standardized evaluation pipeline based on the le- gal corpora and CAIL (Xiao et al., 2018) dataset described in Appendix D.2. The evaluation proce- dure consists of three steps. Execution on Test Set For every case query in the test dataset, we executed two representative RAG strategies. The Flat Strategy follows the tra- ditional baseline approach, indexing all legal docu- ments in a unified flat repository. The Hierarchical Strategy, built upon Naive RAG, adopts a decou- pled approach by separately storing and retrieving legal articles and historical cases. Based on these strategies, each model retrieved a set of candidate evidence from the corpus. Ground Truth Alignment We utilized the arti- cles provided in the dataset (ground truth articles) as the “Gold Standard,” as all cases in the dataset are inherently annotated with their relevant statu- tory articles. Any retrieved node matching these articles was marked as a True Positive. Metric Calculation Based on the alignment re- sults, we quantified performance using the two key indicators defined in Appendix D.3: • Retrieval Effectiveness: This measures the Re- call of gold-standard evidence, indicating the system’s ability to locate legal evidence. •Error Rate: This assesses the proportion of irrelevant or misleading nodes within the re- trieved context reflecting the system’s ability to filter distractions. This allows us to objectively compare how dif- ferent structural approaches (flat vs. hierarchical) impact the precision of legal reasoning. A.4 How were the “context with irrelevant information” constructed for the Generation Quality investigation? To rigorously test the model’s verification capabili- ties, we constructed evaluation contexts containing High-Similarity Irrelevant Information. Instead of including randomly selected texts, we curated sets of documents that are semantically similar to the correct evidence but legally inapplicable. This de- sign mirrors real-world scenarios where documents share surface-level keywords but differ fundamen- tally in domain applicability. The construction pro- cess involved two steps: Ground Truth Context: First, we established the baseline context using the ground truth pro- vided in the CAIL (Xiao et al., 2018) dataset. For each case, this set consists exclusively of the cor- rect applicable articles required for the judgment. Injection of Irrelevant Distractors:To simulate the presence of legally plausible but factually irrel- evant documents, we utilized the entire Criminal Law code as a retrieval corpus. For each correct article in the Ground Truth Context, we performed a vector-based similarity search over this corpus to identify the top-kmost similar articles that were not part of the ground truth. These retrieved articles serve as High-Similarity Distractors: they share significant lexical and se- mantic overlap with the correct laws (e.g., sharing keywords like “theft” or “fraud”) but differ in spe- cific constitutive elements or sentencing standards. By mixing these irrelevant documents into the con- text, we created a challenging environment that forces the model to discern legal essence from su- perficial similarity. A.5 Reliability Analysis Definitions We analyzed the CAIL test results to categorize correct predictions based on evidence support. A prediction is classified as Traceable Correct if the model correctly predicts the charge and success- fully retrieves the ground-truth articles. Conversely, it is Untraceable Correct if the correct charge is predicted despite failing to retrieve the necessary articles. B Method Details In this section, we provide the comprehensive tech- nical specifications and implementation details of the proposed LegalGraphRAG framework. As outlined in the main text, our approach operates in two distinct phases: (i) Hierarchical Knowl- edge Construction (Figure 7), which organizes legal knowledge into a layered graph structure to effectively decouple historical cases, relevant arti- cles, and judicial interpretations; and (i) Evidence- based Legal Reasoning (Figure 8), which employs a collaborative agent workflow to retrieve relevant evidence and generate verifiable judgments. B.1 Hierarchical Knowledge Construction We construct a Hierarchical Legal GraphGcom- posed of three specialized subgraphs, as illustrated in Figure 3. This multi-layered structure explicitly differentiates between specific precedents, abstract case relationships, and rigorous statutory rules, as illustrated in Figure 7. Fact Graph (G f ac ) serves as the repository for ground-truth precedents. It encodes the natural structure of legal documents by explicitly linking Cases (C), Articles (A), and Offenses (O). Edges are established to represent citation relationships (e ca :C →A) and conviction outcomes (e co :C → O). Formally, it is defined as: G f ac = (V f ac ,E f ac ) = c i ,a i ,o i |G fac | i=1 . (13) Ontology Graph (G ont ) abstracts case features to model inter-case relationships. To map unstruc- tured narratives into a structured semantic space, we define a domain-specific ontology along four dimensions: Defendant Attributes, Criminal Behav- iors, Victim Characteristics, and Subjective Mental Figure 7: Overview of the Hierarchical Knowledge Construction phase in LegalGraphRAG. States. Keywords are extracted and aligned with these dimensions to form Case Feature Nodes (F). Structurally, we utilize the k-Nearest Neighbors (k-N) algorithm to establish semantic edges be- tween cases. Based on this topology, we apply the Leiden algorithm (Traag et al., 2019) to cluster re- lated cases into Community Nodes (K), facilitating coarse-to-fine retrieval. The subgraph is formally defined as: G ont = (V ont ,E ont ) = c i ,k j |G ont | i=1,j=1 . (14) Rule Graph (G rul ) incorporates fine-grained legal knowledge to resolve statutory ambiguities. This graph consists of Articles (A) and Judicial Inter- pretations (J), linked by explicit cross-references. To further enhance precision, each article nodea i is equipped with a Diagnostic ChecklistD(a i ). Generated by parsing statutory texts, this check- list decomposes complex legal provisions into atomic boolean queries. For instance, regarding Article 266 (Fraud), the checklist validates the logi- cal chain of the crime: “Did the defendant fabricate facts or conceal the truth?”, “Did the victim fall into a mistake due to this act?”, and “Did the victim dispose of property based on this mistake?”. This mechanism forces the model to verify each consti- tutive element step-by-step, rather than relying on vague semantic overlaps. Formally, this subgraph and its associated checklists are defined as: G rul = (V rul ,E rul ) = a i ,j i |G rul | i=1 ,(15) where D(a i ) =d 1 ,...,d |C| .(16) By integrating these three layers, HierarGraph Gtransforms heterogeneous legal corpora into a structured ecosystem. This architecture directly addresses the limitations of flat retrieval by offering multi-granular support for our multi-agent system. B.2 Evidence-based Legal Reasoning We propose a multi-agent framework to emulate the rigorous workflow of legal professionals, as il- lustrated in Figure 8. This system operates sequen- tially through three specialized agents (Researcher, Auditor, and Adjudicator) to transform a case query into a verifiable judgment. Researcher Agent: This agent is responsible for grounding the unstructured case query in relevant legal knowledge. First, it aligns the raw case de- scription with the ontology structure inG ont , ex- tracting standardized evidentiary features (e.g., de- fendant characteristics and criminal behaviors). Based on these features, we formulate the evi- dence retrieval processR(q)as the union of three parallel strategies, where q is the legal query: R(q) =R sem (q)∪R com (q)∪R chg (q)(17) (i) Semantic Match Retrieval: We first locate di- rect evidentiary analogues via fine-grained seman- tic similarity. Letφ(·)denote the ontology-aligned Figure 8: The workflow of the Evidence-based Legal Reasoning phase. embeddings, this process is defined as: R sem (q) = Top-k c∈G ont sim φ(q),φ(c) (18) (i) Community Expansion Retrieval: To cap- ture broader structural context, we employ a community-guided strategy. We identify the single most relevant thematic communityK ∗ aligned with the query, and then retrieve the top-ksimilar cases restricted within this community: K ∗ = argmax K∈G ont sim φ(q),φ(K) R com (q) = Top-k c∈K ∗ sim φ(q),φ(c) (19) (i) Charge-Anchored Retrieval: Finally, we an- chor the legal basis by retrieving cases linked to inferred charges. Here,O(q)denotes the set of pre- dicted charges andN G fac (o)represents the neigh- boring cases connected to chargeoin the Fact Graph: R chg (q) = [ o∈O(q) N G fac (o)(20) These three retrieval strategies organize the can- didate evidence setS cand . Auditor Agent: Operating on the candidate evi- dence setS cand , the Auditor validates the appli- cability of each retrieved articlev a through a rig- orous verify-and-prune mechanism. This process proceeds in three specific steps: (i) Diagnostic Retrieval: For each articlev a , the agent retrieves its specific Diagnostic Checklist D(v a ) = d 1 ,...,d |C| and relevant Judicial In- terpretationsJ from the Rule GraphG rul . (i) Item-wise Verification: The agent executes a verification loop for each diagnostic itemd k ∈ D .It evaluates whether the raw case facts qsatisfy the specific legal conditiond k , sup- porting the judgment with the interpretive con- textJ.This produces a set of boolean veri- fication resultsV results = r k , wherer k ← CheckCondition(q,d k ,v a ,J ). (i) Decision and Pruning: Finally, the Audi- tor synthesizes the verification resultsV results to determine the overall applicability of the article. If the article fails to meet the necessary criteria (IsApplicableis False), the Auditor executes a pruning operation: S verif ied ← Prune(S verif ied ,v a )(21) This step removes the inapplicable article node v a along with its dependent case precedents and charge nodes, ensuring that the final subgraph S verif ied contains only logically valid and appli- cable evidence. Adjudicator Agent: The Adjudicator synthesizes the verified subgraphS verif ied to render the final judgment. Specifically, it organizes the valid nodes extracted fromS verif ied into sets of confirmed arti- cles (V f A ), case precedents (V f C ), and charge infor- Algorithm 1 Evidence-based Legal Reasoning Require: Raw case query q; Ontology GraphG ont ; Fact GraphG f ac ; Rule GraphG rul . Ensure: Final JudgmentJ with citations. Stage 1: Researcher Agent (Multi-Strategy Retrieval) 1: φ(q)← OntologyAlign(q,G ont )▷ Align query to ontology features Parallel Evidence Retrieval Strategies: 2: S cand ←R sem ∪R com ∪R chg ▷ Union of candidate evidence Stage 2: Auditor Agent (Verification & Pruning) 3: S verif ied ←S cand 4: for each article node v a ∈S cand do 5: D ← RetrieveChecklist(v a ,G rul )▷ Get checklistD(v a ) =d 1 ,...,d |C| 6: J ← RetrieveInterpretations(v a ,G rul )▷ Get Judicial Interpretations 7: V results ←∅ 8:for each diagnostic item d k ∈D do▷ Item-wise verification loop 9:r k ← CheckCondition(q,d k ,v a ,J )▷ Verify if fact q satisfies condition d k 10:V results ← V results ∪r k 11:end for 12: IsApplicable← Decide(V results )▷ Final determination for node v a 13:if not IsApplicable then 14: S verif ied ← Prune(S verif ied ,v a )▷ Remove article and linked nodes 15:end if 16: end for 17: G f sub ←V f A ,V f C ,V f O ← Organize(S verif ied )▷ Structure the verified subgraph Stage 3: Adjudicator Agent (Synthesis) 18: Y ← Adjudicator(q⊕ V f A ⊕ V f C ⊕ V f O )▷ Synthesize judgment with citations 19: returnY mation (V f O ). By integrating these evidence com- ponents with the original queryq, it generates a response with explicit citations. This process is formulated as: Y = Adjudicator(q⊕ V f A ⊕ V f C ⊕ V f O )(22) The outputYensures that every conclusion is di- rectly traceable to specific nodes in the knowledge graph, enforcing transparency and evidence-based reasoning. C Additional Experiments C.1 Extensions to the Main Experiment (Q4) In this section, we conduct a series of extended experiments to verify the universality of our frame- work across different model architectures and its ro- bustness in specific, high-difficulty legal sub-tasks. Obs.7. Universality across Advanced Backbones. To verify the universality of our framework, we ex- tended the evaluation to advanced large language models, specifically DeepSeek-V3.1 and GPT-4o- mini. As shown in Table 4, LegalGraphRAG consistently outperforms all baselines across both CAIL and CMDL datasets, regardless of the back- bone model employed. Notably, even with the lighter GPT-4o-mini on the CMDL dataset, our method achieves a remarkable performance gain (e.g., significantly exceeding the strong baseline RAPTOR in Accuracy), while maintaining its lead with the more powerful DeepSeek-V3.1. This demonstrates that LegalGraphRAG’s structured reasoning capabilities effectively complement the generation power of various state-of-the-art LLMs, enhancing their precision in complex legal applica- tion scenarios independent of the underlying model architecture. Obs.8. Exactness in Law Article Prediction. Ta- ble 5 illustrates the model’s capability in Law Arti- cle Prediction, a task demanding precise statutory grounding rather than generative flexibility. Legal- GraphRAG achieves a superior overall accuracy of 47.9%, establishing a substantial lead over both the strongest RAG baseline, HippoRAG2 (39.8%), and the domain-specific state-of-the-art, ADAPT (41.3%). Remarkably, our 8B-parameter frame- work even surpasses the massive DeepSeek-V3.1 (44.9%), highlighting that our structured, evidence- CAIL ModelSize Public SafetyEconomicSocial OrderPerson Rights All∆ ACCF1ACCF1ACCF1ACCF1 GPT-4o-mini Naive RAG∼8B27.537.618.833.618.028.822.139.222.2↑ 18.7 G-Retriever∼8B17.524.820.332.820.531.024.131.621.4↑ 19.5 LightRAG∼8B25.437.421.336.921.738.723.442.823.1↑ 17.8 RAPTOR (Sarthi et al., 2024) ∼8B33.149.029.344.225.939.928.343.130.5↑ 10.4 HippoRAG2 (Gutiérrez et al., 2025) ∼8B 33.150.128.146.121.743.637.254.231.9↑ 9.0 LegalGraphRAG (Ours)∼8B39.654.836.352.937.351.242.162.440.9– DeepSeek-V3.1 Naive RAG∼200B38.054.032.349.933.447.340.753.437.8↑ 12.1 G-Retriever∼200B36.554.635.149.836.247.239.548.337.2↑ 12.7 LightRAG∼200B36.648.526.350.233.546.339.753.145.4↑ 4.5 RAPTOR (Sarthi et al., 2024) ∼200B42.256.337.853.039.250.745.552.344.4↑ 5.5 HippoRAG2 (Gutiérrez et al., 2025) ∼200B41.549.133.146.834.347.038.646.441.2↑ 8.7 LegalGraphRAG (Ours)∼200B44.458.841.957.841.956.846.265.149.9– CMDL ModelSize Public SafetyEconomicSocial OrderPerson Rights All∆ ACCF1ACCF1ACCF1ACCF1 GPT-4o-mini Naive RAG∼8B38.750.835.644.030.944.233.343.032.9↑ 17.1 G-Retriever∼8B24.638.429.738.830.440.041.151.628.3↑ 21.7 LightRAG∼8B36.243.137.548.946.955.134.650.834.2↑ 15.8 RAPTOR (Sarthi et al., 2024) ∼8B42.049.148.258.057.360.946.059.548.7↑ 11.3 HippoRAG2 (Gutiérrez et al., 2025) ∼8B45.052.542.960.845.364.659.475.046.0↑ 14.0 LegalGraphRAG (Ours)∼8B46.557.863.767.958.066.267.275.460.0– DeepSeek-V3.1 Naive RAG∼200B52.065.366.171.669.870.768.880.562.9↑ 12.8 G-Retriever∼200B46.264.958.669.656.167.469.778.955.2↑ 23.5 LightRAG∼200B 47.758.746.567.647.653.252.364.252.4↑ 26.3 RAPTOR (Sarthi et al., 2024) ∼200B53.464.768.273.066.475.460.371.156.4↑ 12.3 HippoRAG2 (Gutiérrez et al., 2025) ∼200B62.163.562.465.375.978.676.978.274.0↑ 4.7 LegalGraphRAG (Ours)∼200B66.769.976.079.372.980.479.785.578.7– Table 4: Performance comparison on advanced Models. We compared LegalGraphRAG and other baselines utilizing advanced LLMs as backbones. based retrieval mechanism is more effective at pin- pointing legal provisions than simply scaling model parameters or employing semantic retrieval. Obs.9. Precision in Term of Penalty Predic- tion. Table 6 presents the results on the challenging term of penalty prediction task, which requires fine- grained quantitative reasoning rather than simple classification. LegalGraphRAG demonstrates a sig- nificant advantage in minimizing prediction error, consistently achieving the lowest Mean Absolute Error (MAE) across most subdomains compared to other RAG-based methods. For instance, in the Public Safety category, our model achieves an MAE of 20.9, outperforming RAPTOR (21.7) and HippoRAG2 (23.0). This indicates that while ex- act term matching remains difficult for all models, LegalGraphRAG’s evidence-based retrieval strat- egy effectively locates relevant sentencing guide- lines and comparable precedents, thereby constrain- ing the generation to a more precise and legally grounded time range. C.2 Hyper-parameter Sensitivity (Q5) To evaluate system stability, we investigated the sensitivity of the Researcher Agent to the retrieval parameterk, which governs the number of seman- tic concepts retrieved from the ontology graphG ont . We variedkover the set3, 4, 5, 6. The upper bound is restricted to 6, as empirical evidence sug- gests that exceeding this threshold introduces exces- sive context noise, which overwhelms the model’s effective window and degrades reasoning. CAIL ModelSize Public SafetyEconomicSocial OrderPerson Rights All∆ ACCF1ACCF1ACCF1ACCF1 Open-Source Models Qwen-2.5-7B-Instruct7B-Inst28.753.824.148.226.653.536.056.230.1↑ 17.8 Qwen-3-8B8B-Inst23.958.527.651.236.662.246.266.735.9↑ 12.0 Internlm3-8b-instruct8B-Inst27.659.926.452.830.859.033.657.629.9↑ 18.0 Glm-4-9b-chat9B-Inst23.960.125.651.034.759.435.158.530.8↑ 17.1 Advanced Models GPT-4o-mini (Achiam et al., 2023) ∼8B24.757.225.742.424.651.834.755.030.9↑ 17.0 DeepSeek-V3.1 (Liu et al., 2024) ∼200B42.363.237.161.344.568.851.967.344.9↑ 3.0 Legal Specific Methods DISC-LawLLM-7B (Yue et al., 2024)7B-Inst36.555.929.948.841.561.239.357.838.2↑ 9.7 ADAPT (Deng et al., 2024b)7B-Inst40.150.831.642.439.654.941.050.541.3↑ 6.6 Legal ∆ (Dai et al., 2025)7B-Inst33.054.927.851.034.659.444.560.637.9↑ 10.0 RAG Based Methods Naive RAG8B-Inst30.445.729.248.637.554.136.651.134.8↑ 13.1 RAPTOR (Sarthi et al., 2024)8B-Inst 36.459.233.453.938.964.141.061.737.2↑ 10.7 HippoRAG2 (Gutiérrez et al., 2025)8B-Inst35.260.333.153.741.767.042.663.839.8↑ 8.1 LegalGraphRAG (Ours)8B-Inst43.064.937.861.044.669.454.570.647.9– Table 5: Extended experiments on Article Prediction. We evaluated the performance of our model and baselines on the specific sub-task of law article prediction. We visualize the gains of LegalGraphRAG to the each baseline in the∆ columns . CAIL ModelSize Public SafetyEconomicSocial OrderPerson Rights All∆ ACCMAEACCMAEACCMAEACCMAE Open-Source Models Qwen-2.5-7B-Instruct7B-Inst13.023.78.133.36.030.39.729.429.5↑ 8.4 Qwen-3-8B8B-Inst8.332.611.331.617.929.711.426.427.5↑ 7.4 Internlm3-8b-instruct8B-Inst7.135.25.937.26.032.57.237.333.7↑ 13.6 Glm-4-9b-chat9B-Inst3.636.03.232.91.535.16.838.633.1↑ 13.0 Advanced Models GPT-4o-mini (Achiam et al., 2023) ∼8B6.938.27.334.28.331.78.034.633.6↑ 13.5 DeepSeek-V3.1 (Liu et al., 2024) ∼200B7.131.28.131.510.425.98.429.129.1↑ 8.6 Legal Specific Methods DISC-LawLLM-7B (Yue et al., 2024)7B-Inst15.524.55.033.23.037.98.434.531.6↑ 11.5 ADAPT (Deng et al., 2024b)7B-Inst8.321.810.921.93.024.39.722.320.4↑ 0.3 Legal ∆ (Dai et al., 2025)7B-Inst11.925.09.029.09.027.58.927.126.3↑ 6.2 RAG Based Methods Naive RAG8B-Inst10.529.811.430.818.121.712.624.326.5↑ 4.4 RAPTOR (Sarthi et al., 2024)8B-Inst12.021.711.728.315.826.116.221.824.3↑ 4.2 HippoRAG2 (Gutiérrez et al., 2025)8B-Inst13.123.012.725.817.923.813.523.423.8↑ 3.7 LegalGraphRAG (Ours)8B-Inst 14.020.913.722.119.423.617.122.720.1– Table 6: Extended experiments on Term of Penalty Prediction. We assessed the accuracy and error rates of imprisonment term predictions compared to baselines. We visualize the gains of LegalGraphRAG to the each baseline in the∆ columns . MethodIndexing Time (s) Token Consumption (< 10 6 )Avg Cost PromptCompletionTimeToken RAPTOR13696.905.640.725.863589 HippoRAG24581.6010.582.7911.25199 LegalGraphRAG (Ours)3687.493.970.7846.110664 Table 7: Comparison of Computational Efficiency: Offline Indexing vs. Online Inference. We report the total time and token usage for graph construction (Indexing) and the average cost per query (Online). Figure 9: Impact of the retrieval parameterkon charge prediction performance (CAIL dataset). The backbone model is Qwen3-8B. Obs.10. Robustness to Retrieval Hyperparam- eter Variations. As illustrated in Figure 9, Legal- GraphRAG exhibits strong robustness to variations ink. Although performance peaks atk = 5(achiev- ing 40.9 Accuracy and 52.8 F1), the variance across the tested range is marginal. This indicates that the Researcher Agent reliably captures essential se- mantic information without being hypersensitive to exact thresholding, providedkremains within a reasonable bound. C.3 Latency and Token Cost (Q6) In this section, we shift our focus to the practical efficiency and computational overhead of the com- pared frameworks. Beyond accuracy, the latency and token consumption are crucial factors for real- world deployment. We provide a detailed break- down and comparison of the computational costs for RAPTOR, HippoRAG2, and LegalGraphRAG across two primary phases: (i) the offline graph construction stage, reporting both the time and to- ken cost required to build the knowledge base; and (i) the online query-answering stage, reporting the time and token cost incurred during the retrieval and reasoning process for a given query. Obs.11. Trade-off between Efficiency and In- terpretability. Table 7 presents the computational efficiency. LegalGraphRAG demonstrates superior offline efficiency with the lowest indexing time (3687.49s) and token consumption. However, dur- ing the online phase, it incurs higher latency (46.1s) and token usage. This overhead is a necessary trade-off for evidence-based reasoning. Unlike baseline GraphRAG approaches that often oper- ate as opaque "black boxes", our method explicitly constructs credible reasoning chains to support its judgments. While generating such transparent evi- dence consumes more resources, it is indispensable for ensuring the trustworthiness and interpretability required in legal domains. D Implementation Details D.1 Benchmark Dataset We evaluate LegalGraphRAG on two benchmark datasets, including CAIL2018(Xiao et al., 2018) and CMDL(Huang et al., 2024). CAIL2018(Xiao et al., 2018): A large-scale Chi- nese legal dataset designed for the task of Legal Judgment Prediction (LJP), where models predict court outcomes based on factual case descriptions. It comprises over 2.6 million criminal cases pub- lished by the Supreme People’s Court of China, making it the largest publicly available dataset of its kind. Each case includes a detailed fact descrip- tion along with structured judgment annotations, namely applicable law articles (183 categories), charges (202 categories), and prison terms. The dataset was created to address the lack of high- quality, large-scale resources in legal AI and to provide a realistic benchmark that reflects the com- plexity and imbalance inherent in real judicial data, where frequent charges dominate the case distribu- tion. CAIL2018 has since become a foundational resource for evaluating and advancing automated legal judgment prediction systems. CMDL(Huang et al., 2024): A large-scale, real- world Chinese Multi-Defendant Legal Judgment Prediction dataset designed to address the under- explored challenge of predicting judicial outcomes in cases involving multiple defendants. It com- DatasetCAILCMDL # Case Num568572 # Charges168239 # Average criminal per case1.252.40 # Average defendant per case1.721.14 # Average length per case654.79517.13 Table 8: Basic statistics of the test datasets. prises 393,945 criminal cases with approximately 1.2 million defendants, covering 321 distinct charges and 275 legal articles. Notably, CMDL in- troduces case-level evaluation metrics that account for case complexity and varying numbers of defen- dants, offering a more holistic assessment of model performance in multi-defendant scenarios. For ex- perimental feasibility, the subset CMDL-small is often utilized, as it preserves the data distribution while significantly reducing computational costs, making it suitable for preliminary benchmarking and model validation in resource-constrained re- search settings. Dataset Construction Due to considerations re- garding the generation speed and token cost of the GraphRAG method, we constructed focused sub- sets from both the CAIL2018 and CMDL datasets using a uniform procedure aimed at controlling input length, balancing charge distribution, and elevating task complexity. The construction first fil- tered cases to retain only those with factual descrip- tions under 1,024 characters. To ensure broader coverage of under-represented charges and increase predictive difficulty, the sampling prioritized de- fendants whose charges included low-frequency of- fenses and deliberately retained a higher proportion of multi-charge cases. Consequently, the resulting subsets feature a more balanced charge distribution with elevated presence of rare charges and greater average case complexity compared to the original datasets. While this design provides a more chal- lenging testbed for evaluating model performance on complex and low-frequency legal scenarios, it may also lead to lower reported performance for some methods relative to their results on the orig- inal, more naturalistic data distribution. Table 8 presents detailed statistics of the subsets. D.2 Corpus In this section, we provide detailed descriptions of corpus used in our experiments. To ensure compre- hensive coverage of criminal statutes and charges, we construct this knowledge base by aggregating DatasetCase # Num14049 # Charges*818 # Average defendant per case3.39 # Average length per case399.73 Table 9: Basic statistics of the cases in corpus. *The large number of “Charges” is due to inconsistencies in the descriptions of crimes across different datasets. DatasetArticleJudicial interpretations # Num452656 # Average length128.54243.95 Table 10: Basic statistics of the legal knowledges in corpus. a subset of cases from multiple authoritative legal datasets: JuDGE(Su et al., 2025), CAIL2018(Xiao et al., 2018), CMDL(Huang et al., 2024), and LeCaRDv2(Li et al., 2024). The construction fol- lows a procedure similar to that used for the ex- perimental subsets: we first filter cases by fact de- scription length (under 1,024 characters) and apply sampling designed to balance the representation of different charges, thereby creating a broad and di- verse collection of historical precedents and factual patterns. Furthermore, to ground the system in au- thoritative legal provisions, we incorporate the full text of the “Criminal Law of the People’s Republic of China” along with its relevant judicial interpre- tations as a core statutory knowledge library. The combination of this curated historical case library and the official legal provisions library forms the complete corpus, enabling models to retrieve both experiential precedents and statutory knowledge during reasoning.Crucially, we have carefully ver- ified that all cases in the corpus are distinct from those in the test subsets, ensuring no data leakage between the knowledge base and the evaluation benchmarks. The size and composition statistics of the final corpus are detailed in Table 9 & 10. D.3 Evaluation Metrics To comprehensively evaluate the Legal Judgment Prediction (LJP) tasks, we employ specific metrics for different sub-tasks: Charge and Article Pre- diction are evaluated using Accuracy (ACC) and Micro-F1, Term of Penalty Prediction is assessed using ACC and Mean Absolute Error (MAE), and the Retrieval Quality of our RAG system is mea- sured by Retrieval Effectiveness and Error Rate. Accuracy (ACC) measures the exact match ratio. For classification tasks, it requires the predicted label setO i to be identical to the ground truthO ′ i . For Term of Penalty, it measures the exact match of the predicted term. It is calculated as: ACC = 1 N N X i=1 I(O i = O ′ i ) Where I(·) is the indicator function. Micro-F1 is used for multi-label classification to account for class imbalance. It is the harmonic mean of micro-averaged precision (P micro ) and re- call (R micro ): Micro-F1 = 2· P micro · R micro P micro + R micro Mean Absolute Error (MAE) reflects the devia- tion in the predicted term of penalty. LetT i andT ′ i denote the predicted and ground-truth prison terms (in months), respectively. MAE is defined as: MAE = 1 N N X i=1 |T i − T ′ i | Retrieval Effectiveness measures how well the retrieved content aligns with the question’s intent. Higher values indicate more focused and pertinent information. It is defined as: Retrieval Effectiveness = 1 |C| X c∈C R(c,Q,E ) whereCdenotes the set of retrieved contexts,Qrep- resents the question,Edenotes the set of evidence, and the operatorR(·)determines the relevance of a context c. Error Rate quantifies the incompleteness of the retrieval process. Instead of measuring recall di- rectly, we assess the proportion of reference claims not supported by the retrieved context: Error Rate = 1− 1 |R| X c∈R I(S(c,C)) ! (23) whereRis the set of reference claims,S(·)de- termines whether a claimcis supported by the re- trieved contextC, andI(·)is the indicator function. A lower Error Rate indicates a more comprehensive evidence collection. D.4 Baseline Details In this section, we provide detailed descriptions of each baseline used in our comparison, as detailed in figure 10. Naive RAG uses the standard RAG paradigm: a retriever model first retrieves relevant context from the corpus based on the given question, and then the question is concatenated with the retrieved context to form a query for the generation model to produce the final answer. G-retriever(He et al., 2024a) introduces a re- trieval augmented generation framework for tex- tual graphs by formulating subgraph retrieval as a Prize-Collecting Steiner Tree optimization prob- lem, enabling conversational question answering across diverse domains like scene understanding and knowledge graphs while mitigating LLM hal- lucinations and scaling to large graph sizes. LightRAG(Guo et al., 2024)introduces a graph- enhanced retrieval-augmented generation frame- work that integrates entity-relationship graphs into text indexing, combining low-level precise entity retrieval with high-level thematic discovery for ef- ficient and adaptive knowledge integration. HippoRAG2(Gutiérrez et al., 2025) builds on HippoRAG’s Personalized PageRank framework by integrating dense-sparse coding for passages and phrases in the knowledge graph, enabling deeper contextualization and recognition memory for triple filtering. Enhances online retrieval with query-to-triple matching and optimized seed node weighting, outperforming standard RAG across fac- tual, sense-making, and associative memory tasks. RAPTOR(Sarthi et al., 2024) constructs a hier- archical tree by recursively clustering and summa- rizing embedded text chunks, enabling retrieval of information at multiple levels of abstraction to improve performance on long-document question- answering tasks. Disc-LawLLM(Yue et al., 2024) is a retrieval- augmented large language model fine-tuned on Chi- nese judicial datasets using legal syllogism prompt- ing to provide reasoning-capable legal services, including consultation, judgment prediction, and examination assistance. In this work, we use the officially open-sourced LawLLM-7B, which is fine- tuned from Qwen2.5-Instruct-7B. Legal∆(Dai et al., 2025) employs a reinforce- ment learning framework that enhances legal rea- soning in LLMs by maximizing chain-of-thought guided information gain through dual-mode inputs RAG Configuration embedding_model: bge-m3, retrieval_topk: 5, chunk_token_size: 1000, chunk_overlap_token_size: 200 RAG Configuration embedding_model: bge-m3, retrieval_topk: 5, chunk_token_size: 1000, chunk_overlap_token_size: 200 G-retriever Configuration embedding_model: bge-m3, retrieval_topk: 3, chunk_token_size: 1200, chunk_overlap_token_size: 100, entities_max_tokens: 2000, relationships_max_tokens: 2000 LightRAG Configuration embedding_model: bge-m3, query_type: hybrid, chunk_token_size: 1200, retrieval_topk: 20, chunk_overlap_token_size: 100, max_token_text_unit: 2000, max_token_global_context: 2000, max_token_local_context: 2000 HippoRAG2 Configuration embedding_model: bge-m3, retrieval_top_k: 5, linking_top_k: 5, max_qa_steps: 3, qa_top_k: 5, graph_type: facts_and_sim_passage _node_unidirectional RAPTOR Configuration embedding_model: bge-m3, chunk_token_size: 1200, chunk_overlap_token_size: 100, num_layers: 5, max_length_in_cluster: 3500, threshold: 0.1, cluster_metric: cosine, threshold_cluster_num: 5000 Figure 10: Hyperparameter configurations for the base- line RAG models. and differential Q-value analysis. In this work, we use the officially open-sourced model, which is fine-tuned from Qwen2.5-Instruct-7B. ADAPT(Deng et al., 2024b) is a discriminative reasoning framework for LLMs in legal judgment prediction that emulates human judicial processes by asking to decompose case facts into key ele- ments, discriminating among candidate charges for alignment, and predicting final judgments, further improved via multi-task fine-tuning with synthetic trajectories. In this work, we use the officially open- sourced model, which is fine-tuned from Qwen2- 7B. D.5 LegalGraphRAG Setup In the experimental setup of LegalGraphRAG, hy- perparameters are configured to optimize retrieval precision. During graph construction, the Ontol- ogy Graph utilizes k-nearest neighbors (kNN) to select the top-3 case feature nodes based on cosine similarity for direct semantic matching. For the Researcher agent, the evidence-based re- trieval strategy operates with specific thresholds: the retrieval parameter is set tok = 5. This parame- ter governs both the number of top-ranked semantic concepts retrieved from the ontology graph and the scope of community expansion, a value selected based on the sensitivity analysis to balance context coverage and noise control. E Extended Case Examples In this section, we will walk through several cases to detail the retrieval and reasoning pipeline of LegalGraphRAG. Figure 11 illustrates evidence re- trieval for a Dangerous Driving case, while Figure Query The procuratorial organ alleges that at approximately 18:45 on November 10, 2020, the defendant Wang Moumou, while driving under the influence of alcohol and without a valid driver's license, was operating a passenger car (License Plate: Liao D×; the vehicle's owner was the defendant Liu Mou) southbound on Changling Street in a certain town of a certain county, Qingyuan. When reaching a traffic signal intersection, he collided with a compact sport utility vehicle (License Plate: Liao D×) driven by Zhao Moumou, who was traveling ahead in the same direction. This resulted in a road traffic accident causing damage to both vehicles.The Traffic Police Brigade of a certain county in Qingyuan determined that the defendant Wang Moumou bore full responsibility for this accident, while Zhao Moumou bore no responsibility. An appraisal conducted by the Fushun Gongzheng Judicial Appraisal Institute detected the presence of ethanol in the defendant Wang Moumou's venous blood, with a concentration of 242.5 mg/100 ml, constituting drunk driving. Case Feature D: "Driving under the influence"; O: "Traffic collision"; V: "Personal injury", "Passenger car driver"; M: "Negligence" Community Expansion Retrieval Semantic Match Retrieval Community Summary: Cases often involve offenses such as drunk driving and traffic accidents. Fact: At approximately 14:10 on October 18, 2016, the defendant Chen Wenli, while reversing a gray Wuling-brand light... Case Feature: D: "Adult"; O: "Driving a vehicle", "Failed to observe surroundings"; V: "Death after failed rescue efforts"; M: "Negligence" Name: Chen WenliCharges: Crime of Causing Death by Negligence Law Articles: 233... Fact: The procuratorial organ alleges that at approximately 18:45 on November 10, 2020, the defendant Wang Moumou, while... Case Feature: D: "Adult"; O: "Causing a traffic accident"; V: "Vehicle damage", "Public road"; M: "Negligence" Name: WangCharges: Crime of Dangerous DrivingLaw Articles: 133 Charge-Anchored Retrieval"Crime of Dangerous Driving", "Crime of Causing a Traffic Accident"... Laws: 133 Article 133 Paragraph 1 Content: Whoever drives a motor vehicle on a road under any of the following circumstances shall be sentenced to criminal detention ... Related: "Interpretation on ... of Criminal Cases of Dangerous Driving" Evidence-based Reasoning: Is the act committed while driving a motor vehicle on a road?Yes. The defendant, Li Moujia, was operating an... Is it driving a motor vehicle while intoxicated?Yes. The forensic appraisal determined that the ethanol content in ... ... Final: Yes Article 233 Final: No Final Context Related Laws: [Article 133 Paragraph 1] [Crime of Dangerous Driving] Whoever drives a motor vehicle on a road under any of the ... (Other related laws are omitted below) Similar Cases: [Charges: Crime of Dangerous Driving] [Name: Wang] The procuratorial organ alleges that at approximately 18:45 on... (Other similar cases are omitted below) Final Results Charge: Crime of Dangerous Driving Articles: 133 Imprisonment: 18 months Reasoning: Li Moujia drove a motor vehicle on a road while intoxicated (with a blood ethanol content of 155.7 mg/100 ml). His conduct satisfies the circumstance specified in Article 133-1(1)(2) of the Criminal Law, "driving a motor vehicle while intoxicated," and thus constitutes the crime of dangerous driving [1]... [1] corresponds to Article 133 [2] corresponds to Cases1([Charges: Crime of Dangerous Driving] [Name: Wang]) ... Researcher Auditor Adjudicator Figure 11: Qualitative analysis of a representative case regarding the crime of Dangerous Driving. The visualization highlights the retrieval of evidence related to specific statutory conditions. 12 demonstrates the legal reasoning process for an Occupational Embezzlement case. F Prompt Set To facilitate reproducibility and provide trans- parency into the agent behaviors, we present the specific instruction sets designed for the Re- searcher (Figures 13 and 14), Auditor (Figures 15 and 16), and Adjudicator (Figures 17 and 18) agents. These prompts orchestrate the multi-stage reasoning process described in the main text. G Related Works G.1 Legal Large Language Models The rapid evolution of LLMs has catalyzed the de- velopment of domain-specific models tailored for the legal sphere. For Chinese law, ChatLaw (Cui et al., 2023), DISC-LawLLM (Yue et al., 2023), and InternLM2Law (Fei et al., 2025) leverage extensive legal corpora, including judicial interpre- tations and statutes, to handle diverse legal tasks. Other notable models like LawGPT (Zhou et al., 2024) and Fuzi-Mingcha (Wu et al., 2023a) in- tegrate unsupervised legal texts with supervised fine-tuning to enhance domain understanding. Be- Query The defendant Zhang Mou entered into a labor contract with the Yaojiaba Tunnel Project Department of the Xiangjiaba Hydropower Station Project, originally under Sichuan Road and Bridge Construction Group Co., Ltd., serving as the head chef of the project department. His primary responsibility was the financial reimbursement for all monthly canteen expenses of the project department. On December 19, 2016, the Yaojiaba Tunnel Project Department transferred 98,160 yuan, which was the reimbursed canteen expenses, into Zhang Mou's Agricultural Bank of China card. Zhang Mou withdrew 95,000 yuan of that amount on the same day and took out the remaining 3,000 yuan the following day. Case Feature D: "Employee", "Staff"; O: "Misappropriation of funds"; V: "Company funds", "Significant amount"; M: "Subjective intent" Community Summary: Cases often involve duty-related crimes, bribery crimes, and property... Fact: From 2009 to 2011, while serving as a credit officer at the Qiuji Credit Cooperative in Suining County, the defendant Zhang ... Case Feature: D: "State Functionary"; O: "Embezzlement of funds", "Taking advantage of one's position"; V: "Unit funds"; M: "Direct intent" Name: Zhang Zhi'anCharges: Misappropriation of FundsLaw Articles: 185, 272 Fact: Since November 2009, defendant Bai has served as a client manager at the Zhushan County Branch of Bank of China Limited as ... Case Feature: D: "State Functionary"; O: "Embezzlement of public funds"; V: "Public property", "Significant amount"; M: "Direct intent" Name: BaiCharges: Misappropriation of Public FundsLaw Articles: 185, 384 "Embezzlement", "Misappropriation of funds", "Corruption" Laws: 271, 272 Article 271 Paragraph 1 Content: Employees of companies, enterprises, or other entities who, taking advantage of their positions, illegally take possession of ... Related: "Interpretation on ... Criminal Cases of Embezzlement and Bribery" Evidence-based Reasoning: Is the defendant an employee of a company, enterprise, or other entity?Yes. The defendant Zhang signed a labor contract... Did the defendant abuse his position?Yes. Zhang's main responsibility was handling financial reimbursement for the ... ... Final: Yes Article 271 Paragraph 2 Final: No Final Context Related Laws: [Article 271 Paragraph 1] [job-related embezzlement] Employees of companies, enterprises, or other entities who... (Other related laws are omitted below) Similar Cases: [Charges: job-related embezzlement] [Name: Xu 3Mou] Between December 2007 and December 2009, the defendant Xu... (Other similar cases are omitted below) Final Results Charge: job-related embezzlement Articles: 271 Imprisonment: 18 months. Resoning: Zhang served as the head chef of the project department and was responsible for financial reimbursement, which qualifies him as a "personnel of a company, enterprise, or other unit" [1]. By taking advantage of his duty in handling canteen expenses... [1] corresponds to Article 271 Paragraph 1 [2] corresponds to Cases1([Charges: job-related embezzlement] [Name: Xu 3Mou]) ... Article 272 Final: No Researcher Auditor Adjudicator Community Expansion Retrieval Semantic Match Retrieval Charge-Anchored Retrieval Figure 12: Qualitative analysis of a representative case regarding the crime of Occupational Embezzlement. The example demonstrates the model’s reasoning in identifying the abuse of professional position. yond Chinese, SaulLM (Colombo et al., 2024) fo- cuses on English legal texts based on the Mixtral architecture, while LawLLM (Shu et al., 2024) addresses US legal tasks such as similar case re- trieval. Additionally, specialized models like In- LegalLLaMA (Ghosh et al., 2024) target Indian and French legal domains respectively. These mod- els provide crucial baselines for downstream tasks but often lack the specific reasoning architecture required for complex judgment prediction. G.2 Legal judgment prediction Legal judgment prediction (LJP) has experienced significant development and become an increas- ingly crucial NLP task.Earlier research (Se- gal, 1984) relied on artificially designed features, and traditional machine learning methods (Sulea et al., 2017) were applied to predict legal judg- ments. Recent advances in deep learning (Xu et al., 2020; Han and Zhicheng, 2023) have mo- tivated researchers to leverage neural networks for automated text representation learning. Re- cently, LLMs have further promoted the progress of LJP (Deng et al., 2024a). Several studies (Wu et al., 2023b; Peng and Chen, 2024) employ Retrieval- Augmented Generation (RAG) to enhance LLMs by incorporating external legal knowledge. To re- fine decision-making, recent works have introduced structured reasoning frameworks that systemati- cally decompose case facts to distinguish confusing Criminal Case Keyword Extraction Task Definitions: Extract legal keywords from a criminal case description and classify them into four categories: Defendant Attributes, Criminal Behaviors, Victim Characteristics, and Subjective Mental States. The output must be a strictly valid JSON object without additional text. Keyword Definitions: • Defendant Attributes: Legal traits (e.g., age group, criminal history, occupation). Avoid specific names or numbers. • Criminal Behaviors: Legal types of acts and significant methods. Exclude specific time/location details. • Victim Characteristics: Nature of the property or location. Generalize specific amounts (e.g., “large amount”). • Subjective Mental States: Legal descriptions of intent and remorse. Output Example: “Defendant_Attribute”: [“Adult”, “Prior Criminal Record”], “Criminal_Behaviors”: [“Theft”, “Burglary”], “Victim_Characteristics”: [“Private Residence”, “Large Amount”], “Subjective_Mental_States”: [“Direct Intent”, “Voluntary Surrender”] Figure 13: Prompt for the Researcher agent to extract and classify legal keywords from case descriptions. Charge Pre-judge(for Charge-Anchored Retrieval) Task Definitions: Act as a criminal law expert to analyze the provided case (case_text). • Output reasonably possible charges (confidence > 30%) sorted by probability (descending). • If a dominant charge exists (confidence > 70%), prioritize it; if it is the only certain charge, output it exclusively. • Exclude charges with probability < 10%. Format Definitions: • Output strictly as a Python list: [’Charge 1’, ’Charge 2’, ...]. • The output must start with [. • Return an empty list [] if no charge matches. • No additional explanations or text allowed. Figure 14: Prompt for the Researcher agent to pre-judge potential charges for charge-anchored retrieval. charges (Jiang and Yang, 2023; Deng et al., 2024b; Wang et al., 2024). Furthermore, multi-agent simu- lation frameworks have been explored to improve performance by simulating court debates and ana- lyzing cases from diverse perspectives (He et al., 2024b). However, existing LLM-based methods still struggle to utilize comprehensive legal knowl- edge (Fei et al., 2024) effectively. In this context, we make full use of external knowledge and prece- dents within a unified framework. G.3 Reasoning skills in legal domain Recent work has improved LLMs’ reasoning through better prompting techniques (Sahoo et al., 2024). Chain-of-thought (CoT) (Wei et al., 2022) prompting can explicitly guide LLMs to reason Auditor Checklist(item) Task Definitions: Act as a legal AI assistant to assess if the case facts strictly satisfy a specific constituent element of the law. • Analyze the law_item and case facts. • Focus exclusively on the target element (e.g., “intent”), using related materials (if provided) for interpretation. • determine applicability based on facts and logic. I/O Specifications: • Input: law_item, related (supplementary materials), element, case. • Output: Provide reasoning first, then enclose the final result strictly within tags: <answer>true</answer> or <answer>false</answer>. Template: law: law_item, related: related element: element, case: case Figure 15: Prompt for the Auditor agent to verify if case facts satisfy specific constituent elements of the law. Auditor Checklist(final) Task Definitions: Act as a legal analysis assistant to determine if the provided law article applies to the specific case (i.e., verify violation or crime). • Identify all relevant constituent elements from the law text. • Verify critical elements independently; note that the provided true_list and false_list may be incomplete. I/O Specifications: • Input Variables: case, law, true_list (proven elements), false_list (disproven elements). • Output: Provide reasoning first, then enclose the final result strictly within tags: <answer>true</answer> or <answer>false</answer>. Template: case: case, law: law true_list: true_list, false_list: false_list Figure 16: Prompt for the Auditor agent to assess the overall applicability of a law based on verified elements. step by step. In the legal domain, researchers have adapted CoT to legal-specific frameworks. For in- stance, Yu et al. (Yu et al., 2022) demonstrated that incorporating the IRAC (Issue, Rule, Application, Conclusion) framework significantly enhances rea- soning capabilities. LoT (Jiang and Yang, 2023) proposed legal syllogism reasoning to improve performance on LJP tasks, and ADAPT (Deng et al., 2024b) established a workflow enabling dis- criminative reasoning. Moreover, approaches like MALR (Yuan et al., 2024) utilize parameter-free learning to decompose complex legal tasks, while CaseGPT (Yang, 2024) combines LLMs with RAG to support semi-structured reasoning and legal ar- gumentation (Westermann, 2024). Additionally, GLARE (Yang et al., 2025b) leverages an agen- tic framework and web data for legal reasoning. However, these approaches primarily rely on in- trinsic capabilities or noisy external data, which constraints reasoning depth (Zhang, 2024; Ke et al., 2025). Therefore, we propose an agentic frame- work to dynamically acquire key legal knowledge, enhancing both breadth and depth. Charge & Sentencing (JSON) Task Definitions: Act as a legal expert to adjudge the defendant based on candidate charges. • 1. Final Charge Application: For concurrence, apply the “heavier penalty” rule; for multiple acts, apply combined punishment. • 2. Sentencing: Predict the specific law article and a reasonable sentencing range based on facts and judicial practice. Format Definitions: • charge_name: [Charge A, ...], law_article: [Art. X, ...], term_of_imprisonment: death_penalty: boolean, imprisonment: integer (months), life_imprisonment: boolean Figure 17: Prompt for the Adjudicator agent to generate structured sentencing predictions and apply legal rules. Legal Reasoning & Verdict Task Definitions: Act as a legal consultant to analyze the case using the provided Context documents. • Step 1: Fact & Act Analysis: Analyze how many independent criminal acts exist. Explicitly cite the supporting evidence from the context using [1][2].... • Step 2: Law Application: Resolve any legal concurrence (e.g., Imaginative Concurrence vs. Combined Punishment). Explain why specific articles apply over others. • Step 3: Sentencing Prediction: comprehensive assessment of sentencing based on statutory rules. Output Format: • Structure: Output in two clear sections: Legal Analysis (reasoning with citations) and Final Verdict (conclusion). • Requirement: You must mark the source of your facts or laws using brackets like [1]. Template: Context: context_list, Case: case_description Figure 18: Prompt for the Adjudicator agent to synthesize legal reasoning and output the final verdict. G.4 RAG in legal domain In the legal domain, recent studies have adapted RAG and graph-based solutions for specific tasks, particularly Legal Question Answering (LQA) and retrieval pipelines. For instance, recent works optimize LLM outputs by incorporating external case-based information (Wiratunga et al., 2024; Louis et al., 2024) or utilizing adapt-retrieve-revise pipelines (Wan et al., 2024) to combine contin- ual training with evidence revision. Dedicated benchmarks such as LegalBench-RAG show that the retrieval stage remains a bottleneck (Pipitone and Alami, 2024). Works enriching retrieval with structural information (e.g., graphs of articles) demonstrate gains in tasks like statutory article re- trieval (Louis et al., 2023; Hei et al., 2024; Ho et al., 2025). Recently, the SAT-Graph RAG frame- work (de Martim, 2025) was proposed to model the hierarchical structure of legal norms. However, its sophisticated ontology-driven approach requires heavily structured input data, limiting its applica- bility to less curated corpora. The Usage of LLMs In this paper, LLMs were used only to polish the writing and correct grammatical errors for clarity. In the preparation of this manuscript, we utilized Large Language Models (LLMs) to assist with the writing process. Specifically, the model was used to refine the English text, including correcting gram- matical errors and improving sentence clarity. Ad- ditionally, LLMs assisted in the initial formatting of several tables. The authors reviewed all model suggestions and retain full responsibility for the sci- entific accuracy and integrity of the final content.