Why Agentic Systems Need Ontologies — Frank Coyle, UC Berkeley
Read full transcript 18 segments
-
>> Um, okay, we're going to launch here. >> Um, okay, we're going to launch here. So, my name is Frank Coyle. So, my name is Frank Coyle. So, my name is Frank Coyle. Um, I'm I'm an educator and teaching at Um, I'm I'm an educator and teaching at Um, I'm I'm an educator and teaching at Berkeley now. I've been doing this Berkeley now. I've been doing this Berkeley now. I've been doing this computer science stuff for computer science stuff for computer science stuff for oh, 30, 35 years. oh, 30, 35 years. oh, 30, 35 years. And um And um And um >> [snorts] >> [snorts] >> [snorts] >> I'm intro and right now it's kind of a >> I'm intro and right now it's kind of a >> I'm intro and right now it's kind of a critical time for uh critical time for uh critical time for uh poor computer science students. Used to poor computer science students. Used to poor computer science students. Used to be the used to be the only game in town. be the used to be the only game in town. be the used to be the only game in town. Degree was a guaranteed job, and now Degree was a guaranteed job, and now Degree was a guaranteed job, and now thanks to AI, it's not. But then again, thanks to AI, it's not. But then again, thanks to AI, it's not. But then again, 5,000 people are here. So, AI and and 5,000 people are here. So, AI and and 5,000 people are here. So, AI and and agents are um seem to be the way to go. agents are um seem to be the way to go. agents are um seem to be the way to go. So, the question is how do we leverage So, the question is how do we leverage So, the question is how do we leverage this new universe that we are moving this new universe that we are moving this new universe that we are moving quickly into. And so, I want to talk quickly into. And so, I want to talk quickly into. And so, I want to talk about how agents and ontologies will big about how agents and ontologies will big about how agents and ontologies will big word fit together. But before you do word fit together. But before you do word fit together. But before you do before I do that, I wanted to um before I do that, I wanted to um before I do that, I wanted to um wanted to give you my uh my educational wanted to give you my uh my educational wanted to give you my uh my educational philosophy. philosophy. philosophy. And this comes [clears throat] from uh And this comes [clears throat] from uh And this comes [clears throat] from uh someone called Sister Corita Kent. someone called Sister Corita Kent. someone called Sister Corita Kent. And it was made popular by John Cage, And it was made popular by John Cage, And it was made popular by John Cage, who is a uh an avant-garde musician.
-
who is a uh an avant-garde musician. who is a uh an avant-garde musician. And And And you got to think about this little bit. you got to think about this little bit. you got to think about this little bit. Nothing is a mistake. Nothing is a mistake. Nothing is a mistake. There is no win. There is no win. There is no win. There's no fail. There's only make. There's no fail. There's only make. There's no fail. There's only make. And more and more today, that's what's And more and more today, that's what's And more and more today, that's what's important. Get down and make stuff, and important. Get down and make stuff, and important. Get down and make stuff, and that's how you're going to learn, not by that's how you're going to learn, not by that's how you're going to learn, not by necessarily reading. necessarily reading. necessarily reading. I'm also a big fan of writing. I'm also a big fan of writing. I'm also a big fan of writing. My early career was in neuroscience. I'm My early career was in neuroscience. I'm My early career was in neuroscience. I'm kind of coming back into it now that kind of coming back into it now that kind of coming back into it now that Agent AI is bringing uh Agent AI is bringing uh Agent AI is bringing uh kind of cognitive science back. But kind of cognitive science back. But kind of cognitive science back. But engage your senses. Get a notebook. Get engage your senses. Get a notebook. Get engage your senses. Get a notebook. Get a a a pen, a pencil. Draw pictures, write pen, a pencil. Draw pictures, write pen, a pencil. Draw pictures, write stuff down. stuff down. stuff down. Just don't type because when you type Just don't type because when you type Just don't type because when you type you when you're typing your brain is you when you're typing your brain is you when you're typing your brain is thinking about the letters on the thinking about the letters on the thinking about the letters on the keyboard. When you're writing in a book, keyboard. When you're writing in a book, keyboard. When you're writing in a book, your whole brain, your your whole all your whole brain, your your whole all your whole brain, your your whole all your all your sensory systems are your all your sensory systems are your all your sensory systems are engaged and you're going to learn engaged and you're going to learn engaged and you're going to learn faster that way. faster that way. faster that way. Okay. Okay. Okay. On to our talk.
-
Agents and ontology. So, there are two Agents and ontology. So, there are two lineages here and I want to talk about lineages here and I want to talk about lineages here and I want to talk about both, give you a little philosophical both, give you a little philosophical both, give you a little philosophical background. Um background. Um background. Um agents, when did we start talking about agents, when did we start talking about agents, when did we start talking about agents? Well, goes goes back to the agents? Well, goes goes back to the agents? Well, goes goes back to the early initial days of AI. People like early initial days of AI. People like early initial days of AI. People like John McCarthy, John McCarthy, John McCarthy, uh uh uh uh uh uh uh uh uh uh uh Selfridge, Marvin Minsky, Society uh uh Selfridge, Marvin Minsky, Society uh uh Selfridge, Marvin Minsky, Society of Mind. People started thinking about of Mind. People started thinking about of Mind. People started thinking about the fact that this new computing the fact that this new computing the fact that this new computing technology was going to lead us into technology was going to lead us into technology was going to lead us into some kind of artificial intelligence, some kind of artificial intelligence, some kind of artificial intelligence, which is a term that came which is a term that came which is a term that came in 1956 when all these characters got in 1956 when all these characters got in 1956 when all these characters got together and tried to figure out where together and tried to figure out where together and tried to figure out where the future was going. Okay? And the the future was going. Okay? And the the future was going. Okay? And the concept of an agent finally evolved, concept of an agent finally evolved, concept of an agent finally evolved, things that things that things that perceive and decide and then act and perceive and decide and then act and perceive and decide and then act and that's what we're seeing now. that's what we're seeing now. that's what we're seeing now. Now, what about ontologies? Well, it Now, what about ontologies? Well, it Now, what about ontologies? Well, it turns out ontologies are not that new. turns out ontologies are not that new. turns out ontologies are not that new. Okay? It was actually Aristotle who Okay? It was actually Aristotle who Okay? It was actually Aristotle who first came up with the concept of we first came up with the concept of we first came up with the concept of we need a philosophy of of being. Like, need a philosophy of of being. Like, need a philosophy of of being. Like, whoa, kind of heavy. Um but came up with whoa, kind of heavy. Um but came up with whoa, kind of heavy. Um but came up with categories of being and this kind of categories of being and this kind of categories of being and this kind of relates to what people are doing now relates to what people are doing now relates to what people are doing now with graph databases and knowledge with graph databases and knowledge with graph databases and knowledge representation. And there are a couple representation. And there are a couple representation. And there are a couple of other people who kind of formalized of other people who kind of formalized of other people who kind of formalized it.
-
it. it. Uh Uh Uh Von Quine was a philosopher and then Von Quine was a philosopher and then Von Quine was a philosopher and then this guy Gruber, 1993. And I think this this guy Gruber, 1993. And I think this this guy Gruber, 1993. And I think this captures what captures what captures what knowledge and uh knowledge and uh knowledge and uh graph technology really represents. It graph technology really represents. It graph technology really represents. It is a a formal specification is a a formal specification is a a formal specification of a shared conceptualization. And of a shared conceptualization. And of a shared conceptualization. And that's what we want to give to our that's what we want to give to our that's what we want to give to our agents. We want to give them our concept agents. We want to give them our concept agents. We want to give them our concept our conceptualization of the universe, our conceptualization of the universe, our conceptualization of the universe, our universe, our domains. Okay? And our universe, our domains. Okay? And our universe, our domains. Okay? And now, what's happening now, what's happening now, what's happening is you're getting the convergence of is you're getting the convergence of is you're getting the convergence of something that is probabilistic, something that is probabilistic, something that is probabilistic, the agents, the LLMs, with the the agents, the LLMs, with the the agents, the LLMs, with the the more formal representations that you the more formal representations that you the more formal representations that you have with ontologies. And so, this term have with ontologies. And so, this term have with ontologies. And so, this term is now being used you is now being used you is now being used you hearing this a lot, neuro-symbolic hearing this a lot, neuro-symbolic hearing this a lot, neuro-symbolic AI. Sounds pretty fancy, but it's really AI. Sounds pretty fancy, but it's really AI. Sounds pretty fancy, but it's really neural networks tied into neural networks tied into neural networks tied into symbolic AI, which rule-based systems symbolic AI, which rule-based systems symbolic AI, which rule-based systems come under that category, come under that category, come under that category, um as do the knowledge graphs that we're um as do the knowledge graphs that we're um as do the knowledge graphs that we're that we're that we're that we're assembling. And so, assembling. And so, assembling. And so, what I'd like to argue is that what I'd like to argue is that what I'd like to argue is that neuro-symbolic AI neuro-symbolic AI neuro-symbolic AI sort of represents a way to keep the LLM sort of represents a way to keep the LLM sort of represents a way to keep the LLM on its guardrails, because LLMs are by on its guardrails, because LLMs are by on its guardrails, because LLMs are by nature probabilistic.
-
nature probabilistic. nature probabilistic. People worry about hallucinations, but People worry about hallucinations, but People worry about hallucinations, but that's the feature. That's actually a that's the feature. That's actually a that's the feature. That's actually a feature of large language models. It's feature of large language models. It's feature of large language models. It's who we are. We hallucinate in a way. We who we are. We hallucinate in a way. We who we are. We hallucinate in a way. We imagine things that may not exist, and imagine things that may not exist, and imagine things that may not exist, and then we turn them into reality. then we turn them into reality. then we turn them into reality. And that's what large language models do And that's what large language models do And that's what large language models do in in in in a way. in a way. in a way. Okay? So, Okay? So, Okay? So, let's just quickly overview what let's just quickly overview what let's just quickly overview what ontologies are. It's not They're not ontologies are. It's not They're not ontologies are. It's not They're not complicated. They're basically a complicated. They're basically a complicated. They're basically a representation of entities and their representation of entities and their representation of entities and their relationships to other entities. And relationships to other entities. And relationships to other entities. And these entities have properties. And this these entities have properties. And this these entities have properties. And this whole concept of graph databases whole concept of graph databases whole concept of graph databases arose when arose when arose when people began to realize that relational people began to realize that relational people began to realize that relational databases databases databases sticking data into tables was too sticking data into tables was too sticking data into tables was too restrictive. You wanted to add something restrictive. You wanted to add something restrictive. You wanted to add something new to new to new to a relational database, so you have to a relational database, so you have to a relational database, so you have to add a new column. Man, I had then then add a new column. Man, I had then then add a new column. Man, I had then then you have to redo the whole structure. you have to redo the whole structure. you have to redo the whole structure. With a with a graph database, you can With a with a graph database, you can With a with a graph database, you can just attach another item. You can just just attach another item. You can just just attach another item. You can just attach a property. You can attach a attach a property. You can attach a attach a property. You can attach a relationship. Okay? So, the question relationship. Okay? So, the question relationship. Okay? So, the question often arises, okay, I I get it. I need often arises, okay, I I get it. I need often arises, okay, I I get it. I need to have an ontology to have an ontology to have an ontology to represent in a formal way what my to represent in a formal way what my to represent in a formal way what my organization is doing. How do I do it?
-
organization is doing. How do I do it? organization is doing. How do I do it? Okay? There are a couple of ways you can Okay? There are a couple of ways you can Okay? There are a couple of ways you can approach it. You can have a top-down approach it. You can have a top-down approach it. You can have a top-down approach or a bottom-up approach. approach or a bottom-up approach. approach or a bottom-up approach. Top-down approach is Top-down approach is Top-down approach is you get the experts together and they you get the experts together and they you get the experts together and they sit down and analyze the domain, come up sit down and analyze the domain, come up sit down and analyze the domain, come up with the entities. What do we have? We with the entities. What do we have? We with the entities. What do we have? We have purchase orders, we have customers, have purchase orders, we have customers, have purchase orders, we have customers, we have customer representatives, and we have customer representatives, and we have customer representatives, and we're going to structure them. They have we're going to structure them. They have we're going to structure them. They have properties. These are the relationships. properties. These are the relationships. properties. These are the relationships. Okay, that's one way. And this models Okay, that's one way. And this models Okay, that's one way. And this models what we were doing back in the '80s when what we were doing back in the '80s when what we were doing back in the '80s when I was involved in expert systems. I was involved in expert systems. I was involved in expert systems. Everybody thought expert systems was the Everybody thought expert systems was the Everybody thought expert systems was the way to do AI. Symbolic AI was the way to way to do AI. Symbolic AI was the way to way to do AI. Symbolic AI was the way to go. Companies rose, millions of dollars go. Companies rose, millions of dollars go. Companies rose, millions of dollars were spent. were spent. were spent. Uh the Uh the Uh the the Japanese created this uh the Japanese created this uh the Japanese created this uh future world project in the late '80s. future world project in the late '80s. future world project in the late '80s. People in America were my my son was People in America were my my son was People in America were my my son was taking Japanese in school because of taking Japanese in school because of taking Japanese in school because of these expert systems. And these expert systems. And these expert systems. And but they couldn't scale. They couldn't but they couldn't scale. They couldn't but they couldn't scale. They couldn't scale, and then we went into a kind of scale, and then we went into a kind of scale, and then we went into a kind of AI winter.
-
AI winter. AI winter. Where did neural networks came come Where did neural networks came come Where did neural networks came come from? Neural networks were put out there from? Neural networks were put out there from? Neural networks were put out there in the '60s, but they couldn't scale in the '60s, but they couldn't scale in the '60s, but they couldn't scale because we didn't happen to have Nvidia because we didn't happen to have Nvidia because we didn't happen to have Nvidia who was off making GPUs to make make who was off making GPUs to make make who was off making GPUs to make make reality of the of the video games reality of the of the video games reality of the of the video games fantastic, and then someone said, let's fantastic, and then someone said, let's fantastic, and then someone said, let's turn these things over to the neural turn these things over to the neural turn these things over to the neural networks, and of course, that's kind of networks, and of course, that's kind of networks, and of course, that's kind of why we're here now. So, why we're here now. So, why we're here now. So, the other way you can that that people the other way you can that that people the other way you can that that people are are are adding to or creating ontologies is is adding to or creating ontologies is is adding to or creating ontologies is is from the bottom up. For example, from the bottom up. For example, from the bottom up. For example, customer customer customer reactions. reactions. reactions. What are the things the customers are What are the things the customers are What are the things the customers are involved in? Wait. involved in? Wait. involved in? Wait. Do you these entities, these Do you these entities, these Do you these entities, these relationships, let's add this to our relationships, let's add this to our relationships, let's add this to our ontology. Let's Let's add this ontology. Let's Let's add this ontology. Let's Let's add this information to the graph. Now, as as a information to the graph. Now, as as a information to the graph. Now, as as a help, help, help, it's helpful to be aware that there are it's helpful to be aware that there are it's helpful to be aware that there are existing existing existing taxonomies that people have been working taxonomies that people have been working taxonomies that people have been working on for the last 15 to 20 years. Things on for the last 15 to 20 years. Things on for the last 15 to 20 years. Things like schema.org, which has a whole set like schema.org, which has a whole set like schema.org, which has a whole set of terms and relationships, so you don't of terms and relationships, so you don't of terms and relationships, so you don't have to reinvent the wheel. In fact, you have to reinvent the wheel. In fact, you have to reinvent the wheel. In fact, you it's to your advantage to use some of it's to your advantage to use some of it's to your advantage to use some of these ontologies. FOAF, Friend of a these ontologies. FOAF, Friend of a these ontologies. FOAF, Friend of a Friend, for modeling social networks.
-
Friend, for modeling social networks. Friend, for modeling social networks. The Dublin Core, which was The Dublin Core, which was The Dublin Core, which was an early an early attempt to come up an early an early attempt to come up an early an early attempt to come up with terms for describing with terms for describing with terms for describing uh research papers and books and so uh research papers and books and so uh research papers and books and so forth. So, there's a whole series of forth. So, there's a whole series of forth. So, there's a whole series of things. In fact, Wikipedia is based on things. In fact, Wikipedia is based on things. In fact, Wikipedia is based on an ontology called DBpedia. So, when you an ontology called DBpedia. So, when you an ontology called DBpedia. So, when you do a search on Wikipedia, it's looking do a search on Wikipedia, it's looking do a search on Wikipedia, it's looking things up in its giant graph database. things up in its giant graph database. things up in its giant graph database. So, this stuff has been out there So, this stuff has been out there So, this stuff has been out there underlying a lot of what we already do. underlying a lot of what we already do. underlying a lot of what we already do. So, take advantage of these things that So, take advantage of these things that So, take advantage of these things that already exist. already exist. already exist. Okay. Now, what do you do when you build Okay. Now, what do you do when you build Okay. Now, what do you do when you build your ontology? Okay, so what? I know your ontology? Okay, so what? I know your ontology? Okay, so what? I know what these entities are, I know what what these entities are, I know what what these entities are, I know what their relationships are, they have their relationships are, they have their relationships are, they have properties. How can I do anything with properties. How can I do anything with properties. How can I do anything with them? Well, there are other augmenting them? Well, there are other augmenting them? Well, there are other augmenting technologies, auxiliary technologies. technologies, auxiliary technologies. technologies, auxiliary technologies. Things that we call the things like Things that we call the things like Things that we call the things like RDFS, which is a technology, and OWL, RDFS, which is a technology, and OWL, RDFS, which is a technology, and OWL, which I'll talk more about. So, these which I'll talk more about. So, these which I'll talk more about. So, these have have have these kind of sit over to the side of these kind of sit over to the side of these kind of sit over to the side of your graph. So, I'm not going to talk your graph. So, I'm not going to talk your graph. So, I'm not going to talk about on I mean ontology is a big word about on I mean ontology is a big word about on I mean ontology is a big word and it's often confusing and used in and it's often confusing and used in and it's often confusing and used in many ways, but think of it as a graph many ways, but think of it as a graph many ways, but think of it as a graph data structure. Okay?
-
data structure. Okay? data structure. Okay? And you have the entities and And you have the entities and And you have the entities and relationships, but you want to apply relationships, but you want to apply relationships, but you want to apply some control over them. Or you want to some control over them. Or you want to some control over them. Or you want to be able to make inference over them. So, be able to make inference over them. So, be able to make inference over them. So, for example, there is uh for example, there is uh for example, there is uh some terms in this technology called some terms in this technology called some terms in this technology called RDFS. RDFS. RDFS. Domain and range. So, if I say Domain and range. So, if I say Domain and range. So, if I say teaches teaches teaches has a domain of teacher. That means if I has a domain of teacher. That means if I has a domain of teacher. That means if I say Bob teaches Scooter in my text, I say Bob teaches Scooter in my text, I say Bob teaches Scooter in my text, I can infer that Bob is a teacher. can infer that Bob is a teacher. can infer that Bob is a teacher. And if I say all teachers are persons, And if I say all teachers are persons, And if I say all teachers are persons, then this statement lets me know if I then this statement lets me know if I then this statement lets me know if I say Bob teaches Scooter, now I know Bob say Bob teaches Scooter, now I know Bob say Bob teaches Scooter, now I know Bob is a person, Bob is a teacher. What is a person, Bob is a teacher. What is a person, Bob is a teacher. What about Scooter? If I say teaches has a about Scooter? If I say teaches has a about Scooter? If I say teaches has a range of student, that means the the range of student, that means the the range of student, that means the the right side of the verb, then Scooter is right side of the verb, then Scooter is right side of the verb, then Scooter is a student. And now I have this extra a student. And now I have this extra a student. And now I have this extra information into my system. information into my system. information into my system. OWL also has a series of OWL also has a series of OWL also has a series of of of properties that allow you to make of of properties that allow you to make of of properties that allow you to make some inferences. So, a transitive some inferences. So, a transitive some inferences. So, a transitive property transitive property says, if property transitive property says, if property transitive property says, if Sue is an ancestor like ancestor is a Sue is an ancestor like ancestor is a Sue is an ancestor like ancestor is a transitive property. If Sue is an transitive property. If Sue is an transitive property. If Sue is an ancestor of Mary and Mary is an ancestor ancestor of Mary and Mary is an ancestor ancestor of Mary and Mary is an ancestor of Ann, then Sue is an ancestor of Ann.
-
of Ann, then Sue is an ancestor of Ann. of Ann, then Sue is an ancestor of Ann. Okay? This was not initially into my Okay? This was not initially into my Okay? This was not initially into my graph system, but with applying these graph system, but with applying these graph system, but with applying these functional properties, I can then functional properties, I can then functional properties, I can then add and augment the system with this add and augment the system with this add and augment the system with this extra data. So, that's very useful. extra data. So, that's very useful. extra data. So, that's very useful. Then there's some Then there's some Then there's some properties called functional properties, properties called functional properties, properties called functional properties, which means only one. which means only one. which means only one. So, has father So, has father So, has father is a functional property. You can only is a functional property. You can only is a functional property. You can only have one father. You can only have one have one father. You can only have one have one father. You can only have one mother. That is a functional property. mother. That is a functional property. mother. That is a functional property. Okay? So, that's that can serve as a Okay? So, that's that can serve as a Okay? So, that's that can serve as a constraint. So, when constraint. So, when constraint. So, when if you say Bob is my Bob is Jim's if you say Bob is my Bob is Jim's if you say Bob is my Bob is Jim's father, BB is Jim's father, father, BB is Jim's father, father, BB is Jim's father, well, the inference here is that Bob and BB the inference here is that Bob and BB are two ways of representing the same are two ways of representing the same are two ways of representing the same individual because individual because individual because that is a functional property. Can only that is a functional property. Can only that is a functional property. Can only have one. So, these derivations and have one. So, these derivations and have one. So, these derivations and constraints that don't sit in the graph, constraints that don't sit in the graph, constraints that don't sit in the graph, they sit sort of on the side they sit sort of on the side they sit sort of on the side and they can help and they can help and they can help as we're going to see, I'm going to as we're going to see, I'm going to as we're going to see, I'm going to propose, propose, propose, when we deal with agents, how they can when we deal with agents, how they can when we deal with agents, how they can they can help us out. So, they can help us out. So, they can help us out. So, what about agents?
-
Everybody's talking about agents now and Everybody's talking about agents now and everybody's talking about loops. Loops, everybody's talking about loops. Loops, everybody's talking about loops. Loops, loops, loops everywhere. loops, loops everywhere. loops, loops everywhere. Loops have been around for a long time. Loops have been around for a long time. Loops have been around for a long time. Back in the '60s, people were debating Back in the '60s, people were debating Back in the '60s, people were debating who has the best programming language? who has the best programming language? who has the best programming language? Fortran or COBOL? No, mine is better. Fortran or COBOL? No, mine is better. Fortran or COBOL? No, mine is better. No, mine is better. Oh, you don't know No, mine is better. Oh, you don't know No, mine is better. Oh, you don't know anything. You don't know what you're anything. You don't know what you're anything. You don't know what you're talking about. talking about. talking about. Bohm and Jacopini in 1966 came out and Bohm and Jacopini in 1966 came out and Bohm and Jacopini in 1966 came out and said, "Okay, there is no real difference said, "Okay, there is no real difference said, "Okay, there is no real difference in programming languages if they have in programming languages if they have in programming languages if they have three aspects. three aspects. three aspects. Sequence. I can put statement A, Sequence. I can put statement A, Sequence. I can put statement A, statement B, statement C. Fine. I have statement B, statement C. Fine. I have statement B, statement C. Fine. I have conditionals. I can have if then. conditionals. I can have if then. conditionals. I can have if then. And the last piece, I have a loop. And the last piece, I have a loop. And the last piece, I have a loop. If I have a loop, if I have iteration, If I have a loop, if I have iteration, If I have a loop, if I have iteration, if I take these three things, if I take these three things, if I take these three things, the the language is what's called Turing the the language is what's called Turing the the language is what's called Turing complete. Can do any can compute complete. Can do any can compute complete. Can do any can compute anything that a anything that a anything that a can be computed by computational devices can be computed by computational devices can be computed by computational devices from the work of Alan Turing. from the work of Alan Turing. from the work of Alan Turing. Okay? Okay? Okay? And now we're seeing this in agentic AI.
-
And now we're seeing this in agentic AI. And now we're seeing this in agentic AI. Agents are now have loops. Loops give us Agents are now have loops. Loops give us Agents are now have loops. Loops give us the last piece in the equation of giving the last piece in the equation of giving the last piece in the equation of giving us us us a technology that is capable of a technology that is capable of a technology that is capable of doing anything that computational doing anything that computational doing anything that computational devices can do. devices can do. devices can do. The danger though of loops is that they The danger though of loops is that they The danger though of loops is that they can break. can break. can break. If you're If you're a programmer, you If you're If you're a programmer, you If you're If you're a programmer, you know, you've all go into infinite loop. know, you've all go into infinite loop. know, you've all go into infinite loop. Not good. Not good. Not good. Loops can drift as agents start talking Loops can drift as agents start talking Loops can drift as agents start talking to each other, things get all go off off to each other, things get all go off off to each other, things get all go off off the rails. And the rails. And the rails. And loops can cost you money. loops can cost you money. loops can cost you money. Token counts crank up as the loops Token counts crank up as the loops Token counts crank up as the loops continue. So, you don't you need to be continue. So, you don't you need to be continue. So, you don't you need to be careful, okay? But in a way we are careful, okay? But in a way we are careful, okay? But in a way we are revisiting some of the early stuff with revisiting some of the early stuff with revisiting some of the early stuff with symbolic AI. I would argue we're going symbolic AI. I would argue we're going symbolic AI. I would argue we're going back to the world of expert systems. back to the world of expert systems. back to the world of expert systems. Which is the symbolic part of the whole Which is the symbolic part of the whole Which is the symbolic part of the whole thing. So, I want to show you a little thing. So, I want to show you a little thing. So, I want to show you a little example using Claude example using Claude example using Claude agent. So, little code here. Don't get agent. So, little code here. Don't get agent. So, little code here. Don't get scared, but scared, but scared, but I know nobody does Python anymore, but I know nobody does Python anymore, but I know nobody does Python anymore, but you got to look at what the agent's you got to look at what the agent's you got to look at what the agent's giving you and you got to you got to giving you and you got to you got to giving you and you got to you got to move in and and manipulate it. So, move in and and manipulate it. So, move in and and manipulate it. So, here's a here's a loop while true, here's a here's a loop while true, here's a here's a loop while true, classic Python loop. Okay? And so, we classic Python loop. Okay? And so, we classic Python loop. Okay? And so, we have a client. So, we're actually So, have a client. So, we're actually So, have a client. So, we're actually So, the first little chunk here that you the first little chunk here that you the first little chunk here that you see, r e s p, the response, this is just see, r e s p, the response, this is just see, r e s p, the response, this is just some code where we have a model and we
-
some code where we have a model and we some code where we have a model and we have uh have uh have uh we have a prompt, that's part of part of we have a prompt, that's part of part of we have a prompt, that's part of part of the messages, the messages, the messages, and we have a tool, and we have a tool, and we have a tool, and we're we're asking the LLM to and we're we're asking the LLM to and we're we're asking the LLM to solve this problem using a tool. Now, solve this problem using a tool. Now, solve this problem using a tool. Now, here's the here's the catch. here's the here's the catch. here's the here's the catch. LLMs can't do anything. All they can do LLMs can't do anything. All they can do LLMs can't do anything. All they can do is give us the next word with a high is give us the next word with a high is give us the next word with a high probability. Amazingly, we can now have probability. Amazingly, we can now have probability. Amazingly, we can now have these conversations it, but they can't these conversations it, but they can't these conversations it, but they can't do anything. But, we can give it a tool, do anything. But, we can give it a tool, do anything. But, we can give it a tool, and we can give it and we can give it and we can give it what we want, and say, what we want, and say, what we want, and say, "How do you think this tool can help us "How do you think this tool can help us "How do you think this tool can help us get what we want?" And then the LLM will get what we want?" And then the LLM will get what we want?" And then the LLM will set up the parameters, set up the parameters, set up the parameters, and come back to us, and say, "Okay, and come back to us, and say, "Okay, and come back to us, and say, "Okay, here's my response. here's my response. here's my response. I can't execute this tool, but I know I can't execute this tool, but I know I can't execute this tool, but I know what the input parameters are. I know what the input parameters are. I know what the input parameters are. I know what your context is. I know what your what your context is. I know what your what your context is. I know what your prompt is. So, here is the call that you prompt is. So, here is the call that you prompt is. So, here is the call that you need to make need to make need to make of the tool, because I can't do it. I'm of the tool, because I can't do it. I'm of the tool, because I can't do it. I'm the LLM. I'm just locked in this box.
-
the LLM. I'm just locked in this box. the LLM. I'm just locked in this box. Okay? So, the second box the second Okay? So, the second box the second Okay? So, the second box the second chunk is chunk is chunk is stop reason. So, stop reason means stop reason. So, stop reason means stop reason. So, stop reason means the LLM has stopped for some reason. the LLM has stopped for some reason. the LLM has stopped for some reason. The The reason here is that it can't do The The reason here is that it can't do The The reason here is that it can't do anything, and if the reason is tool use, anything, and if the reason is tool use, anything, and if the reason is tool use, ah, now it's time. Let's go execute that ah, now it's time. Let's go execute that ah, now it's time. Let's go execute that tool. So, that second line, get tool. It tool. So, that second line, get tool. It tool. So, that second line, get tool. It takes the response, which is takes the response, which is takes the response, which is formulating the the parameters, and formulating the the parameters, and formulating the the parameters, and triggering the action. triggering the action. triggering the action. Okay. Now, I have this stuff in red Okay. Now, I have this stuff in red Okay. Now, I have this stuff in red here. This is where I think here. This is where I think here. This is where I think the LLMs and other uh the LLMs and other uh the LLMs and other uh I'm sorry, not LLMs. I'm sorry, not LLMs. I'm sorry, not LLMs. The ontologies and stuff can come in. The ontologies and stuff can come in. The ontologies and stuff can come in. So, So, So, if you look down there, if you look down there, if you look down there, after the the tool is called, it said after the the tool is called, it said after the the tool is called, it said tool runs. This is where tool runs. This is where tool runs. This is where ontologies could come in. ontologies could come in. ontologies could come in. The tool's going to give us information. The tool's going to give us information. The tool's going to give us information. We put the information in a form We put the information in a form We put the information in a form that our that our that our our our our validator can use, and think our our our validator can use, and think our our our validator can use, and think about the validator as operating with about the validator as operating with about the validator as operating with this these ontologies about our domain, this these ontologies about our domain, this these ontologies about our domain, then we can then we can then we can make some sense make some sense make some sense of whether the response of the LLM is of whether the response of the LLM is of whether the response of the LLM is reasonable. So, this is the loop. Call a reasonable. So, this is the loop. Call a reasonable. So, this is the loop. Call a tool, check the stop reason.
-
tool, check the stop reason. tool, check the stop reason. If it's a reasonable result, then let's If it's a reasonable result, then let's If it's a reasonable result, then let's go with it. If it's not reasonable, go go with it. If it's not reasonable, go go with it. If it's not reasonable, go back to the LLM. Say, "Oh, this is this back to the LLM. Say, "Oh, this is this back to the LLM. Say, "Oh, this is this is not working." Or get a human in the is not working." Or get a human in the is not working." Or get a human in the loop. But the idea is loop. But the idea is loop. But the idea is to surround the input with checks. Now, to surround the input with checks. Now, to surround the input with checks. Now, I've got this I've got this I've got this something that you that you should be at something that you that you should be at something that you that you should be at least taking a look at if you're doing least taking a look at if you're doing least taking a look at if you're doing some of this coding is something called some of this coding is something called some of this coding is something called Pydantic. Pydantic is a way to specify Pydantic. Pydantic is a way to specify Pydantic. Pydantic is a way to specify the types of what you want the types of the types of what you want the types of the types of what you want the types of the parameters to be. Those of you who the parameters to be. Those of you who the parameters to be. Those of you who who do know Python, know Python is a who do know Python, know Python is a who do know Python, know Python is a unstructured type language. So, you can unstructured type language. So, you can unstructured type language. So, you can have a variable x = 20, x = hello, no have a variable x = 20, x = hello, no have a variable x = 20, x = hello, no problem. There's no typing. problem. There's no typing. problem. There's no typing. Pydantic adds typing to that. So, you Pydantic adds typing to that. So, you Pydantic adds typing to that. So, you want to want to want to check your types with Pydantic and then check your types with Pydantic and then check your types with Pydantic and then check your results with the ontology. So, Pydantic at the door, ontology at So, Pydantic at the door, ontology at the ledger, and pure agents and by the the ledger, and pure agents and by the the ledger, and pure agents and by the way, your agents should try to have no way, your agents should try to have no way, your agents should try to have no side effects.
-
side effects. side effects. That helps the whole logic. Meaning, That helps the whole logic. Meaning, That helps the whole logic. Meaning, they're not running off doing something they're not running off doing something they're not running off doing something that they're they're changing they're that they're they're changing they're that they're they're changing they're changing things in the database not yet. changing things in the database not yet. changing things in the database not yet. You want to run them through the You want to run them through the You want to run them through the ontology first and make sure that works. ontology first and make sure that works. ontology first and make sure that works. Okay. Okay. Okay. I only got an I've got I've got another I only got an I've got I've got another I only got an I've got I've got another I've just a short time. I'm going to try I've just a short time. I'm going to try I've just a short time. I'm going to try to show you some of the things that um to show you some of the things that um to show you some of the things that um that you can that you can that you can some logical constructs from from some logical constructs from from some logical constructs from from something called OWL, the uh something called OWL, the uh something called OWL, the uh the web object language for for objects. the web object language for for objects. the web object language for for objects. So, you have these functional So, you have these functional So, you have these functional properties, disjoint properties. I'll properties, disjoint properties. I'll properties, disjoint properties. I'll just put these you can look at the just put these you can look at the just put these you can look at the slides, but essentially the errors it slides, but essentially the errors it slides, but essentially the errors it can catch. Look over in the the can catch. Look over in the the can catch. Look over in the the right-hand column. A second refund on right-hand column. A second refund on right-hand column. A second refund on the same order the same order the same order is a is is a is is a is is a problem. But ontologies could catch is a problem. But ontologies could catch is a problem. But ontologies could catch it, whereas it's it's very tricky to do it, whereas it's it's very tricky to do it, whereas it's it's very tricky to do that in in English. A payout sent to the that in in English. A payout sent to the that in in English. A payout sent to the support desk instead of the buyer. Okay? support desk instead of the buyer. Okay? support desk instead of the buyer. Okay? You can catch that with an owl disjoint You can catch that with an owl disjoint You can catch that with an owl disjoint property where customer and support rep property where customer and support rep property where customer and support rep are two separate entities. Okay?
-
are two separate entities. Okay? are two separate entities. Okay? Uh one of may a made-up value like Uh one of may a made-up value like Uh one of may a made-up value like probably shipped. You can specify probably shipped. You can specify probably shipped. You can specify you must have certain kinds of value. you must have certain kinds of value. you must have certain kinds of value. So, uh the status So, uh the status So, uh the status paid, shipped, or refunded, nothing paid, shipped, or refunded, nothing paid, shipped, or refunded, nothing else. And when you're in the pure text else. And when you're in the pure text else. And when you're in the pure text world, this can get this can get funky world, this can get this can get funky world, this can get this can get funky because the the LLMs are again because the the LLMs are again because the the LLMs are again probabilistic and probabilistic and probabilistic and um um um return some crazy stuff. Okay. Uh so, return some crazy stuff. Okay. Uh so, return some crazy stuff. Okay. Uh so, really what the point I want to make really what the point I want to make really what the point I want to make here is use these re- you can have a here is use these re- you can have a here is use these re- you can have a reasoner built on ontology to check keep reasoner built on ontology to check keep reasoner built on ontology to check keep the LLM on track, have guardrails to the LLM on track, have guardrails to the LLM on track, have guardrails to keep it honest. Okay? keep it honest. Okay? keep it honest. Okay? And for the guardrails, I'm referring to And for the guardrails, I'm referring to And for the guardrails, I'm referring to these concepts re- these support these concepts re- these support these concepts re- these support technologies with RDFS and owl. technologies with RDFS and owl. technologies with RDFS and owl. And And And my my bottom line is and nothing is a my my bottom line is and nothing is a my my bottom line is and nothing is a mistake, there's no win, no fail, only a mistake, there's no win, no fail, only a mistake, there's no win, no fail, only a make.
-
make. make. Okay. Feel free to reach out to me Okay. Feel free to reach out to me Okay. Feel free to reach out to me coil@burkly. coil@burkly. coil@burkly. I've got a I've got a I've got a I've got a I've got a I've got a I've got a little website I've got a little website I've got a little website codesupreme.ai. I'm a big fan of if codesupreme.ai. I'm a big fan of if codesupreme.ai. I'm a big fan of if you're John Coltrane has a has a some you're John Coltrane has a has a some you're John Coltrane has a has a some jazz called uh jazz called uh jazz called uh called Love Supreme. So, I've named my called Love Supreme. So, I've named my called Love Supreme. So, I've named my site site site Code Supreme. And if you go there, I've Code Supreme. And if you go there, I've Code Supreme. And if you go there, I've got some music and it's all good. Okay. got some music and it's all good. Okay. got some music and it's all good. Okay. Thanks very much. 20 minutes. Thanks very much. 20 minutes. Thanks very much. 20 minutes. >> [applause]
Summary
The main theme is how to leverage AI agents and ontologies in a rapidly changing computer science landscape, moving beyond traditional education. Key references include Sister Corita Kent's philosophy that "Nothing is a mistake. There's only make," emphasizing hands-on creation over passive learning. The practical takeaway is to engage senses and actively create, as this is the most effective way to learn and adapt in the age of AI.