In 30 Sekunden
AI agents can choose and call tools, so checking their work needs more than a prompt. Frank Coyle proposes combining their flexible reasoning with an ontology: agreed definitions, relationships and rules for a domain. Checks can run before a tool receives arguments and after it returns a result. He starts with a glossary and existing vocabularies, then shows how logical relationships and validation tools can support guardrails.
- 1Let the agent propose while formal constraints set the boundaryCoyle describes neuro-symbolic AI as probabilistic reasoning inside a system with logical constraints outside it. The two approaches have different strengths: an agent is flexible, while an ontology makes domain concepts and rules explicit.
- 2The agent loop creates places to check tool callsTreating the loop as a flow of data makes it easier to see where guardrails belong. A system can validate a tool’s arguments before execution and examine the result before it returns to the model.
- 3Hooks expose events where checks can runCoyle points to events such as prompt submission, permission requests, and pre- and post-tool use. Hooks let developers attach processing to those moments.
- 4A shared glossary comes before rulesThe question of whether a hot dog is a sandwich illustrates why organizations need to agree on definitions and synonyms. Coyle builds from that vocabulary to classes, facts and finally guardrails.
- 5Borrow established terms instead of naming everything from scratchFOAF, schema.org and SKOS offer reusable terms. Coyle demonstrates OntoExplorer, which suggests relevant vocabularies from a domain description.
- 6Relationships can support new inferences and checksCoyle uses customer–product relationships and geographic containment to show how ontology languages can infer facts. He then describes tools for checking data shape, querying facts and expressing policies.
Das Wichtigste
- Agree on domain terms and synonyms before building rules around them.
- Check tool inputs before execution and tool results before feeding them back to an agent.
- Reuse established vocabularies for common concepts, then add the rules specific to your organization.
- Use a knowledge graph for domain facts and validation or query tools to check them against constraints.
Den bearbeiteten Text nach Kapiteln lesen
Why combine agents with explicit rules?
Coyle contrasts probabilistic models with formal descriptions of a domain. He sees neuro-symbolic AI as a way to put logical constraints around flexible reasoning.
I remember coming to San Francisco for the West Coast Computer Fair when personal computing was exciting young developers. Today I see a similar energy around AI and large language models: the focus has moved from the chip to what computing makes possible.
I think of AI as having two lineages. One leads toward agents and the work of early AI researchers; the other is ontology, a word with roots in philosophy. In computing, an ontology can be understood as a formal specification of a shared way of conceptualizing a domain.
The combination is often called neuro-symbolic AI. The model and agent bring probabilistic reasoning; ontologies bring formal concepts and logical constraints. One way to picture it is reasoning on the inside and guardrails on the outside: the agent proposes and the ontology helps determine what is permitted.

Why would a powerful language model need those guardrails? An LLM is not a database that looks up stored facts. It has absorbed patterns from documents and other material and uses those patterns to produce an answer. Its probabilistic behavior can produce hallucinations, which is one reason to ground its actions in explicit knowledge.
I like to describe an LLM as a brain in a box: tokens go in and tokens come out. The model alone does not reach into the world. The concern changes when we give it a loop and allow surrounding software to act on the model’s choices.
Where the agent loop can be checked
A model chooses a tool and parameters, while surrounding code executes the call and returns its result. Viewing the loop as data flow reveals places to validate inputs and outputs.
Loops have always been fundamental to programming. Along with sequence and conditions, they allow programs to express general computations. Giving an LLM control over repeated steps, including tool use, expands what a system built around the model can do.
Inside an agent, ordinary code takes the user’s prompt, sends it to the model and tells the model what tools are available. The model might choose tool B and supply parameters. The code executes that call, returns the result to the model, and the model can use it to answer or continue.
Now unfold that loop into a data-flow diagram. Between each step there is a chance to inspect or constrain what moves through the system. Those boundaries are where I see the opportunity to place guardrails.
In a simple implementation, the code calls the model and looks at the reason it stopped. It might have finished, run out of tokens, or asked to use a tool. If the reason is tool use, the surrounding program makes the call; otherwise it can leave the loop.
Before executing a tool, you can check whether its input has the expected shape. After the tool runs, you can examine its output and validate whether it fits the meaning of the task. These checks give you control on both sides of an action.
Hooks give us another way to reach these points. Claude, for example, exposes events as a session proceeds. I would check the current documentation because the available events can change, but the basic idea is to attach your own processing when an event occurs.

