AI Engineer World's Fair 2026

Why Agentic Systems Need Ontologies

Read the talk

Why Agentic Systems Need Ontologies

Selected presentation frame from Why Agentic Systems Need Ontologies — Frank Coyle, UC Berkeley at 1180 seconds
Why Agentic Systems Need Ontologies

Frank Coyle explains how formal domain models, graph-based inference, and validation can constrain probabilistic agents before their proposed actions produce costly or incorrect outcomes.

From a talk by Frank Coyle

At a glance

Ideas worth remembering

  • Ontologies give agents an explicit domain model of entities, properties, and relationships instead of relying entirely on probabilistic language generation. 3:49

  • Top-down and bottom-up modeling are complementary approaches: experts can define core business concepts, while observed customer interactions can reveal additional entities and relationships. 5:23

  • RDFS and OWL add inference and constraints, enabling systems to derive classifications, follow transitive relationships, and reason about relationships that permit only one value. 9:18

  • Validate tool results inside the agent loop before accepting them; inconsistent outcomes can be returned to the model or escalated to a human. 14:39

  • Type checking and business-rule checking solve different problems: Pydantic validates parameter structure, while ontologies can identify duplicate refunds, misdirected payouts, and invalid status values. 17:43

  • Delay side effects and control iteration because agent loops can drift, run indefinitely, increase token costs, or commit incorrect changes before domain validation occurs. 13:13

Two traditions converge in agentic AI

Selected presentation frame from Why Agentic Systems Need Ontologies — Frank Coyle, UC Berkeley at 214 seconds
Two traditions converge in agentic AI

Frank Coyle frames agentic systems as the convergence of two intellectual traditions: agents that perceive, decide, and act, and ontologies that describe the entities, relationships, and categories within a domain. His central argument is that useful autonomy requires more than a model that can generate plausible language; it also requires an explicit account of the world in which the agent operates. 1:30

An ontology provides a formal, shared conceptualization of that operating environment. Rather than leaving an organization’s assumptions implicit in prompts or scattered across application code, it identifies the concepts that matter and specifies how they relate. Coyle describes the combination of probabilistic language models with formal representations as neurosymbolic AI, joining neural-network capabilities with symbolic mechanisms such as rules and knowledge graphs. 3:49

The objective is not to eliminate the generative character of language models. Coyle treats their probabilistic, imaginative behavior as part of their value, while arguing that the same behavior makes them unreliable as the sole authority over domain-specific decisions. Symbolic structures can therefore serve as guardrails without replacing the model’s ability to interpret context and propose actions. 3:49

Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

1:30 · section reference included

Build a domain model that can evolve

Selected presentation frame from Why Agentic Systems Need Ontologies — Frank Coyle, UC Berkeley at 521 seconds
Build a domain model that can evolve

At its simplest, an ontology represents entities, their properties, and the relationships connecting them. Coyle associates this approach with graph-based data structures, where additional properties or relationships can be attached as the domain evolves. He contrasts that flexibility with relational schemas, which he characterizes as more restrictive when new kinds of information require structural changes. 5:23

A top-down approach begins with domain experts defining the important concepts and relationships. In a business setting, that might include purchase orders, customers, and customer representatives, together with their respective properties and interactions. Coyle connects this method to earlier expert-system work while noting a historical limitation of those systems: they struggled to scale. 5:23

A bottom-up approach instead extends the ontology using information encountered in practice, such as customer interactions and the entities or relationships those interactions reveal. Existing vocabularies can also reduce the need to invent terminology from scratch; Coyle points to schema.org, Dublin Core, social-network modeling, and DBpedia as examples of prior work that can inform a domain model. 6:38

Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

5:23 · section reference included

Turn relationships into inference and constraints

Selected presentation frame from Why Agentic Systems Need Ontologies — Frank Coyle, UC Berkeley at 666 seconds
Turn relationships into inference and constraints

A graph of named entities is useful, but Coyle emphasizes the additional value of technologies such as RDFS and OWL, which support inference and control over the graph. These mechanisms describe what relationships imply, allowing the system to derive information that was not explicitly entered as a separate fact. 9:18

