Using Retrieval-Augmented Generation to Improve Access to Legal Documents

View at publisher
Authors: Eniedson Fabiano Pereira da Silva Júnior, Cláudio de Souza Baptista, André Luíz Firmino Alves, Francisco Igor de Lima Mendes
Cited by: 1
References: 15

Abstract

Access to legal and regulatory documents is critical for efficient government operations, yet current search systems rely on rigid metadata and lack contextual understanding. This paper presents a Retrieval-Augmented Generation (RAG) frame-work that integrates hybrid retrieval with a keyword extraction module to improve precision by identifying key terms from the query. The system ingests and indexes over 7,000 Brazilian legislative documents, enabling natural-language question answering through multiple large language models (LLMs). We evaluate nine RAG configurations combining open-source and proprietary models using recall, MRR, BERTScore, and METEOR. The best setup in the retrieval step (Mistral + bge-m3 embeddings) achieved 0.852 recall, while Llama 4 Maverick obtained 0.785 BERTScore and 0.48 METEOR. These results demonstrate that RAG architectures can substantially improve factual accuracy and retrieval coverage in legal-document access. Among the open-source models showed particularly promising performance, highlighting the growing competitiveness of community-driven LLMs in specialized legal retrieval tasks.

Fields of Study & Subjects

Topic Modeling Information Retrieval and Search Behavior Artificial Intelligence in Law

Publication details

Journal / source
2026 International Conference on Semantic Computing (ICSC)
Publisher
IEEE
Pages
328–335
Publication date
2 February 2026