Executive summary. This paper answers its title question with a confident yes — not because an ontology makes models infallible, but because it is the layer that gives them something verifiable to be grounded in. The evidence shows that ontology grounding constrains what a model can assert, reduces wrong answers, and makes remaining errors detectable. No source shows that any technique eliminates hallucination, and this paper claims no such thing.

Hallucination Is Defined Against a Source

Hallucination is defined relative to a reference. Ji et al. distinguish intrinsic hallucinations, "output that contradicts the source content," from extrinsic ones, output that "cannot be verified from the source content" (Ji et al. 2023, §2.1). Huang et al. define factuality hallucination as a "discrepancy between generated content and verifiable real-world facts" (Huang et al. 2025). Both presuppose a source of truth. In an enterprise, that source is the organization's own concepts, definitions, and rules. If those are never formalized, no answer can be checked.

Enterprise Hallucination Is a Semantics Problem

A large language model (LLM) answering a business question over a warehouse must guess what "policy" or "active customer" means, which table holds each concept, and how tables join. Sequeda, Allemang and Jacob call this "the absence of a business context layer — metadata, mappings, transformations, ontologies, that provides business semantics and knowledge about the enterprise" (Sequeda et al. 2023). In their tests, generated SQL used "column names that don't exist in a table" and invented joins.

DAMA-DMBOK2, written before LLMs, holds that "data quality is thus dependent on context and on the needs of the data consumer" (DAMA-DMBOK2, Ch.13 §1.3.1, p.454) and that a semantic model "can map database tables and views to concepts that are meaningful to business users" (Ch.9 §1.3.8, p.321). An LLM is the newest data consumer, and the least forgiving of undefined meaning. The companion paper, What Is an Ontology and Why Is It Important for AI?, defines the ontology.

The Evidence: Grounding Constrains and Reduces Hallucination

The most direct test is a 43-question enterprise benchmark over a 13-table insurance schema, using GPT-4 zero-shot. Generating SQL against the schema reached 16.7% execution accuracy; querying a knowledge graph built from an ontology and mappings reached 54.2%. On questions over the more complex parts of the schema, SQL scored 0% in both question-complexity groups, against 35.7% and 38.5% with the ontology (Sequeda et al. 2023, Table 1). More telling, in manual review: "we did not observe a hallucinated class or property." The remaining errors were wrong paths or directions through real ontology elements, not inventions.

That benchmark is a single-vendor preprint, but other studies point the same way. Ontology-grounded retrieval (OG-RAG) increased "the recall of accurate facts by 55%" and improved "response correctness by 40% across four different LLMs" (Sharma et al. 2024). At LinkedIn, retrieval over a knowledge graph built from support tickets improved mean reciprocal rank (MRR) by 77.6% and cut median per-issue resolution time by 28.6% in production (Xu, Cruz et al. 2024). That study measures retrieval, not hallucination, but shows explicit structure outperforming flat text.

The Ontology Makes Errors Detectable and Correctable

Reduction is half the value. The other half is that an ontology makes hallucination detectable. Allemang and Sequeda added an ontology-based query check that flags generated queries conflicting with the ontology, such as a property used in the wrong direction, and asks the LLM to repair them; if repair fails, the system answers "I don't know." On the same benchmark, accuracy rose to 72.55%, with 8% "unknown" answers and a 19.44% error rate, down from an 83.3% error rate without a knowledge graph (Allemang & Sequeda 2024). The residual error is real, but a system that declines when validation fails differs sharply from one that fills every gap with fluent invention, and that validation exists only because the ontology defines what a valid answer is.

Counterpoints and Rebuttal

The objections are serious. Xu, Jain and Kankanhalli argue formally "that it is impossible to eliminate hallucination in LLMs" used as general problem solvers (Xu, Jain & Kankanhalli 2024). Magesh et al. found that leading legal research tools built on retrieval "each hallucinate between 17% and 33% of the time" (Magesh et al. 2025). One systematic comparison finds that graph-based and plain retrieval each have distinct strengths across tasks (Han et al. 2025).

