Ontologies as Guardrails for Agents — Frank Coyle, UC Berkeley
Summary
This talk introduces the concept of Neurosymbolic AI, which combines probabilistic Large Language Models (LLMs) with formal logical systems (ontologies) to establish guardrails. Because LLMs operate in a multi-dimensional latent space and are not 'fact machines,' ontologies—which define shared conceptualizations—are necessary to ensure domain compliance, especially when agents execute tool calls. The speaker details how guardrails can be implemented within the agent loop using tools like Pydantic, SHACL, and SPARQL.
Key takeaways
-
The Need for Guardrails
5:00
LLMs, while powerful, are probabilistic and do not store facts; they operate in a latent space. This means they can produce valid tool calls that still violate domain rules, necessitating external logical constraints.
-
Neurosymbolic AI
3:57
This paradigm combines the agentic AI universe (probabilistic reasoning) with formal logical systems related to ontologies (logical constraints).
-
The Agent Loop as Data Flow
11:07
The agent loop can be viewed as a data flow, allowing guardrails to be inserted between steps (e.g., before and after tool execution) to validate input shapes and semantic results.
Technical details
-
Ontology Construction Hierarchy
1387s
The process moves from Taxonomy (agreeing on a glossary and terms) to Ontology (defining classes and attributes that enable reasoning) to Knowledge Graph (the actual facts and details of the domain).
-
Formal Logic Tools
1547s
RDFS (Resource Description Framework Schema) is used to define relationships (e.g., 'orders') and infer new sets of triples. OWL (Web Ontology Language) allows for advanced reasoning, such as defining transitive or inverse properties.
-
Guardrail Mechanisms
1417s
Validation is achieved using specific tools: Pydantic (catching validation errors based on regex), SHACL (checking the shape of JSON data), and SPARQL (querying the knowledge base).
-
LLM Hooks
1031s
Frontier models (like Claude) offer 'hooks' (e.g., pre-tool use, post-tool use) which allow external services to be notified and perform processing without modifying the core code.
Mentioned resources
- TO Explorer
- schema.org
- FOAF (Friend of a Friend)
Channel & topics
Watch on YouTube · Back to latest
This independent, AI-assisted summary is provided for commentary and informational purposes. It may contain errors or omit important context. Please watch the original video for the creator's complete presentation. Video, thumbnail, and related copyrights belong to their respective owners.