In this paper, we present a simulation system called AgentCourt that simulates the entire courtroom process. The judge, plaintiff's lawyer, defense lawyer, and other participants are autonomous agents driven by large language models (LLMs). Our core goal is to enable lawyer agents to learn how to argue a case, as well as improving their overall legal skills, through courtroom process simulation. To achieve this goal, we propose an adversarial evolutionary approach for the lawyer-agent. Since AgentCourt can simulate the occurrence and development of court hearings based on a knowledge base and LLM, the lawyer agents can continuously learn and accumulate experience from real court cases. The simulation experiments show that after two lawyer-agents have engaged in a thousand adversarial legal cases in AgentCourt (which can take a decade for real-world lawyers), compared to their pre-evolutionary state, the evolved lawyer agents exhibit consistent improvement in their ability to handle legal tasks. To enhance the credibility of our experimental results, we enlisted a panel of professional lawyers to evaluate our simulations. The evaluation indicates that the evolved lawyer agents exhibit notable advancements in responsiveness, as well as expertise and logical rigor. This work paves the way for advancing LLM-driven agent technology in legal scenarios. Code is available at https://github.com/relic-yuexi/AgentCourt.
翻译:本文提出了一种名为AgentCourt的模拟系统,该系统能够模拟完整的法庭审理流程。法官、原告律师、被告律师及其他参与者均为由大语言模型(LLMs)驱动的自主代理。我们的核心目标是通过法庭流程模拟,使律师代理能够学习如何进行案件辩论,并提升其综合法律技能。为实现这一目标,我们为律师代理提出了一种对抗性进化方法。由于AgentCourt能够基于知识库和LLM模拟法庭听证的发生与发展过程,律师代理可以持续从真实法庭案例中学习并积累经验。模拟实验表明,当两位律师代理在AgentCourt中完成上千次对抗性法律案件(相当于现实律师十余年的经验积累)后,与进化前状态相比,进化后的律师代理在处理法律任务的能力上呈现出持续提升。为增强实验结果的可靠性,我们邀请了专业律师组成评审小组对模拟过程进行评估。评估结果表明,进化后的律师代理在应答能力、专业素养及逻辑严谨性方面均表现出显著进步。本工作为推进LLM驱动代理在法律场景中的应用奠定了基础。代码发布于https://github.com/relic-yuexi/AgentCourt。