NyayaAI: An AI-Powered Legal Assistant Using Multi-Agent Architecture and Retrieval-Augmented Generation

Deepanshu, Divi Saxena, Deepali Rana, Ayesha Varshney, Sahinur Rahman Laskar
5/11/2026
cs.CL
rag

Official code: B97784/NyayaAI (0 stars, Python, last commit 2026-05-12).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

B97784/NyayaAIOfficial100%
01Python, DockerfileMay 10, 20266 months ago

Similar Papers

Cite this paper

@article{deepanshu2026nyayaai,
  title  = {NyayaAI: An AI-Powered Legal Assistant Using Multi-Agent Architecture and Retrieval-Augmented Generation},
  author = {Deepanshu and Divi Saxena and Deepali Rana and Ayesha Varshney and Sahinur Rahman Laskar},
  year   = {2026},
  eprint = {2605.10155},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2605.10155v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2605.10155.svg)](https://codeofpaper.com/paper/2605.10155)

Discussion