Frank Coyle explores the role of ontologies in agentic AI systems and the convergence of symbolic and neural approaches.
Ask about this video. Answers come from its transcript only — with the timestamp, so you can check them.
Generated from the transcript and can be wrong — check the timestamp.
Key Takeaways
- Ontologies provide a structured, formal way to represent knowledge for AI agents.
- Combining symbolic ontologies with neural networks (neuro-symbolic AI) helps manage AI uncertainty and hallucinations.
- Existing ontologies and standards should be leveraged rather than reinvented.
- Hands-on learning and sensory engagement enhance understanding of complex AI concepts.
- Graph databases offer flexible, scalable knowledge representation compared to relational databases.
What the video covers
- Frank Coyle introduces himself and discusses the evolving landscape of computer science education amid AI advancements.
- He shares his educational philosophy emphasizing hands-on learning and sensory engagement over passive reading.
- The historical origins of agents in AI and ontologies in philosophy are outlined, linking Aristotle to modern knowledge representation.
- Coyle explains ontologies as formal, shared conceptualizations represented as graph databases, contrasting them with relational databases.
- He discusses two approaches to building ontologies: top-down expert-driven and bottom-up data-driven methods.
- The talk highlights existing ontologies and taxonomies like schema.org, FOAF, Dublin Core, and DBpedia as valuable resources.
- Neuro-symbolic AI is presented as a hybrid approach combining probabilistic LLMs with formal symbolic knowledge to improve reliability.
- Auxiliary technologies such as RDFS and OWL are introduced as tools to augment and constrain ontologies for better agent performance.
- Coyle reflects on the history of expert systems and neural networks, explaining why neural approaches have scaled recently.
- He emphasizes the importance of ontologies for creating guardrails around AI agents to reduce hallucinations and errors.
Chapters
- 00:00Introduction and Educational Philosophy
- 03:14Historical Background of Agents and Ontologies
- 04:44Neuro-symbolic AI and Large Language Models
- 06:13Building Ontologies: Approaches and Challenges
- 07:01Expert Systems, AI Winter, and Neural Networks
- 08:20Existing Ontologies and Taxonomies
- 09:24Auxiliary Technologies: RDFS and OWL
- 10:33Using Ontologies for AI Agent Guardrails
Full Transcript — Download SRT & Markdown
Speaker A
[music] Um, okay, we're going to launch here. So, my name is Frank Coyle. Um, I'm an educator and teaching at Berkeley now. I've been doing this computer science stuff for oh, 30, 35 years.
Speaker A
And um [snorts] I'm intro and right now it's kind of a critical time for uh poor computer science students. Used to be the used to be the only game in town.
Speaker A
Degree was a guaranteed job, and now thanks to AI, it's not. But then again, 5,000 people are here. So, AI and agents are um seem to be the way to go.
Speaker A
So, the question is how do we leverage this new universe that we are moving quickly into. And so, I want to talk about how agents and ontologies will big word fit together. But before you do before I do that, I wanted to um
Speaker A
wanted to give you my uh my educational philosophy. And this comes [clears throat] from uh someone called Sister Corita Kent.
Speaker A
And it was made popular by John Cage, who is a uh an avant-garde musician.
Speaker A
And you got to think about this little bit. Nothing is a mistake. There is no win.
Speaker A
There's no fail. There's only make. And more and more today, that's what's important. Get down and make stuff, and that's how you're going to learn, not by necessarily reading.
Speaker A
I'm also a big fan of writing. My early career was in neuroscience. I'm kind of coming back into it now that Agent AI is bringing uh kind of cognitive science back. But engage your senses. Get a notebook. Get
Speaker A
a pen, a pencil. Draw pictures, write stuff down. Just don't type because when you type you when you're typing your brain is thinking about the letters on the keyboard. When you're writing in a book, your whole brain, your your whole all
Speaker A
your all your sensory systems are engaged and you're going to learn faster that way.
Speaker A
Okay. On to our talk. Agents and ontology. So, there are two lineages here and I want to talk about both, give you a little philosophical background. Um agents, when did we start talking about agents? Well, goes goes back to the
Speaker A
early initial days of AI. People like John McCarthy, uh 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,
Speaker A
which is a term that came in 1956 when all these characters got together and tried to figure out where the future was going. Okay? And the concept of an agent finally evolved, things that perceive and decide and then act and
Speaker A
that's what we're seeing now. Now, what about ontologies? Well, it turns out ontologies are not that new.
Speaker A
Okay? It was actually Aristotle who first came up with the concept of we need a philosophy of of being. Like, whoa, kind of heavy. Um but came up with categories of being and this kind of relates to what people are doing now
Speaker A
with graph databases and knowledge representation. And there are a couple of other people who kind of formalized it.
Speaker A
Uh Von Quine was a philosopher and then this guy Gruber, 1993. And I think this captures what knowledge and uh graph technology really represents. It is a a formal specification of a shared conceptualization. And that's what we want to give to our
Speaker A
agents. We want to give them our concept our conceptualization of the universe, our universe, our domains. 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
Speaker A
have with ontologies. And so, this term is now being used you hearing this a lot, neuro-symbolic 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
Speaker A
that we're assembling. And so, what I'd like to argue is that neuro-symbolic AI sort of represents a way to keep the LLM on its guardrails, because LLMs are by nature probabilistic.
Speaker A
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.
Speaker A
And that's what large language models do in in a way. 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. And this
Speaker A
whole concept of graph databases arose when people began to realize that relational databases sticking data into tables was too restrictive. You wanted to add something new to a relational database, so you have to add a new column. Man, I had then then
Speaker A
you have to redo the whole structure. 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
Speaker A
to have an ontology to represent in a formal way what my organization is doing. How do I do it?
Speaker A
Okay? There are a couple of ways you can approach it. You can have a top-down approach or a bottom-up approach.
Speaker A
Top-down approach is you get the experts together and they sit down and analyze the domain, come up with the entities. What do we have? We have purchase orders, we have customers, we have customer representatives, and we're going to structure them. They have
Speaker A
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.
Speaker A
Everybody thought expert systems was the way to do AI. Symbolic AI was the way to go. Companies rose, millions of dollars were spent.
Speaker A
Uh the the Japanese created this uh future world project in the late '80s. People in America were 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
Speaker A
AI winter. 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 make reality of the of the video games
Speaker A
fantastic, and then someone said, let's turn these things over to the neural networks, and of course, that's kind of why we're here now. So, the other way you can that that people are adding to or creating ontologies is is
Speaker A
from the bottom up. For example, customer reactions. What are the things the customers are involved in? Wait.
Speaker A
Do you 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, it's helpful to be aware that there are existing taxonomies that people have been working
Speaker A
on for the last 15 to 20 years. Things like schema.org, which has a whole set of terms and relationships, so you don't have to reinvent the wheel. In fact, you it's to your advantage to use some of these ontologies. FOAF, Friend of a
Speaker A
Friend, for modeling social networks. The Dublin Core, which was an early an early attempt to come up with terms for describing uh research papers and books and so forth. So, there's a whole series of things. In fact, Wikipedia is based on
Speaker A
an ontology called DBpedia. So, when you do a search on Wikipedia, it's looking things up in its giant graph database.
Speaker A
So, this stuff has been out there underlying a lot of what we already do.
Speaker A
So, take advantage of these things that already exist. Okay. Now, what do you do when you build your ontology? Okay, so what? I know what these entities are, I know what their relationships are, they have properties. How can I do anything with
Speaker A
them? Well, there are other augmenting technologies, auxiliary technologies. Things that we call the things like RDFS, which is a technology, and OWL, which I'll talk more about. So, these have these kind of sit over to the side of
Speaker A
your graph. So, I'm not going to talk about on I mean ontology is a big word and it's often confusing and used in many ways, but think of it as a graph data structure. Okay?
Speaker A
And you have the entities and r
Speaker A
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.
Speaker A
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. What about Scooter? If I say teaches has a
Speaker A
range of student, that means the the right side of the verb, then Scooter is a student. And now I have this extra information into my system.
Speaker A
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. If Sue is an ancestor of Mary and Mary is an ancestor
Speaker A
of Ann, then Sue is an ancestor of Ann. 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.
Speaker A
Then there's 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. That is a functional property.
Speaker A
Okay? So, that's that can serve as a constraint. So, when if you say Bob is my Bob is Jim's father, BB is Jim's father, well, the inference here is that Bob and BB are two ways of representing the same
Speaker A
individual because that is a functional property. Can only have one. So, these derivations and constraints that don't sit in the graph, they sit sort of on the side and they can help as we're going to see, I'm going to
Speaker A
propose, when we deal with agents, how they can they can help us out. So, what about agents?
Speaker A
Everybody's talking about agents now and everybody's talking about loops. Loops, loops, loops everywhere. Loops have been around for a long time.
Speaker A
Back in the '60s, people were debating who has the best programming language? Fortran or COBOL? No, mine is better.
Speaker A
No, mine is better. Oh, you don't know anything. You don't know what you're talking about.
Speaker A
Bohm and Jacopini in 1966 came out and said, "Okay, there is no real difference in programming languages if they have three aspects.
Speaker A
Sequence. I can put statement A, statement B, statement C. Fine. I have conditionals. I can have if then.
Speaker A
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 a can be computed by computational devices
Speaker A
from the work of Alan Turing. Okay? And now we're seeing this in agentic AI.
Speaker A
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 do.
Speaker A
The danger though of loops is that they can break. If you're If you're a programmer, you know, you've all go into infinite loop.
Speaker A
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.
Speaker A
Token counts crank up as the loops continue. So, you don't you need to be careful, okay? 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.
Speaker A
Which is the symbolic part of the whole thing. So, I want to show you a little example using Claude agent. So, little code here. Don't get scared but I know nobody does Python anymore, but you got to look at what the agent's
Speaker A
giving you and you got to you got to move in and and manipulate it. 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
Speaker A
see, r e s p, 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 have a tool, and we're we're asking the LLM to
Speaker A
solve this problem using a tool. Now, here's the here's the catch. 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 it, but they can't
Speaker A
do anything. 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?" And then the LLM will set up the parameters,
Speaker A
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. I know what your prompt is. So, here is the call that you
Speaker A
need to make of the tool, because I can't do it. I'm the LLM. I'm just locked in this box.
Speaker A
Okay? So, the second box the second chunk is stop reason. So, stop reason means the LLM has stopped for some reason.
Speaker A
The The reason here is that it can't do anything, and if the reason is tool use, ah, now it's time. Let's go execute that tool. So, that second line, get tool. It takes the response, which is formulating the the parameters, and
Speaker A
triggering the action. Okay. Now, I have this stuff in red here. This is where I think the LLMs and other uh I'm sorry, not LLMs.
Speaker A
The ontologies and stuff can come in. So, if you look down there, after the the tool is called, it said tool runs. This is where ontologies could come in.
Speaker A
The tool's going to give us information. We put the information in a form that our our our our validator can use, and think about the validator as operating with this these ontologies about our domain, then we can make some sense
Speaker A
of whether the response of the LLM is reasonable. So, this is the loop. Call a tool, check the stop reason.
Speaker A
If it's a reasonable result, then let's go with it. 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 to surround the input with checks. Now,
Speaker A
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. Pydantic is a way to specify the types of what you want the types of
Speaker A
the parameters to be. Those of you who who do know Python, know Python is a unstructured type language. So, you can have a variable x = 20, x = hello, no problem. There's no typing.
Speaker A
Pydantic adds typing to that. So, you want to check your types with Pydantic and then check your results with the ontology.
Speaker A
So, Pydantic at the door, ontology at the ledger, and pure agents and by the way, your agents should try to have no side effects.
Speaker A
That helps the whole logic. Meaning, they're not running off doing something that they're they're changing they're changing things in the database not yet.
Speaker A
You want to run them through the ontology first and make sure that works. Okay.
Speaker A
I only got an I've got I've got another I've just a short time. I'm going to try to show you some of the things that um that you can some logical constructs from from something called OWL, the uh
Speaker A
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. A second refund on
Speaker A
the same order is a is is a problem. But ontologies could catch it, whereas it's it's very tricky to do that in in English. A payout sent to the support desk instead of the buyer. Okay?
Speaker A
You can catch that with an owl disjoint property where customer and support rep are two separate entities. Okay?
Speaker A
Uh one of may a made-up value like probably shipped. You can specify you must have certain kinds of value.
Speaker A
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 return some crazy stuff. Okay. Uh so,
Speaker A
really what the point I want to make here is use these re- you can have a reasoner built on ontology to check keep the LLM on track, have guardrails to keep it honest. Okay?
Speaker A
And for the guardrails, I'm referring to these concepts re- these support technologies with RDFS and owl.
Speaker A
And my my bottom line is and nothing is a mistake, there's no win, no fail, only a make.
Speaker A
Okay. Feel free to reach out to me coil@burkly. I've got a I've got a I've got a little website codesupreme.ai. 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
Speaker A
site Code Supreme. And if you go there, I've got some music and it's all good. Okay.
Speaker A
Thanks very much. 20 minutes. [applause] [music] Woo!
Topics:Agentic SystemsOntologiesNeuro-symbolic AILarge Language ModelsGraph DatabasesKnowledge RepresentationArtificial IntelligenceSymbolic AIAI EducationFrank Coyle











