RAG-LegalAssist: a retrieval-augmented framework with adaptive hybrid legal chunking for high-precision legal retrieval

Legal documents are long, structurally complex, and semantically dense, which makes manual analysis and information retrieval time consuming and prone to error. Traditional keyword based retrieval methods often fail to capture the hierarchical and contextual dependencies of legal text. At the same time, standalone large language models are limited by context constraints and may generate unsupported or hallucinated outputs when processing long documents. To address these challenges, this paper proposes RAG LegalAssist, a retrieval augmented generation framework for legal question answering that incorporates an Adaptive Hybrid Legal Chunker. The proposed chunking method combines structure aware rule based segmentation, semantic similarity based splitting, and length constrained chunking. This design preserves legal boundaries while ensuring compatibility with model context limits. The system is evaluated on the European Court of Human Rights dataset containing about 11,000 legal judgments. Document segments are embedded using BGE embeddings and indexed with FAISS. Response generation is carried out using the Qwen2.5 1.5B Instruct model. Experimental evaluation across multiple phases, including large scale query testing, query type analysis, prompt comparison, paraphrase robustness, and chunking strategy evaluation, shows strong performance. The system achieves a Precision@5 of 0.40, Recall@5 of 0.82, Mean Reciprocal Rank (MRR) of 0.84, and nDCG@5 of 0.85. Generation evaluation shows Groundedness of 0.8749, Faithfulness of 0.9664, and a hallucination rate of 0.0000 under the adopted evaluation criterion.

Authors

Institutions

Publication Details

Journal
Scientific Reports
Published
2026-11-17
DOI
https://doi.org/10.1038/s41598-026-78710-z
Primary Topic
Artificial Intelligence in Law
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

RAG-LegalAssist: a retrieval-augmented framework with adaptive hybrid legal chunking for high-precision legal retrieval

G Bharathi Mohan, Nethi Sathwik, Voota Koushik, Nallamilli Lakshmi Jayanth Reddy et al.
3 links
Scientific Reports
Artificial Intelligence in Law
article

RAG-LegalAssist: a retrieval-augmented framework with adaptive hybrid legal chunking for high-precision legal retrieval

G Bharathi Mohan, Nethi Sathwik, Voota Koushik, Nallamilli Lakshmi Jayanth Reddy, Talasila Balaji
article en

Abstract

Legal documents are long, structurally complex, and semantically dense, which makes manual analysis and information retrieval time consuming and prone to error. Traditional keyword based retrieval methods often fail to capture the hierarchical and contextual dependencies of legal text. At the same time, standalone large language models are limited by context constraints and may generate unsupported or hallucinated outputs when processing long documents. To address these challenges, this paper proposes RAG LegalAssist, a retrieval augmented generation framework for legal question answering that incorporates an Adaptive Hybrid Legal Chunker. The proposed chunking method combines structure aware rule based segmentation, semantic similarity based splitting, and length constrained chunking. This design preserves legal boundaries while ensuring compatibility with model context limits. The system is evaluated on the European Court of Human Rights dataset containing about 11,000 legal judgments. Document segments are embedded using BGE embeddings and indexed with FAISS. Response generation is carried out using the Qwen2.5 1.5B Instruct model. Experimental evaluation across multiple phases, including large scale query testing, query type analysis, prompt comparison, paraphrase robustness, and chunking strategy evaluation, shows strong performance. The system achieves a Precision@5 of 0.40, Recall@5 of 0.82, Mean Reciprocal Rank (MRR) of 0.84, and nDCG@5 of 0.85. Generation evaluation shows Groundedness of 0.8749, Faithfulness of 0.9664, and a hallucination rate of 0.0000 under the adopted evaluation criterion.

Scientific Reports
Amrita Vishwa Vidyapeetham (IN)
Peace, justice, and strong institutions
Artificial Intelligence in Law
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon