Structure aware retrieval improves legal document search accuracy
StrucChunk: Structure-Aware Retrieval for Legal Document RAG
Artificial Intelligence
Summary
Legal documents are complex with many sections and cross-references, making it hard for computers to find exact and relevant information. The authors developed StrucChunk, a method that respects the document's structure and citation links to split and search legal texts better. Their approach combines advanced text search techniques and keeps legal sections intact, which significantly improves retrieval accuracy across multiple languages and legal systems. StrucChunk also greatly reduces unnecessary splits in documents, improving efficiency.
What this means in practice
- •For legal technology developers: Improve legal document search by preserving clause boundaries and cross-references for more precise retrieval in multilingual and multi-jurisdictional systems.
- •For enterprise knowledge management teams: Enhance retrieval quality and efficiency in large corporate legal or compliance databases by reducing document fragmentation and improving citation matching.
Authors
Surya Deep Singh, Ashutosh Tripathi, Gaurav Deep Singh
Abstract
Retrieval-Augmented Generation (RAG) can ground LLM outputs in domain-specific knowledge, but legal documents are hard: standard chunking fragments hierarchical argument structure, and generic embeddings struggle with both precise citation matching and semantic understanding. We propose StrucChunk (Structure Aware Chunking) with hybrid dense-sparse retrieval for hierarchically structured legal documents. It treats documents as directed acyclic graphs of provisions, preserves clause boundaries, resolves cross-references before embedding, and combines BM25 with BGE-M3 via Reciprocal Rank Fusion. We evaluate on five corpora, three legal traditions and two languages. StrucChunk reaches 100% boundary precision (vs. 7.7% for recursive splitting on CrPC), preserves 97.6% of documented cross-references (vs. 0%), and matches section coverage with 40.3% fewer chunks on GDPR. On LegalBench-RAG (6,858 query-passage pairs), it achieves Char-Recall@8 of 48.18% vs. 23.59% for the best baseline (+104%), surpassing the published state of the art by +83%. On 501 queries each for CrPC and CPC (Indian law), Recall@5 improves from 0.557 to 0.804 (+44.4%) and from 0.158 to 0.259 (+64.6%); chunking accounts for 88% and 73% of the gain. On 501 GDPR queries, Recall@5 is 0.868 with R@1 improving +59%. On NitiBench-CCL (3,730 Thai financial law queries), HR@5 is 0.856 vs. 0.594 for naive chunking (+44.1%), showing that section-boundary alignment is the dominant factor across languages, and cross-reference augmentation adds +2.3% on cross-reference queries. We release the implementation, 5,256 evaluation queries across five legal corpora, annotation methodology and chunking quality metrics. Code: github.com/SinghSuryaDeep/legal-rag-strucchunk-1