A prompt submission can trigger a hook, as can a permission request. There are also events before and after tool use, so you can intercept the point where a call is about to happen or inspect its result. You can define hooks without inserting every check into the loop itself.
Agree on the words before adding guardrails
A hot-dog dispute illustrates how ordinary words can have contested meanings. Coyle builds a ladder from shared vocabulary to an ontology, domain facts and rules.
Ontology sounds like a heavy philosophical subject, so I start with a question: is a hot dog a sandwich? Someone told me about a barbecue where missing hot-dog buns led to the suggestion of putting a hot dog between slices of bread. The disagreement about that substitution shows how much can depend on a definition.
When you build a knowledge base, you need people to agree on what the terms mean. If an organization uses different names for the same thing, define the synonyms. Otherwise, two people can use familiar words and still mean different things.
I picture the work as a ladder. Start with a taxonomy or shared vocabulary. An ontology adds classes, attributes and relationships; a knowledge graph supplies facts about the domain; and guardrails can then enforce constraints and rules against that structure.
Reuse vocabularies and explore their terms
Existing ontologies offer a starting point for common concepts. Coyle demonstrates a tool for finding terms relevant to a domain description.
Starting from a blank page is hard, but many existing ontologies can help. Schema.org and FOAF, or Friend of a Friend, are examples. Borrowing established terms gives you a starting point; your organization still supplies the expertise and rules that apply to its own processes.
You can collect that knowledge from the top down by asking an expert, or from the bottom up by looking at the language customers use. I call the reuse approach an ontology pick and roll: pick established terms and carry them into your own application.
FOAF was designed for describing social networks and the people in them. Schema.org includes many common concepts, and SKOS provides ways to define and arrange concepts. Rather than naming every common idea yourself, look at what these vocabularies already provide.
I built a small program called OntoExplorer to help with that search. You enter a description of your domain, choose an example, or provide documents. It presents potentially relevant existing ontologies and their terms, helping with the difficult work of finding names for your own concepts.

In the example, the tool shows matches from FOAF and other vocabularies. Selecting a vocabulary displays what it is intended for and the terms it contains. Another vocabulary concerns provenance: where something came from, the activities that produced it, and the people or systems involved.
Define relationships that support inference
Class hierarchies and properties let a system express what connects concepts. RDFS and OWL illustrate how additional relationships can be inferred.
Once we have terms, we can define hierarchies. A customer is a kind of person, and an elite customer is a kind of customer. Like subclasses in object-oriented programming, these relationships let a more specific class inherit meaning from a broader one.
We can also define properties connecting classes. Suppose a customer orders a product. With RDFS, a language for describing such relationships, I can specify a domain of customer and a range of product; seeing the relationship can then support inferences about the entities on either side.

OWL, the Web Ontology Language, lets us describe how properties behave. If a location relationship is transitive, and Denver is in Colorado while Colorado is in the USA, a reasoner can infer that Denver is in the USA.
A property can also have an inverse: if Anna orders a mug, the same relationship can be read from the other direction as the mug being ordered by Anna. A functional property expresses that there is only one value, which can help a reasoner recognize two names as referring to the same entity.
I note that relationships themselves can be described, including who created a definition, when it was created and where it came from. That makes provenance part of the information available around the relationships, alongside the domain facts held in the knowledge graph.
Use validation and policy tools around the graph
Coyle surveys tools for checking structured data, querying relationships and expressing rules. He closes by pointing to policy and provenance vocabularies.
Several tools can help build guardrails around that knowledge. Pydantic can check whether data is well formed; for example, it can catch an invalid refund field. SHACL checks whether data fits an expected shape, including minimum and maximum counts for fields.
SPARQL is a query language for asking questions about relationships in a knowledge graph. SWRL allows logical rules to be expressed. Together with validation, these offer ways to check structured information and apply the rules of a domain.
For policy and governance, I suggest looking at ODRL and at PROV-O for provenance. There is a larger ecosystem of vocabularies and tools to draw on. My closing teaching philosophy, associated with Sister Corita Kent and popularized by John Cage, is to keep making rather than treating every attempt as a win or a failure.
OntoExplorer is available through my site. And the next time you have a hot dog, think about the ontology behind the name.
Mehr aus diesem Kanal
26:53EN
11:44EN
12:26EN
20:05EN
16:04EN
19:26EN