For example, if a teaching relationship has the domain of teacher, a statement that Bob teaches scooter implies that Bob is a teacher. If all teachers are persons, the system can further infer that Bob is a person. If the same relationship has the range of student, scooter can also be classified as a student, expanding the system’s understanding through structured rules rather than additional model-generated guesses. 9:18

OWL-style properties extend this reasoning. A transitive property allows an ancestor relationship to carry across multiple generations: if Sue is an ancestor of Mary and Mary is an ancestor of Anne, Sue can be inferred to be an ancestor of Anne. A functional property permits only one value for a relationship; in Coyle’s example, two different names supplied for one person’s father imply that those names refer to the same individual. 10:29

Coyle presents these derivations and constraints as an auxiliary reasoning layer alongside the graph itself. That separation matters for agentic systems because the graph supplies domain facts, while the accompanying rules determine which conclusions or proposed relationships are consistent with the domain model. 9:18

How it fits togetherInfer classifications from a teaching relationship

Asserted teaching relationship

Domain, subclass, and range rules derive additional facts from one relationship.

Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

9:18 · section reference included

Place ontology checks inside the agent loop

Selected presentation frame from Why Agentic Systems Need Ontologies — Frank Coyle, UC Berkeley at 918 seconds
Place ontology checks inside the agent loop

Agent loops give a system the ability to revisit a task, request tools, and continue iterating. Coyle links this pattern to established programming concepts—sequence, conditionals, and iteration—but stresses that loops introduce operational risks: they can become infinite, drift as agents interact, or accumulate significant token costs. Greater capability therefore also increases the need for explicit controls. 11:53

In his Claude agent example, the language model receives a prompt and information about an available tool. The model does not execute the tool itself; it proposes the call and its input parameters, after which application code inspects the model’s stop reason and executes the tool when the response indicates tool use. This distinction places responsibility for real-world execution in the surrounding system rather than in the model alone. 13:13

The critical intervention comes after the tool runs and before its result is accepted. Coyle proposes translating the returned information into a representation that a domain-aware validator can evaluate against the ontology. If the result is reasonable, the loop can continue; if it is inconsistent, the application can send the problem back to the model or involve a human. 16:15

This pattern treats ontology validation as part of the agent’s control flow, not merely as background documentation. The model contributes contextual interpretation and candidate actions, tools supply operational results, and the ontology provides a structured basis for deciding whether those results fit the organization’s established concepts and rules. 3:49

How it fits togetherValidate tool results inside the agent loop

Tool call and input parameters

Application code executes proposed tool calls and checks returned information against domain rules.

Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

3:49 · section reference included

Separate type safety from business correctness

Selected presentation frame from Why Agentic Systems Need Ontologies — Frank Coyle, UC Berkeley at 1104 seconds
Separate type safety from business correctness

Coyle distinguishes structural validation from semantic validation. He recommends Pydantic for checking that incoming parameters have the expected types, then using the ontology to evaluate whether the resulting action or data makes sense within the domain. Correctly shaped inputs are necessary, but they do not establish that an operation respects business relationships or domain constraints. 17:43

He also recommends keeping agents free of consequential side effects until their proposed behavior has passed validation. In practical terms, an agent should not immediately alter a database or otherwise commit a change simply because a model proposed it. Running the proposal through ontology-based checks first makes it possible to reject or escalate a problematic action before it becomes durable. 16:15

The examples are concrete: a second refund on the same order, a payout routed to a support representative instead of the buyer, or an invented order status outside an allowed set such as paid, shipped, and refunded. Coyle argues that functional properties, disjoint categories, and constrained values make these failures more explicit than relying on natural-language instructions alone. 18:59

The proposed architecture is ultimately a layered one: probabilistic models interpret and propose, typed interfaces constrain inputs, tools perform execution, and ontology-backed reasoning checks domain consistency before important outcomes are accepted. Coyle presents this as a practical guardrail for agent behavior, while acknowledging that loops still require careful management because drift, runaway iteration, and token costs remain possible. 13:13

Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

