Ontology-to-tools compilation for executable semantic constraint enforcement in LLM agents
Xiaochi Zhou, Patrick Bulter, Changxuan Yang, Simon D. Rihm, Thitikarn Angkanaporn, Jethro Akroyd, Sebastian Mosbach, and Markus Kraft

TL;DR
This paper presents a method to integrate formal ontologies with LLMs by compiling ontologies into executable tools, enabling semantic constraint enforcement during knowledge generation and reducing manual effort.
Contribution
It introduces ontology-to-tools compilation within The World Avatar framework, enabling LLMs to adhere to formal domain constraints during knowledge creation.
Findings
Enables LLMs to follow semantic constraints during generation
Reduces manual schema and prompt engineering
Demonstrates effectiveness in chemical literature domain
Abstract
We introduce ontology-to-tools compilation as a proof-of-principle mechanism for coupling large language models (LLMs) with formal domain knowledge. Within The World Avatar (TWA), ontological specifications are compiled into executable tool interfaces that LLM-based agents must use to create and modify knowledge graph instances, enforcing semantic constraints during generation rather than through post-hoc validation. Extending TWA's semantic agent composition framework, the Model Context Protocol (MCP) and associated agents are integral components of the knowledge graph ecosystem, enabling structured interaction between generative models, symbolic constraints, and external resources. An agent-based workflow translates ontologies into ontology-aware tools and iteratively applies them to extract, validate, and repair structured knowledge from unstructured scientific text. Using…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsModel-Driven Software Engineering Techniques · Semantic Web and Ontologies · Topic Modeling
