Beyond statistical parroting: hard-coding truth into LLMs via ontologies
Publication date
2025-10-27
Secondary publication date
2025-12-12
Document type
Conference paper
Author
Giglou, Hamed Babaei
Compagno, Francesco
Ismail, Muhammad
Singh, Gunjan
Rudolph, Sebastian
Organisational unit
Conference
2nd International Workshop on Retrieval-Augmented Generation Enabled by Knowledge Graphs (RAGE-KG 2025) co-located with the 24th International Semantic Web Conference (ISWC 2025) ; Nara, Japan ; November 2–6, 2025.
Publisher
RWTH
Series or journal
CEUR Workshop Proceedings
ISSN
Periodical volume
4079
Book title
RAGE-KG 2025 Retrieval-Augmented Generation Enabled by Knowledge Graphs 2025
First page
120
Last page
131
Peer-reviewed
✅
Part of the university bibliography
✅
File(s)
Language
English
Abstract
Large Language Models (LLMs) are powerful but prone to hallucinations and factual inconsistencies, especially in knowledge-intensive tasks. In this work, we explore the integration of structured ontological knowledge into LLM prompts as a strategy to enhance factual accuracy and reliability. Using the Pizza Ontology as a showcase, we probe how different levels of domain grounding—ranging from base prompts to ontology-informed prompts—affect the factual accuracy of LLM responses. We tested different instruction-tuned last-generation LLMs from the Qwen and Llama families, ranging from 0.5 to 72 billion parameters, on a dataset of approximately 51 questions requiring various types of reasoning. Our results show that injecting ontological axioms into prompts improves response accuracy, demonstrating that formal domain knowledge can significantly reduce hallucinations. This proof-of-concept study highlights the potential for combining symbolic approaches with LLMs and lays the groundwork for more reliable, explainable AI systems. Our codebase is available at https://github.com/HamedBabaei/OntoTruth.
Description
Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0, https://creativecommons.org/licenses/by/4.0/deed.en)
Version
Published version
Access right on openHSU
Open access
