Enhanced Legal Information Access in Nigeria: A Novel Retrieval Augmented Generation (RAG) Approach

Abstract

This study presents a novel Retrieval Augmented Generation (RAG), a text-based query system, for efficient access to Nigerian legal information. Utilizing the Nigerian Constitution and Criminal Code as its knowledge base, the system employs a pipeline involving semantic segmentation, Sentence Transformer embeddings, and vector database indexing for optimized information retrieval. User queries are refined by a Google Gemini large language model, trained as a Nigerian legal expert, to identify key terms and intent before searching the database for the top ten most relevant document chunks. These chunks, along with the refined query and keywords, are then fed back into Gemini to generate a detailed, referenced answer. The current implementation is evaluated using the precision. Recall, F1Score, perplexity and diversity metrics, and results fall within acceptable benchmarks of mean values (0.65, 0.73, 0.68, 14.42, 0.87) respectively, representing a significant advancement in making complex legal big data accessible.

Description

Citation

Echeonwu, E. C., Bolou, D. B., Omonijo, O. O., Ugbogbo, M. J., & Omejieke, C. E. (2025). Enhanced legal information access in Nigeria: A novel retrieval augmented generation (RAG) approach. International Journal of Innovative Science and Research Technology, 10(12), 1822–1828. https://doi.org/10.38124/ijisrt/25dec1333

Endorsement

Review

Supplemented By

Referenced By