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

📅 2026-02-03
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the challenge that large language models (LLMs) struggle to adhere to formal semantic constraints in real time when generating structured knowledge, often relying on inefficient and error-prone post-hoc validation. To overcome this limitation, the authors propose an ontology-to-tool compilation mechanism that automatically translates domain ontology specifications into executable tool interfaces. By compelling LLM agents to interact with knowledge graphs exclusively through these generated tools, the approach proactively enforces semantic consistency during knowledge generation. Built upon The World Avatar framework, the method integrates the Model Context Protocol, ontology-driven tool synthesis, and agent workflows, substantially reducing the need for manual prompt engineering. Evaluated on the task of processing scientific literature on metal–organic polyhedra synthesis, the system successfully guides LLMs to extract, validate, and repair structured knowledge, demonstrating the feasibility and advantages of this paradigm for scientific text understanding.

Technology Category

Application Category

📝 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 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.
Problem

Research questions and friction points this paper is trying to address.

ontology
semantic constraints
large language models
knowledge graph
executable semantics
Innovation

Methods, ideas, or system contributions that make the work stand out.

ontology-to-tools compilation
semantic constraint enforcement
LLM agents
knowledge graph
Model Context Protocol
🔎 Similar Papers
No similar papers found.
X
Xiaochi Zhou
Department of Chemical Engineering and Biotechnology, University of Cambridge
Patrick Butler
Patrick Butler
Virginia Tech
Computer ScienceMachine LearningData Mining
C
Changxuan Yang
MIT, Chemical Engineering
S
Simon D. Rihm
CMPG, GRIPS – Gründerinnenzentrum Pirmasens
T
Thitikarn Angkanaporn
Department of Chemical Engineering and Biotechnology, University of Cambridge
J
J. Akroyd
Department of Chemical Engineering and Biotechnology, University of Cambridge; CARES, Cambridge Centre for Advanced Research and Education in Singapore; CMCL
S
S. Mosbach
Department of Chemical Engineering and Biotechnology, University of Cambridge; CARES, Cambridge Centre for Advanced Research and Education in Singapore; CMCL
Markus Kraft
Markus Kraft
University of Cambridge, MIT
CombustionChemical EngineeringParticle TechnologyKnowledge GraphsInteroperability