用检索与上下文增强生成技术,自动起草市政法律回复函。
LegalCheck: Retrieval- and Context-Augmented Generation for Drafting Municipal Legal Advice Letters

- 结合RAG与CAG,从法规库中检索并融合案件细节生成文书。
- 生成的信件80%~100%覆盖关键法律推理,准确率高且可解释。
- 适合需高效、一致处理法律文书的政府机构使用。
荷兰公共部门法律部门面临人员短缺、案件量上升及合规压力。本文提出LegalCheck系统,通过检索增强生成(RAG)与上下文增强生成(CAG)相结合,利用大语言模型(LLM)和定制法律知识库,自动起草异议回应函。系统检索相关法规与判例,通过受控提示将外部知识与案件具体信息整合为连贯草稿。专家介入审核确保法律正确性与情境适配性。在阿姆斯特丹市实际部署中,LegalCheck可在数分钟内生成接近终稿的法律建议,较人工大幅提速,同时保持高法律一致性与事实准确性。输出基于真实法规与先例,涵盖80%至100%的必要法律推理内容。法律从业者反馈系统显著减轻工作负担,保障法律标准统一应用,且不取代人类判断。结果表明该系统带来显著效率提升、法律一致性改善及用户积极接受。本研究展示了通过引入领域知识与治理机制,负责任地部署AI于法律领域的可行性。
原文摘要 · Abstract (English)
Public-sector legal departments in the Netherlands face acute staff shortages, increased case volumes, and increased pressure to meet regulatory compliance. This paper presents LegalCheck, a novel system that addresses these challenges by automating the drafting of objection response letters through a combination of Retrieval-Augmented Generation (RAG) and Context-Augmented Generation (CAG). Using a large language model (LLM) alongside curated legal knowledge bases, LegalCheck performs retrieval of relevant laws and precedents, and uses controlled prompting to incorporate both external knowledge and case-specific details into a coherent draft. An expert-in-the-loop review ensures that each generated letter is legally sound and contextually appropriate. In a real-world deployment within the Municipality of Amsterdam, LegalCheck produced near-final advice letters in minutes rather than hours, while maintaining high legal consistency and factual accuracy. The output is based on actual regulations and prior cases, providing explainable outputs that captured the vast majority of required legal reasoning (often 80\% to 100\% of essential content). Legal professionals found that the system reduced their workload and ensured a consistent application of legal standards, without replacing human judgment. These results demonstrate substantial efficiency gains, improved legal consistency, and positive user acceptance. More broadly, this work illustrates how responsible AI can be deployed in the legal domain by augmenting LLMs with domain knowledge and governance mechanisms.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。