Pattern-Based Prompting for Accurate Extraction of Ontology Assertional (A-box) Axioms Using LLMs for Ontology Population
Existing research has demonstrated that advanced Large Language Models (LLMs), such as GPT-4, Falcon-40B, and LLaMA2, can support Ontology Population (OP) by extracting and integrating assertional axioms from text. However, their tendency to hallucinate undermines trust in high-precision applications, causing ontology developers to hesitate before adopting LLM-based methods. In this study, we first surveyed existing OP experiments to select the most accurate model, identifying GPT as the leading candidate. We then analysed where and why hallucinations occurred during OP and observed that they predominantly arose when the model lacked clear guidance on the ontology’s structure. To mitigate this, we devised a prompting strategy grounded in ontology design patterns, explicitly conveying schema constraints to the LLM. Experimental results on a real-world use case demonstrate that our pattern-based prompts significantly reduce hallucinations and yield more accurate axiom extraction compared to conventional prompts. These findings indicate that leveraging ontology design patterns in LLM prompts substantially enhances the reliability of automated OP workflows.
Authors
- Ian Wilson (ORCID: https://orcid.org/0000-0002-3550-049X)
- Athula Ginige (ORCID: https://orcid.org/0000-0002-7445-588X)
- Jeevani Goonetillake (ORCID: https://orcid.org/0000-0003-0839-4529)
- R Shyama
Institutions
- Heriot-Watt University (GB)
- New South Wales Institute of Psychiatry (AU)
- Uva Wellassa University (LK)
- Western Sydney University (AU)
Publication Details
- Journal
- Procedia Computer Science
- Published
- 2025-01-01
- DOI
- https://doi.org/10.1016/j.procs.2025.09.265
- Primary Topic
- Semantic Web and Ontologies
- Type
- article
- Field-Weighted Citation Impact
- 0.00