These findings sharpen the thesis. Xu, Jain and Kankanhalli note that for knowledge-enhanced LLMs their theorem "is inapplicable," calling external knowledge "potentially an effective mitigator of hallucination in the formal world" while leaving real-world scalability open, and they conclude that without "external aids like guardrails, fences, knowledge base, and human control" LLMs cannot be used automatically in safety-critical decisions. An ontology is one such aid. The legal tools retrieve text passages without formal semantics; their results show that retrieval alone is not enough, the gap an ontology fills. And the strongest results above come from curated ontologies mapped to governed data, not general-purpose graph retrieval.

Recommendations

Formalize the glossary you already have. DMBOK2 says a glossary exists to "reduce the risk that data will be misused due to inconsistent understanding of the business concepts" (Ch.3 §2.14, p.90); an ontology makes that machine-readable.

Map the ontology to the physical schema with R2RML, which expresses "customized mappings from relational databases to RDF datasets" (W3C R2RML), so AI queries concepts instead of guessing at tables.

Validate generated queries and answers against the ontology, using SHACL, "a language for validating RDF graphs against a set of conditions" (W3C SHACL).

Design for "I don't know." Report abstentions separately from accuracy and error; rising abstentions show where the ontology needs extending.

Govern the ontology like reference data, keeping values "complete, current, and clearly defined" (DAMA-DMBOK2, Ch.10 §1.3.2.1.4, p.356).

Conclusion

Is an ontology the key to preventing AI hallucination? Yes. It does not make models infallible; the strongest configuration above still errs on roughly one answer in five. It is the key because it is the layer that gives a model something verifiable to be grounded in: it constrains what can be asserted, measurably reduces wrong answers, and exposes remaining errors so they can be refused or repaired. For data leaders, the ontology is the essential foundation of trustworthy enterprise AI.

References

DAMA International. DAMA-DMBOK: Data Management Body of Knowledge (2nd Edition). Technics Publications, 2017. (Chapters 3, 9, 10, and 13 as cited inline.)

Ji, Z., Lee, N., et al. "Survey of Hallucination in Natural Language Generation." ACM Computing Surveys 55(12), 2023. https://doi.org/10.1145/3571730

Huang, L., et al. "A Survey on Hallucination in Large Language Models: Principles, Taxonomy, Challenges, and Open Questions." ACM Transactions on Information Systems 43(2), 2025. https://doi.org/10.1145/3703155

Sequeda, J. F., Allemang, D., & Jacob, B. "A Benchmark to Understand the Role of Knowledge Graphs on Large Language Model's Accuracy for Question Answering on Enterprise SQL Databases." arXiv preprint arXiv:2311.07509, 2023. https://arxiv.org/abs/2311.07509

Allemang, D., & Sequeda, J. "Increasing the LLM Accuracy for Question Answering: Ontologies to the Rescue!" arXiv preprint arXiv:2405.11706, 2024. https://arxiv.org/abs/2405.11706

Sharma, K., Kumar, P., & Li, Y. "OG-RAG: Ontology-Grounded Retrieval-Augmented Generation for Large Language Models." arXiv preprint arXiv:2412.15235, 2024. https://arxiv.org/abs/2412.15235

Xu, Z., Cruz, M. J., Guevara, M., Wang, T., Deshpande, M., Wang, X., & Li, Z. "Retrieval-Augmented Generation with Knowledge Graphs for Customer Service Question Answering." Proceedings of SIGIR '24, pp. 2905-2909, 2024. https://doi.org/10.1145/3626772.3661370

Xu, Z., Jain, S., & Kankanhalli, M. "Hallucination is Inevitable: An Innate Limitation of Large Language Models." arXiv preprint arXiv:2401.11817, 2024. https://arxiv.org/abs/2401.11817

Magesh, V., Surani, F., Dahl, M., Suzgun, M., Manning, C. D., & Ho, D. E. "Hallucination-Free? Assessing the Reliability of Leading AI Legal Research Tools." Journal of Empirical Legal Studies 22(2), 216-242, 2025. https://doi.org/10.1111/jels.12413

Han, H., et al. "RAG vs. GraphRAG: A Systematic Evaluation and Key Insights." arXiv preprint arXiv:2502.11371, 2025. https://arxiv.org/abs/2502.11371

W3C. "R2RML: RDB to RDF Mapping Language." W3C Recommendation, 2012. https://www.w3.org/TR/r2rml/

W3C. "Shapes Constraint Language (SHACL)." W3C Recommendation, 2017. https://www.w3.org/TR/shacl/