Skip to content

Back to the catalog

Legal-R1: Agentic Retrieval for Evidence-Based Legal Reasoning
arxiv.orgpaper

Legal-R1: Agentic Retrieval for Evidence-Based Legal Reasoning

Legal-R1 is an agentic retrieval framework for evidence-based legal question answering that splits reasoning across three agents. A Lawyer agent decides when to retrieve, which legal source to query, what evidence to seek and when it has enough. A Legal Assistant retrieves statutes and precedent cases with authority-aware and diversity-aware selection, and a Judge agent writes the final answer from the full evidence trajectory. Only the Lawyer agent is post-trained, using masked supervised fine-tuning and trajectory-aware reinforcement learning. The paper reports gains over general-purpose, legal-specific and retrieval-augmented baselines on several Chinese legal benchmarks.

TL;DR Multi-agent agentic RAG for legal QA: an RL-trained Lawyer agent controls retrieval of authoritative, diverse evidence, beating RAG and legal-LLM baselines on Chinese benchmarks.
Document

What it claims

Legal-R1 trains only the planning ("Lawyer") agent of a three-agent legal QA pipeline to decide, turn by turn, whether to query statutes, query precedents, or stop. Retrieval of precedents is reranked for court authority and diversity of sentencing outcome, not just semantic similarity. Because the Lawyer is trained separately from answer generation, the authors say the trained planner can be paired with different Judge (answer-writer) models. Everything is Chinese law, and precedent retrieval covers criminal cases only. Code, model and data are said to be at https://github.com/killerqueen-wonder/Legal-R1.

How it works

flowchart TD
    Q[Legal question] --> L[Lawyer agent: rethink]
    L -->|STATUTE + intent| S[Statute search, LLM rerank by intent]
    L -->|PRECEDENT| P[Case search, authority + PSI-diverse MMR, LLM summarize]
    S --> L
    P --> L
    L -->|STOP| J[Judge agent: answer from full trajectory]
  • Action space: {STATUTE, PRECEDENT, STOP}. After each evidence unit the Lawyer decides to continue with the same source, switch source, or stop.
  • Statute retrieval: the Lawyer passes a query plus an "intent", for example a sentencing range, the elements of an offense, or an exception clause. An LLM reranker conditions on that intent.
  • Precedent reranking:
  • Base score is α·Rel + (1−α)·Auth, where Auth is a normalized court-authority score.
  • The MMR-style penalty β·max SimPSI is based on a Punishment Severity Index. It pushes the selected cases toward differing sentencing outcomes.
  • An LLM then condenses each case into facts, court level, outcome and sentence.
  • Training data: a teacher model plays the Lawyer against the real retrieval tools to synthesize multi-turn trajectories. The teacher model is not named in the text shown. The data spans five categories:
CategoryItems
Retrieval1,300
Understanding7,423
Reasoning4,707
Generation2,928
Consultation2,582

That sums to about 18.9k items. The authors claim fingerprint-based contamination filtering against the test sets.

  • SFT: standard causal LM loss, with tokens of retrieved evidence masked out. The goal is to learn the protocol and queries, not to memorize statutes.
  • RL: GRPO with a composite reward made of:
  • answer accuracy
  • alignment with the synthesized trajectory
  • evidence gain (whether the retrieved evidence supports the answer)
  • query quality
  • format
  • a penalty for verbosity and repeated retrieval loops
  • KL regularization

Related work mentions a "fine-tuned critique model" anchoring the reward, but the method section shown does not describe it.

Evidence

Knowledge base sizes:

  • Statutes: 296 active laws (43,117 articles) and 555 judicial interpretations (6,370 articles) from China's National Database of Laws and Regulations. Each article carries an effective date.
  • Precedents: 53,277 criminal judgments from LeCaRDv2.

Evaluation is on LawBench and LexEval, scored with both traditional metrics and an LLM judge. The fetched table is cut off before Legal-R1's own row. The baseline averages that are visible:

ModelSizeAvg
LawGPT7B10.94
Luwen7B23.45
LegalOne8B35.84

Qwen3-8B (no retrieval) scores 24.70 / 40.20 on the LawBench columns; its remaining scores are cut off. The paper claims to beat these and RAG-based legal systems, and says ablations credit both post-training and the authority/diversity reranking. Those numbers are not in the fetched text.

How to use it

The only adoption detail on the page is the repo link above. The text shown gives no base-model size for the Lawyer, no Judge model, no licence and no run commands. Check the repo.

Limits

  • Chinese law only. Precedent retrieval and the PSI diversity term are built around criminal sentencing, so civil or other-jurisdiction use would need a new case corpus and a new diversity signal.
  • The Lawyer's RL reward is anchored to teacher-synthesized trajectories, so the policy partly imitates the teacher's retrieval habits.
  • Fetched text ends mid-results table: Legal-R1's scores, the ablations and any stated limitations were not available for this write-up.

Organisations named here

  • arXiv

Technologies named here

  • Legal-R1
  • RAG

Techniques named here

  • Agentic retrieval
  • Masked supervised fine-tuning
  • Trajectory-aware reinforcement learning
  • Authority-aware and diversity-aware evidence selection