Ontology-to-tools compilation for executable semantic constraint enforcement in LLM agents

Xiaochi Zhou, Patrick Bulter, Changxuan Yang, Simon D. Rihm, Thitikarn Angkanaporn +3 more
2/3/2026
cs.AIcs.IR

No confident code implementation found for this paper.

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.

Show full abstract

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 metal-organic polyhedra synthesis literature as an illustrative case, we show how executable ontological semantics can guide LLM behaviour and reduce manual schema and prompt engineering, establishing a general paradigm for embedding formal knowledge into generative systems.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhou2026ontologytotools,
  title  = {Ontology-to-tools compilation for executable semantic constraint enforcement in LLM agents},
  author = {Xiaochi Zhou and Patrick Bulter and Changxuan Yang and Simon D. Rihm and Thitikarn Angkanaporn and Jethro Akroyd and Sebastian Mosbach and Markus Kraft},
  year   = {2026},
  eprint = {2602.03439},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2602.03439v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2602.03439.svg)](https://codeofpaper.com/paper/2602.03439)

Discussion