LegalWorld: Building a Full‑Lifecycle Interactive Simulation World for Legal AI Agents
LegalWorld creates an interactive environment that simulates the entire Chinese civil litigation process—from consultation to second‑instance trial—using over 75,000 paired first‑ and second‑instance judgments, supports heterogeneous LLM agents, and provides the LongJud‑Bench benchmark to evaluate and improve legal AI performance.
Introduction
LegalWorld addresses the limitation of existing legal simulators that only model isolated points (e.g., a single trial) by offering a continuous, full‑lifecycle environment covering five stages and seven sub‑scenes: legal consultation, first‑instance drafting, first‑instance trial, appeal drafting, appeal trial, and second‑instance trial.
Construction Method
The system converts paired first‑ and second‑instance civil judgments into runnable case seeds. Each case is represented as a state chain that is updated step‑by‑step; the environment releases facts, evidence, claims, and documents appropriate to the current stage and role, and writes back new dialogues, documents, and judgments for the next stage.
Data Foundation
LegalWorld is built on 75,309 matched first‑ and second‑instance civil cases covering more than 500 civil causes, collected from China Judgments Online. These pairs are transformed into structured seeds containing parties, claims, facts, evidence, first‑instance rulings, appeal requests, and second‑instance rulings.
State, Interface, and Stage Transition
For each case and stage, the environment generates a role‑specific interface that limits visible information, permissible actions, and accessible Skills/Tools. The stage transition reads the previous stage’s state, assigns role‑specific visibility and tool permissions, records new outputs, and writes them back to the case state, forming a reproducible litigation trajectory.
Heterogeneous Roles
Client Agent : Represents the litigant, provides facts, expresses demands, and responds to queries; modeled using the Legal Client Persona Framework (LCPF) across legal literacy, disclosure willingness, emotional stability, and narrative ability.
Lawyer Agent : Core professional role handling consultation, document drafting, and advocacy; evaluated as the target agent in experiments.
Judge Agent : Controls trial flow, conducts investigations, and issues judgments for both first‑ and second‑instance trials.
Each role sees only its permitted information, mirroring real‑world confidentiality constraints.
Dual‑Memory Mechanism
Local memory : Stores dialogue within the current scene (e.g., consultation Q&A, trial exchanges).
Global case memory : Persists cross‑stage facts, evidence, claims, defenses, procedural progress, and party goals, enabling long‑term continuity.
The two‑level memory ensures agents cannot restart from scratch at each stage.
Skill / Tool Framework
Skill : Procedural guidelines for each stage (e.g., how to interview a client, draft a complaint, or argue in trial).
Tool : Executable functions such as reading/writing memory, exporting documents, retrieving statutes, checking citations, comparing documents, and running evaluations.
These constraints enforce realistic legal workflows beyond pure text generation.
Experiment Setup – LongJud‑Bench
LongJud‑Bench evaluates legal agents across eight dimensions: consultation identification, document drafting, fact‑evidence organization, trial advocacy, legal reasoning, etc. Multiple large‑language models are inserted as target lawyer agents and assessed on the full litigation lifecycle.
Results
4.1 Environment Reliability
217 legal experts provided 18,992 ratings; LegalWorld achieved average scores of 8.96/10 for stage authenticity and 8.98/10 for role consistency, with 73% of scores ≥9, confirming the environment’s fidelity.
4.2 Model Performance
Heatmaps show that no single model dominates all abilities. Some excel at document drafting and client identification, while others are stronger in trial evidence handling. All models struggle most with the trial stage, which requires dynamic, multi‑turn reasoning and memory integration.
4.3 Skill Accumulation
Introducing Reflective Legal Skill (RLS)—where a finished case is reviewed to extract reusable legal practice rules—improved average total scores from 61.56 to 65.29 (≈3.7 points) on high‑frequency causes (divorce property, private lending, labor disputes) and also yielded positive transfer to held‑out cases.
Conclusion
LegalWorld demonstrates that building trustworthy social agents requires continuous, cross‑stage interaction, persistent memory, and goal maintenance, not just isolated point‑wise correctness. The platform is publicly available for both participation and observation, inviting further research on long‑term AI‑driven legal reasoning.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Machine Learning Algorithms & Natural Language Processing
Focused on frontier AI technologies, empowering AI researchers' progress.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
