Ontologies as Guardrails for Agents — Frank Coyle, UC Berkeley
Talk notes · AI Engineer ·A close reading of the source at youtube.com: what it says, what it means for someone who builds with AI, and which claims are the publisher’s own.
Tool UseAI AgentsKnowledge GraphsEmbeddings
Problem
Frank Coyle (UC Berkeley) says an agent can make a valid tool call and still break the rules of your domain. LLMs do not store facts, so he puts probabilistic reasoning inside and logical constraints outside, which he calls neurosymbolic (3:14).
Approach
- Find the gaps in the loop. The agent loop (prompt in, model asks for a tool, code runs it, result back) can be drawn as a data flow, with guardrails between steps. A call returns a stop reason; if it is tool use, the code runs the tool (9:22).
- Check the shape, then the meaning. Validate the input before the tool and examine the output after it. Claude Code hooks (pre-tool and post-tool events, and others) let you do this without changing the agent code (11:25).
- Climb the ladder. Glossary and synonyms, then taxonomy, ontology (classes, properties, hierarchy), knowledge graph (the facts), then guardrails (15:27).
- Borrow vocabularies. Start from schema.org, FOAF and a provenance ontology; his OntoExplorer site suggests ones for a domain description (16:29).
- Let the ontology infer. RDFS domain and range infer types; OWL adds transitive and inverse properties; a relation is itself an entity, so it can carry provenance (20:34).
- Pick the checker. Pydantic for well-formed data, SHACL for shape, SPARQL to ask whether a claim holds, rules for policy (23:37).
Lessons learned
- Agree on definitions first; his hot-dog-as-sandwich story shows how an unshared definition derails a project.
- An embedding is a list of 4,096 numbers, a point in space, not a lookup (Coyle's example width).
- No benchmark numbers: this is a design talk, not a measured result.
Theme
Agents & Harnesses.