Ontology-Enriched GraphRAG: A Case Study in Portuguese Geoscience Question Answering
Resumo
Retrieval-Augmented Generation (RAG) significantly enhances Large Language Models (LLMs) in Question-Answering (QA) tasks. However, traditional text-based retrieval may prove insufficient in specialized domains, such as geoscience, where critical information is highly interconnected and distributed across complex concepts, relations, and interpretative descriptions. While Graph-based Retrieval-Augmented Generation (GraphRAG) addresses part of this limitation by structuring evidence into entity-relation graphs, it remains susceptible to terminological inconsistencies, synonyms, and domain-specific variants. To bridge this gap, this paper presents a controlled empirical study evaluating ontology-enriched GraphRAG for Portuguese geoscience QA. We systematically compared four generation strategies: LLM-only, textual RAG, standard GraphRAG, and ontology-enriched GraphRAG. The ontology-driven approach grounds text-extracted entities in formal reference ontologies using a cascading matching strategy that starts with embedding-based semantic similarity, followed by URI-based, label-based, and alternative-label-based matching. Evaluated across semantic, lexical, contextual, and graph-level metrics, our results confirm that external retrieval is indispensable, as retrieval-based strategies outperform the LLM-only baseline. Textual RAG achieved the strongest lexical overlap, while ontology-enriched GraphRAG achieved the highest Correctness, Completeness, and Contextual Recall. GraphRAG provided stronger grounding and question alignment, as reflected by higher Faithfulness and Answer Relevancy. Beyond these answerand context-level gains, the most substantial effect of ontology enrichment was structural, driving a substantial expansion in graph semantic coverage, graph size, and matching rate. These findings suggest that ontology grounding acts primarily as a powerful enabling mechanism for semantic representation; however, its impact on answer quality depends on retrieval, subgraph selection, and prompt construction.
Palavras-chave:
Geoscience, GraphRAG, Ontology, Portuguese Texts, Question Answering, Retrieval-Augmented Generation
Referências
Cao, Y., Gao, Z., Li, Z., Xie, X., Zhou, S. K., and Xu, J. Lego-graphrag: Modularizing graph-based retrieval-augmented generation for design space exploration. Proc. VLDB Endow. 18 (10): 3269–3283, June, 2025.
Cicconeto, F., Vieira, L. V., Abel, M., dos Santos Alvarenga, R., Carbonera, J. L., and Garcia, L. F. Georeservoir: An ontology for deep-marine depositional system geometry description. Computers Geosciences vol. 159, pp. 105005, 2022.
Edge, D., Trinh, H., Cheng, N., Bradley, J., Chao, A., Mody, A., Truitt, S., Metropolitansky, D., Ness, R. O., and Larson, J. From local to global: A graph rag approach to query-focused summarization, 2025.
Es, S., James, J., Espinosa Anke, L., and Schockaert, S. RAGAs: Automated evaluation of retrieval augmented generation. In EACL, N. Aletras and O. De Clercq (Eds.), 2024.
Garcia, L. F., Abel, M., Perrin, M., and dos Santos Alvarenga, R. The geocore ontology: A core ontology for general use in geology. Comput. Geosci. 135 (C), Feb., 2020.
Lewis, P., Perez, E., Piktus, A., Petroni, F., Karpukhin, V., Goyal, N., Küttler, H., Lewis, M., tau Yih, W., Rocktäschel, T., Riedel, S., and Kiela, D. Retrieval-augmented generation for knowledge-intensive nlp tasks, 2021.
Otero-Cerdeira, L., Rodríguez-Martínez, F. J., and Gómez-Rodríguez, A. Ontology matching: A literature review. Expert Systems with Applications 42 (2): 949–971, 2015.
Paula, F., Michelin, C. R. L., and Moreira, V. Evaluation of question answer generation for Portuguese: Insights and datasets. In EMNLP 2024, Y. Al-Onaizan, M. Bansal, and Y.-N. Chen (Eds.). pp. 5315–5327, 2024.
Peng, B., Zhu, Y., Liu, Y., Bo, X., Shi, H., Hong, C., Zhang, Y., and Tang, S. Graph retrieval-augmented generation: A survey. ACM Trans. Inf. Syst. 44 (2), Dec., 2025.
Sharma, K., Kumar, P., and Li, Y. OG-RAG: Ontology-grounded retrieval-augmented generation for large language models. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, 2025.
Zhu, X., Xie, Y., Liu, Y., Li, Y., and Hu, W. Knowledge graph-guided retrieval augmented generation. In Proceedings of NAACL, 2025.
Cicconeto, F., Vieira, L. V., Abel, M., dos Santos Alvarenga, R., Carbonera, J. L., and Garcia, L. F. Georeservoir: An ontology for deep-marine depositional system geometry description. Computers Geosciences vol. 159, pp. 105005, 2022.
Edge, D., Trinh, H., Cheng, N., Bradley, J., Chao, A., Mody, A., Truitt, S., Metropolitansky, D., Ness, R. O., and Larson, J. From local to global: A graph rag approach to query-focused summarization, 2025.
Es, S., James, J., Espinosa Anke, L., and Schockaert, S. RAGAs: Automated evaluation of retrieval augmented generation. In EACL, N. Aletras and O. De Clercq (Eds.), 2024.
Garcia, L. F., Abel, M., Perrin, M., and dos Santos Alvarenga, R. The geocore ontology: A core ontology for general use in geology. Comput. Geosci. 135 (C), Feb., 2020.
Lewis, P., Perez, E., Piktus, A., Petroni, F., Karpukhin, V., Goyal, N., Küttler, H., Lewis, M., tau Yih, W., Rocktäschel, T., Riedel, S., and Kiela, D. Retrieval-augmented generation for knowledge-intensive nlp tasks, 2021.
Otero-Cerdeira, L., Rodríguez-Martínez, F. J., and Gómez-Rodríguez, A. Ontology matching: A literature review. Expert Systems with Applications 42 (2): 949–971, 2015.
Paula, F., Michelin, C. R. L., and Moreira, V. Evaluation of question answer generation for Portuguese: Insights and datasets. In EMNLP 2024, Y. Al-Onaizan, M. Bansal, and Y.-N. Chen (Eds.). pp. 5315–5327, 2024.
Peng, B., Zhu, Y., Liu, Y., Bo, X., Shi, H., Hong, C., Zhang, Y., and Tang, S. Graph retrieval-augmented generation: A survey. ACM Trans. Inf. Syst. 44 (2), Dec., 2025.
Sharma, K., Kumar, P., and Li, Y. OG-RAG: Ontology-grounded retrieval-augmented generation for large language models. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, 2025.
Zhu, X., Xie, Y., Liu, Y., Li, Y., and Hu, W. Knowledge graph-guided retrieval augmented generation. In Proceedings of NAACL, 2025.
Publicado
19/10/2026
Como Citar
ROCHA, Tiago Rios da; NETTO, João Cesar; BECKER, Karin.
Ontology-Enriched GraphRAG: A Case Study in Portuguese Geoscience Question Answering. In: SYMPOSIUM ON KNOWLEDGE DISCOVERY, MINING AND LEARNING (KDMILE), 14. , 2026, Cuiabá/MT.
Anais [...].
Porto Alegre: Sociedade Brasileira de Computação,
2026
.
p. 177-184.
ISSN 2763-8944.
DOI: https://doi.org/10.5753/kdmile.2026.31150.
