RAG-LegalAssist: a retrieval-augmented framework with adaptive hybrid legal chunking for high-precision legal retrieval
Year: 2026
Type: article
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.
Source: Scientific Reports
Institution: Amrita Vishwa Vidyapeetham
Language: English
Subfield: Law
Field: Social Sciences
Domain: Social Sciences
Open Access status: gold
Estimated APC paid: $2,690
OpenAlex ID: W7235547967
