Ontology-grounded logic reasoning for validating structured LLM outputs
András Földvári, András Pataricza
DOI: http://dx.doi.org/10.15439/2026F4410
Citation: András Földvári, András Pataricza (2026). Ontology-grounded logic reasoning for validating structured LLM outputs. In M. Bolanowski, M. Ganzha, M. Grzegorowski, L. Maciaszek, M. Paprzycki, A. Paszkiewicz, D. Ślęzak (eds), Proceedings of the 21st Conference on Computer Science and Intelligence Systems. ACSIS, Vol. 48, pages 49–56.
Abstract. Large language models (LLMs) are increasingly used to produce structured artifacts that downstream pipelines consume directly, yet no correctness guarantees exist for these outputs in critical applications. Typical guardrail solutions for validation of LLM outputs act as placeholders rather than providing the strict correctness guarantees needed. We propose a conceptual framework and pilot implementation that grounds validation of structured LLM responses in embedded formal methods. The apparatus rests on three commitments. Three-valued verdicts that preserve the diagnostic distinction between acceptance, structured review, and rejection. Declarative logical reasoning expressed as short logic-program modules over a shared ontology vocabulary, composing without ad-hoc integration code and remaining auditable. A domain-agnostic analytical core extended per domain through a bounded extension layer that lifts existing metamodels and knowledge bases into the shared vocabulary.
References
- V. Lifschitz, Answer Set Programming. Berlin, Heidelberg: Springer-Verlag, 2019.
- M. Gebser, R. Kaminski, B. Kaufmann, and T. Schaub, “Multi-shot ASP solving with clingo,” Theory and Practice of Logic Programming, vol. 19, no. 1, pp. 27–82, 2019. [Online]. Available: https://doi.org/10.1017/S1471068418000054
- D. Varró and A. Pataricza, “Generic and meta-transformations for model transformation engineering,” in UML 2004: The Unified Modeling Language, ser. LNCS, vol. 3273. Springer, 2004, pp. 290–304.
- F. Baader, D. Calvanese, D. L. McGuinness, D. Nardi, and P. F. Patel-Schneider, The Description Logic Handbook: Theory, Implementation, and Applications, 2nd ed. Cambridge University Press, 2007.
- H. Knublauch and D. Kontokostas, “Shapes constraint language (SHACL),” W3C Recommendation, 2017. [Online]. Available: https://www.w3.org/TR/shacl/
- Z. Pawlak, “Rough sets,” International journal of computer & information sciences, vol. 11, no. 5, pp. 341–356, 1982.
- Y. Yao, “Three-way decisions with probabilistic rough sets,” Information Sciences, vol. 180, no. 3, pp. 341–353, 2010.
- A. Campagner and D. Ciucci, “Three-way learnability: A learning theoretic perspective on three-way decision,” in Proceedings of the 17th Conference on Computer Science and Intelligence Systems (FedCSIS), ser. Annals of Computer Science and Information Systems, vol. 30, 2022, pp. 243–246.
- A. Skowron and C. Rauszer, “The discernibility matrices and functions in information systems,” in Intelligent Decision Support, R. Słowiński, Ed. Kluwer, 1992, pp. 331–362.
- S. Emanuilov and R. Ackermann, “Stemming hallucination in language models using a licensing oracle,” arXiv preprint https://arxiv.org/abs/2511.06073, 2025. [Online]. Available: https://arxiv.org/ abs/2511.06073
- N. Fathallah, A. Das, S. De Giorgis, A. Poltronieri, P. Haase, and L. Kovriguina, “NeOn-GPT: A large language modelpowered pipeline for ontology learning,” in The Semantic Web: ESWC 2024 Satellite Events, ser. LNCS, vol. 15344. Springer, 2024, pp. 36–50. [Online]. Available: https://doi.org/10.1007/ 978-3-031-78952-6_4
- D. Adam and T. Kliegr, “Traceable LLM-based validation of statements in knowledge graphs,” Information Processing & Management, 2025, arXiv:2409.07507. [Online]. Available: https://arxiv.org/abs/2409.07507
- S. Miya, “Eidoku: A neuro-symbolic verification gate for LLM reasoning via structural constraint satisfaction,” arXiv preprint arXiv:2512.20664, 2025. [Online]. Available: https: //arxiv.org/abs/2512.20664
- A. G. Regino and J. C. dos Reis, “Can LLMs be knowledge graph curators for validating triple insertions?” in Workshop on Knowledge Graph Curation, 2025.
- S. Alotaibi, A. Lisitsa, A. McCabe, and J. MacSween, “Leveraging large language models for automated export control screening: Evaluating llms framework,” in Proceedings of the 20th Conference on Computer Science and Intelligence Systems (FedCSIS), ser. Annals of Computer Science and Information Systems, vol. 43, 2025, pp. 441–449.
- Object Management Group, “Systems Modeling Language (SysML®) version 2.0 — final specification,” 2025. [Online]. Available: https://www.omg.org/spec/SysML/