NyayaAI用多智能体和检索增强生成,让印度法律信息更易获取。
NyayaAI: An AI-Powered Legal Assistant Using Multi-Agent Architecture and Retrieval-Augmented Generation

- 构建多智能体系统,分工完成法律研究、摘要、判例检索与文书撰写。
- 在测试中实现70%的领域分类精度、74%的检索精度和72%的回答准确率。
- 适合律师、法学生及公众使用,代码已开源供研究社区共享。
印度法律信息因法律语言复杂和文档量庞大而难以获取。本文提出NyayaAI,一个基于大语言模型与检索增强生成技术的AI法律助手,整合了宪法条文、法律、判例和司法先例组成的定制化印度法律知识库。系统采用由Mastra TypeScript框架协调的多智能体架构,包含主代理及负责法律研究、文档摘要、判例检索与起草辅助的专用子代理,并通过合规模块验证输出。在测试中,领域分类精度达70%,RAG检索精度为74%,整体回答准确率为72%,证明结构化的多智能体大模型系统能显著提升法律可及性与工作流程效率。代码已公开(https://github.com/B97784/NyayaAI),供研究社区使用。
原文摘要 · Abstract (English)
Legal information in India remains largely inaccessible due to the complexity of legal language and the sheer volume of legal documentation involved in research and case analysis. This paper presents NyayaAI, an AI-powered legal assistant that automates and simplifies legal workflows for lawyers, law students, and general users. The system combines Large Language Models with a Retrieval-Augmented Generation pipeline grounded in a curated Indian legal knowledge base comprising constitutional provisions, statutes, case laws, and judicial precedents. A multi-agent architecture orchestrated through the Mastra TypeScript framework coordinates a main agent with specialized sub-agents handling legal research, document summarization, case law retrieval, and drafting assistance. A compliance module validates all responses before delivery. Domain classification achieved 70\% precision across test samples, with RAG retrieval precision at 74\% and overall response accuracy at 72\%, demonstrating that structured multi-agent LLM systems can meaningfully improve legal accessibility and workflow efficiency. The code\footnote{https://github.com/B97784/NyayaAI} is made publicly available for the benefit of the research community.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。