J-KGRAG: A Hybrid Retrieval-Augmented Generation Architecture for Legal Norm Understanding with Knowledge Graphs - Oliveira, Vinícius Teles; Lima, Maurício Rodrigues; Teles, Sávio; Dias, Elisângela Silva (Anais do Congresso Latino-Americano de Software Livre e Tecnologias Abertas (Latinoware); 2025: Anais do XXII Congresso Latino-Americano de Software Livre e Tecnologias AbertasDO - 10.5753/latinoware.2025.16269, 2025)
This paper presents Juridic KGRAG (J-KGRAG), a hybrid architecture that enhances Retrieval-Augmented Generation (RAG) by integrating structured legal knowledge through a domain-specific knowledge graph. The system is designed to address the challenge of retrieving up-to-date legal information in highly interdependent normative documents, a frequent scenario in the Brazilian public sector. The method is applied to a corpus of 42 normative acts from Court of Accounts of the State of Goiás, Brazil, where legal articles are frequently updated, repealed, or referenced by newer documents. J-KGRAG enriches standard dense retrieval with a graph-based expansion step that identifies and retrieves updated entities omitted in the initial search. Experimental results indicate a significant improvement in factual accuracy (+75%) and overall answer correctness (+16%) compared to a naive RAG baseline. In addition, a manually curated benchmark of 53 legal question–answer pairs is released, and a qualitative analysis is performed to highlight the advantages of structured retrieval. The results demonstrate that combining symbolic legal representations with LLM-based generation improves both the consistency and the reliability of answers in legal domains.