Retrieval-Augmented Generation and Knowledge Graphs in Portuguese-Language Legal Documents

Vinícius Teles de Oliveira, Deivison Oliveira da Silva, Mateus de Almeida Souza, Maurício Rodrigues Lima, Sávio Salvarino Teles de Oliveira, Thierson Couto Rosa


Abstract
This paper introduces a Graph Retrieval-Augmented Generation (GraphRAG) pipeline tailored for Question Answering (Q A) within Portuguese legal documents. Applied to a corpus of 203 normative resolutions from Companhia Energética de Minas Gerais (CEMIG), the proposed approach addresses the structural complexity of legal texts, such as hierarchical dependencies and temporal modifications. By explicitly modeling documents as knowledge graphs with nodes representing structural units (Articles, Paragraphs, Items) and edges denoting normative relationships, the system preserves context and traceability. The retrieval mechanism reconstructs evidence paths from root to leaf, performing semantic re-ranking before generation. Evaluation using the RAGAS framework yielded a mean answer accuracy of 0.81, with a median of 1.00. Results indicate that the system performs robustly on short, focused queries, while intermediate-length questions present challenges related to semantic dispersion. The findings suggest that structurally aware retrieval significantly enhances the interpretability and precision of legal Q A systems.
Anthology ID:
2026.propor-1.1
Volume:
Proceedings of the 17th International Conference on Computational Processing of Portuguese (PROPOR 2026) - Vol. 1
Month:
April
Year:
2026
Address:
Salvador, Brazil
Editors:
Marlo Souza, Iria de-Dios-Flores, Diana Santos, Larissa Freitas, Jackson Wilke da Cruz Souza, Eugénio Ribeiro
Venue:
PROPOR
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
1–10
Language:
URL:
https://aclanthology.org/2026.propor-1.1/
DOI:
Bibkey:
Cite (ACL):
Vinícius Teles de Oliveira, Deivison Oliveira da Silva, Mateus de Almeida Souza, Maurício Rodrigues Lima, Sávio Salvarino Teles de Oliveira, and Thierson Couto Rosa. 2026. Retrieval-Augmented Generation and Knowledge Graphs in Portuguese-Language Legal Documents. In Proceedings of the 17th International Conference on Computational Processing of Portuguese (PROPOR 2026) - Vol. 1, pages 1–10, Salvador, Brazil. Association for Computational Linguistics.
Cite (Informal):
Retrieval-Augmented Generation and Knowledge Graphs in Portuguese-Language Legal Documents (Oliveira et al., PROPOR 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.propor-1.1.pdf