13:13 · section reference included

Read the complete timestamped transcript
  1. 0:00

    [upbeat music] Um, okay, we're gonna launch here. [clears throat]

  2. 0:15

    So my name, uh, is Frank Coyle. Um, I'm, uh, I'm an educator. I'm teaching at Berkeley now. I've been doing this, uh, computer science stuff for, oh, thirty, thirty-five years.

  3. 0:26

    And, um, I'm inter-- And right now it's kind of a critical time for, uh, poor computer science students. They used to be the-- used to be the only game in town, degree was a guaranteed job, and now thanks to AI, it's not.

  4. 0:40

    But then again, five thousand people are here. So AI and, and agents are, um-- [smacks lip] seem to be the way to go. So the question is: How do we leverage this new universe that we are moving quickly into?

  5. 0:54

    And so I wanna talk about how agents and ontologies, ooh, big word, fit together. But before you-- before I do that, I wanted to, um, [smacks lip]

  6. 1:05

    wanted to give you my, uh, my educational philosophy. [clears throat] And this comes from, uh, someone called Sister Corita Kent, and it was made popular by John Cage, who was a, uh, an avant-garde musician.

  7. 1:19

    And you gotta think about this a little bit. "Nothing is a mistake. There is no win, there's no fail, there's only make." And more and more today, that's what's important.

  8. 1:33

    Get down and make stuff, and that's how you're gonna learn, not by necessarily reading. I'm also a big fan of writing. My early career was in neuroscience. I'm kind of coming back into it now that, uh, agentic AI is bringing, uh, kind of cognitive science back.

  9. 1:51

    But engage your senses. Get a notebook, get a pen, a pencil, draw pictures, write stuff down. Just don't type, because when you type-- when you're typing, your brain is thinking about the letters on the keyboard.

  10. 2:06

    When you're writing in a book, your whole brain, your, your whole sen-- all, all your sensory systems are engaged, and you're gonna learn faster that way. Okay, onto our talk.

  11. 2:21

    Agents and ontology. So there are two lineages here, and I wanna talk about both, give you a little philosophical background. Um,

  12. 2:29

    agents, when did we start talking about agents? It well goes, goes back to the early initial days of AI. People like John McCarthy,

  13. 2:39

    uh, uh, uh, uh, Selfridge, Marvin Minsky, Society of Mind. People started thinking about the fact that this new computing technology was going to lead us into some kind of artificial intelligence, which is a term that came in nineteen fifty-six when all these characters got together and tried to figure out where the future was going.

  14. 3:00

    Okay? And the concept of an agent finally evolved, things that perceive and decide and then act, and that's what we're seeing now. Now, what about ontologies? Well, it turns out ontologies are not that new.

  15. 3:14

    Okay? It was actually Aristotle who first came up with the concept of we need a philosophy of, of being. Like, whoa, kinda heavy. Um, but came up with categories of being, and this kind of relates to what people are doing now with graph databases and knowledge representation.

  16. 3:33

    And there are a couple of other people who kind of formalized it. Uh, Van Quine was a philosopher, and then this guy Gruber, nineteen ninety-three. And I think this captures what

  17. 3:45

    knowledge and, uh, graph technology really represents. It is a, a formal specification of a shared conceptualization, and that's what we wanna give to our agents. We wanna give them our concept-- our conceptualization of the universe, our universe, our domains.

  18. 4:05

    Okay? And now what's happening is you're getting the convergence of something that is probabilistic, the agents, the LLMs, with the, the more formal representations that you have with ontologies.

  19. 4:22

    And so this term is now being used, you're k- hearing this a lot, neurosymbolic AI. Sounds pretty fancy, but it's really neural networks tied into symbolic AI, which rule-based systems come under that category, um, as do the knowledge graphs that we're, that we're assembling.

  20. 4:46

    And so what I'd like to argue is that neurosymbolic AI sort of represents a way to keep the LLM on its guardrails, because LLMs are by nature probabilistic.

  21. 5:02

    People worry about hallucinations, but that's the feature. That's actually a feature of large language models. It's who we are. We hallucinate in a way. We imagine things that may not exist, and then we turn them into reality, and that's what large language models do in, in, in, in a way.

  22. 5:21

    Okay? So let's just quickly overview what ontologies are. It's not-- They're not complicated. They're basically a representation of entities and their relationships to other entities, and these entities have properties.

  23. 5:38

    And this whole concept of graph databases arose when p- people began to realize that relational databases, sticking data into tables, was too restrictive.

  24. 5:53

    You wanted to add something new to a relational database, so you had to add a new column. Man, and then, and then you have to redo the whole structure.

  25. 6:02

    With a, with a graph database, you can just attach another item. You can just attach a property. You can attach a relationship. Okay? So the question often arises, okay, I, I get it, I need to have an ontology to represent, in a formal way, what my organization is doing.

  26. 6:20

    How do I do it? Okay, there are a couple of ways you can approach it. You can have a top-down approach or a bottom-up approach. Top-down approach is you get the experts together, and they sit down and analyze the domain, come up with the entities.

  27. 6:35

    What do we have? We have purchase orders, we have customers, we have customer representatives. And we're gonna structure them, they have properties, these are the relationships. Okay, that's one way, and this models what we were doing back in the '80s when I was involved in expert systems.

  28. 6:51

    Everybody thought expert systems was the way to do AI. Symbolic AI was the way to go. Companies rose, millions of dollars were spent. Uh, the, uh, the Japanese created this, uh, Future World project in the late '80s.

  29. 7:09

    People in America w- my, my son was taking Japanese in school because of these expert systems, and... But they couldn't scale. They couldn't scale, and then we went into a kind of AI winter.

  30. 7:23

    Where did neural networks came-- come from? Neural networks were put out there in the '60s, but they couldn't scale because we didn't happen to have NVIDIA, who was off making GPUs to make v- make reality of the v- of the video games fantastic.

  31. 7:41

    And then someone said, "Let's turn these things over to the neural networks," and of course, that's kinda why we're here now. So,

  32. 7:49

    the other way you can-- uh, that, that people are adding to or creating ontologies is, is from the bottom up. For example, customer reactions. What are the things the customers are involved in?

  33. 8:03

    Hey, the, these entities, these relationships, let's add this to our ontology. Let's, let's add this information to the graph. Now, as, as a help,

  34. 8:14

    it's helpful to be aware that there are existing taxonomies that people have been working on for the last fifteen to twenty years, things like Schema.org, which has a whole set of terms and relationships, so you don't have to reinvent the wheel.

  35. 8:29

    In fact, you-- it's to your advantage to use some of these ontologies. FOAF, a Friend of a Friend, for modeling social networks. The Dublin Core, which was an early r- an early attempt to come up with terms for describing, uh, research papers and books and so forth.

  36. 8:50

    So there's a whole series of things. In fact, Wikipedia is based on an ontology called DBpedia, so when you do a search on Wikipedia, it's looking things up in its giant graph database.

  37. 9:02

    So this stuff has been out there underlying a lot of what we already do. So take advantage of these things that already exist.

  38. 9:12

    Okay. Now, what do you do when you build your ontology? Okay, so what? I know the-- what these entities are, I know what their relationships are, they have properties.

  39. 9:22

    How can I do anything with them? Well, there are other augmenting technologies, auxiliary technologies, things that we call-- things like RDFS, which is a technology, and OWL, which I'll talk more about.

  40. 9:35

    So these have-- these kind of sit over to the side of your graph. So I'm not gonna talk about on-- I mean, ontology is a big word, and it's often confusing and used in many ways.

  41. 9:46

    But think you have a graph data structure, okay? And you have the entities and relationships, but you want to apply some control over them, or you want to be able to make inference over them.

  42. 9:58

    So for example, there is, uh, some terms in this technology called RDFS,

  43. 10:06

    domain and range. So if I say, "Teaches has a domain of teacher," that means if I say, "Bob teaches Scooter," in my text, I can infer that Bob is a teacher.

  44. 10:21

    And if I say, "All teachers are persons," then this statement lets me know if I say, "Bob teaches Scooter," now I know Bob is a person, Bob is a teacher.

  45. 10:29

    What about Scooter? If I say, "Teaches has a range of student," that means, uh, the right side of the verb, then Scooter is a student. And now I have this extra information into my system.

  46. 10:43

    OWL also has a series of, of, of properties that allow you to make some inferences. So a transitive property. Transitive property says, if Sue is an ancestor, like ancestor is a transitive property.

  47. 11:00

    If Sue is an ancestor of Mary, and Mary is an ancestor of Anne, then Sue is an ancestor of Anne. Okay. This was not initially into my graph system, but with applying these functional properties, I can then add and augment the system with this extra data, so that's very useful.

  48. 11:21

    Then there are some properties called functional properties, which means only one. So, has father is a functional property. You can only have one father. You can only have one mother.

  49. 11:36

    That is a functional property. Okay? So that's, that can serve as a constraint. So when--

  50. 11:44

    if you say, "Bob is my-- Bob is Jim's father, BB is Jim's father," well,

  51. 11:53

    the inference here is that Bob and BB are two ways of representing the same individual, because that is a functional property. You can only have one. So these derivations and constraints don't sit in the graph.

  52. 12:06

    They sit sort of on the side, and they can help- As we're gonna see, I'm gonna propose, when we deal with agents, how they can, they can help us out.

  53. 12:18

    So what about agents? Everybody's talking about agents now, and everybody's talking about loops. Loops, loops, loops everywhere. Loops have been around for a long time. Back in the '60s, people were debating who has the best programming language, Fortran or COBOL?

  54. 12:36

    "No, mine is better." "No, mine is better." "Oh, you don't know anything. You don't know what you're talking about."

  55. 12:42

    Böhm and Jacopini in nineteen sixty-six came out and said, "Okay, there is no real difference in programming languages if they have three aspects." Sequence, I can put statement A, statement B, statement C.

  56. 12:55

    Fine. I have conditionals, I can have if/then. And the last piece, I have a loop. If I have a loop, if I have iteration, if I take these three things, the, the language is what's called Turing complete, can do any-- can compute anything that,

  57. 13:13

    uh, can be computed by computational devices from the work of Alan Turing. Okay? And now we're seeing this in agentic AI. Agents are now have loops. Loops give us the last piece in the equation of giving us a technology that is capable of doing anything that computational devices can

  58. 13:38

    do. The danger, though, of loops is that they can break. If you're, if you're a programmer, you know, you all go into an infinite loop.

  59. 13:50

    N-not good. Loops can drift as agents start talking to each other, things get all-- go off, off the rails. And loops can cost you money. Token counts crank up as the loops continue, so you don't-- you need to be careful, okay?

  60. 14:09

    But in a way, we are revisiting some of the early stuff with symbolic AI. I would argue we're going back to the world of expert systems,

  61. 14:20

    which is the symbolic part of the whole thing. So I want to show you an example using Claude agent. So a little code here. Don't get scared, but I know nobody does Python anymore, but y-you gotta look at what the agent's giving you, and you gotta, you gotta move in and, and manipulate it.

  62. 14:39

    So here's a, here's a loop, while True, classic Python loop. Okay? And so we have a client. So we're actually-- So the first little chunk here that you see, resp, the response, this is just some code where we have a model, and we have, uh, we have a prompt that's part of, part of the messages, and we

  63. 15:01

    have a tool, and we're s-- we're asking the LLM to

  64. 15:08

    solve this problem using a tool. Now, here's the, here's the catch.

  65. 15:14

    LLMs can't do anything. All they can do is give us the next word with a high probability. Amazingly, we can now have these conversations with it, but they can't do anything.

  66. 15:25

    But we can give it a tool, and we can give it what we want and say, "How do you think this tool can help us get what we want?"

  67. 15:36

    And then the LLM will set up the parameters

  68. 15:41

    and come back to us and say, "Okay, here's my response. I can't execute this tool, but I know what the input parameters are. I know what your context is.

  69. 15:53

    I know what your prompt is. So here is the call that you need to make of the tool, because I can't do it. I'm the LLM. I'm just locked in this box."

  70. 16:03

    Okay? So the second box, the second chunk is

  71. 16:08

    stop_reason. So stop_reason means the LLM has stopped for some reason. The, the reason here is that it can't do anything, and if the reason is tool_use, "Ah, now it's time.

  72. 16:21

    Let's go execute that tool." So that second line, get tool, it takes the response, which is formulating the, the parameters and triggering the action. Okay. Now, there's stuff in red here.

  73. 16:34

    This is where I think the LLMs and other, uh... I'm sorry, not LLMs, the ontologies and stuff can come in. So

  74. 16:45

    if you look down there, a-after the, the tool is called, it said, "Tool runs," this is where ontologies could come in. The tool's gonna give us information. We put the information in a form that our, our, our, our validator can use.

  75. 17:07

    And th-think about the validator as operating with this-- these ontologies about our domain. Then we can

  76. 17:16

    make some sense of whether the response of the LLM is reasonable. So this is the loop. Call a tool, check the stop reason. If it's a reasonable result, then let's go with it.

  77. 17:32

    If it's not reasonable, go back to the LLM. Say, "Oh, this is, this is not working," or get a human in the loop. But the idea is

  78. 17:43

    to surround the input with checks. Now, I've got this-- Something that you, that you should be at least taking a look at if you're doing some of this coding is something called Pydantic.

  79. 17:52

    Pydantic is a way to specify s-- the types of-- what you want the types of the parameters to be. Those of you who, who do know Python, know Python is a unstructured type language.

  80. 18:06

    So you can have a variable X equals twenty, X equals hello, no problem. There's no typing. Pydantic adds typing to that. So you wanna check your types with Pydantic, and then check your results with the ontology.

  81. 18:23

    So Pydantic at the door, ontology at the ledger, and pure agents... Oh, by the way, your agents should try to have no side effects.

  82. 18:32

    That helps the whole logic, meaning they're not running off doing something, that they're, they're changing, they're changing things in a database. Not yet. You wanna run them through the ontology first and make sure that works.

  83. 18:44

    Okay. I only got an- I've, I've got another... Just a short time. I'm gonna try to show you some of the things that, um, that you can... Some logical constructs from, from something called OWL, the, the, uh,

  84. 18:59

    the Web Object Language for, for objects. So you have these functional properties, disjoint properties. I'll just put these... You can look at the slides. But essentially, the errors it can catch, look over in the, the right-hand column.

  85. 19:12

    A second refund on the same order is a, is, is a problem. [laughs] Ontologies could catch it, whereas it's ver- it's very tricky to do that in, in English. A payout sent to the support desk instead of the buyer, okay?

  86. 19:27

    You can catch that with an OWL disjoint property, where customer and support rep are two separate entities, okay? Uh, oneOf, made, a made-up value, like probably shipped. You can specify, you must have certain kinds of values.

  87. 19:44

    So, uh, the status, paid, shipped, or refunded, nothing else. And when you're in the pure text world, this can get, this can get funky because the, the LLMs are, again, probabilistic and, um,

  88. 20:00

    return some crazy stuff. Okay. Uh, so really what-- the point I wanna make here is use these reas- you can have a reasoner built on ontology to check, keep the LLM on track, have guardrails to keep it honest, okay?

  89. 20:18

    And for the guardrails, I'm referring to these concepts relat- these support technologies with RDFS and OWL.

  90. 20:29

    And my, my bottom line is nothing is a mistake. There's no win, no fail, only make. Okay. Feel free to reach out to me, [REDACTED:email_address]. I've got a, I've got a, I've got a little website, codesupreme.ai.

  91. 20:44

    I'm a big fan of, if you're John Coltrane, has a, has a, some jazz called, uh, called Love Supreme, so I've named my site Code Supreme, and if you go there, I got some music, and it's all good.

  92. 20:57

    Okay. Thanks very much. [audience applauding] 20 minutes. [outro music]