Explores dynamic ontology generation for reliable AI, reducing energy use and improving task-specific LLM agent reasoning.
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
- Dynamic ontology generation automates and scales ontology construction for AI tasks.
- Task-specific ontologies combined with knowledge graphs enable more effective AI reasoning.
- Iterative refinement with an external AI judge improves ontology quality and task performance.
- This approach can reduce computational resources and energy consumption in AI systems.
- The prototype shows promising results but is still in early development stages.
What the video covers
- The video introduces a new approach to building dynamic, task-specific ontologies to improve AI reliability and efficiency.
- It highlights recent research from Nanjing University on ontology as a coronal framework for LLM agents.
- Traditional ontology construction requires extensive human effort and is hard to scale; this new method automates the process.
- The framework combines schema creation, knowledge graph construction, typed reasoning functions, and iterative self-learning.
- An external AI judge evaluates and refines the ontology in a feedback loop to improve task performance.
- A practical example is given: planning a three-day vegetarian trip to the US under a budget using the ontology framework.
- Mathematical foundations of the ontology kernel are explained, involving schema (S), reasoning functions (F), and knowledge graph (G).
- The system uses multiple LLMs for schema drafting, function compilation, and iterative training with a limited number of refinement rounds.
- Benchmark tests show the prototype outperforms existing methods in multi-step planning and workflow execution tasks.
- The video emphasizes the potential of dynamic ontology generation to reduce reliance on large data centers by making AI more intelligent and efficient.
Chapters
- 00:00Introduction and Motivation for Ontology in AI
- 01:04Overview of New Research from Nanjing University
- 02:08Challenges of Traditional Ontology Construction
- 03:24Dynamic Ontology Framework and Feedback Loop
- 04:12Self-learning and Iterative Refinement Process
- 05:30Example: Planning a Trip Using Ontology
- 06:34Executable Functions on Knowledge Graphs
- 07:31Mathematical Foundations of Ontology Kernel
- 09:39Schema Drafting and Ontology Standards
- 09:51Compiling Reasoning Functions and Training
Full Transcript — Download SRT & Markdown
Speaker A
Hello community, so great that you're back. Now, you might say, "Are you crazy? We're going to build a complete ontology now?" Absolutely. Because I think starting today, I have a single goal. I think here, look at my... Just look at this
Speaker A
data center here in Toronto, you know? And my goal is, hey, can we make AI a little bit more intelligent so we need less of those data centers that have the extreme energy consumption, water consumption, and and and
Speaker A
that are completely automated here. And just, yeah, what about we just reduce the amount of those things? So, let's start on the technology. Remember my last video? My last video, we talked about graph engineering and I showed you
Speaker A
that some of the other institutions here in Asia and also the USA that the next big thing in AI is ontology engineering.
Speaker A
And I told you in my last video, I do disagree. But anyway, let's have a look. We have a brand new study. This is here August 24, 2026. Towards efficient and reliable LLM agent. You might say, "Yippee!" Yeah,
Speaker A
absolutely. Via dynamic ontology generation and implementation. So, here we have brand new research here from Nanjing University in China, Nanjing University of Science and Information Science and Technology. And yes, absolutely, you got it here. And they say, "You know what? We present now a
Speaker A
new ontology as a coronal framework that dynamically construct and refines task-oriented ontology for LLM agent." And you might say, "Unbelievable.
Speaker A
Are we here with Alice in the Wonderland? Is this possible?" Absolutely, a beautiful paper.
Speaker A
Now, you remember ontology offer here kind of a way to externalize domain concepts and particular the relation within this particular domain as some machine interoperable structure. But constructing now the task usable ontology is traditionally required here massive human effort from domain expert
Speaker A
and is absolutely difficult to scale because it is not a trivial exercise, no? Automatic construction of ontology is now complete challenging new topic in AI no?
Speaker A
An ontology that appears semantically plausible may however not contain the relational structure needed for actual decision making in our system. So, we can build a beautiful semantically absolutely correct new ontology, but this new ontology is absolutely worthless if we put it into working here
Speaker A
within an AI genetic system. Because it is not here for the specific task for my specific query that I need here a particular decision here done by the AI and this will not help it.
Speaker A
So, therefore, this new paper is absolutely fascinating. What a coincidence that just on the very next day we have here paper on dynamic ontology generation. So, we have here this methodology and I will show you the simple introduction and a little bit of
Speaker A
a mathematical introduction to this to this instrument here. So, we have AOK. This is here an ontology as a coronal construct, a coronal framework in AI. So, this constructs now an ontology and and now hold on to your socks because now it
Speaker A
also builds a knowledge graph. So, plus it's not done yet. It generates also task adaptation functions for the graph reasoning.
Speaker A
And then it just uses here an AI judge here for some feedback and the iterative refinement in a loop.
Speaker A
And you might say, "Unbelievable, what is happening? It's Christmas." Absolutely, we do have Christmas today, so let's start.
Speaker A
Now, the main idea of the paper is sweet connected objects, no? So, at first we have need for we have for the ontology a schema, a schema describing which kind of things and which kind of relation exist between those things.
Speaker A
And then second, we have to build here a reduced complexity here of a search space, the knowledge graph. And the knowledge graph containing here the actual domain facts.
Speaker A
And then, on this, we need a set of typed function defining now for us how the agent might reason over those particular facts in the knowledge graph.
Speaker A
Easy. And then, the system is self-learning. We are looping. So, whenever it fails here on a first training task, another LLM diagnoses what the problem is, where does it lie, in the schema or the function, whatever. And this external
Speaker A
AI, hopefully it is intelligent enough and you pay enough to Anthropic that it will be able to repair this particular ontology. And after several optimization rounds, the ontology is now hopefully above a particular threshold level. So, then we can freeze this particular
Speaker A
ontology and use it for unseen, hopefully real similar queries. So, coming back to my last video, you see we are doing here looping and graphing together. So, therefore, another example where just to define loop and just to exclose graph into
Speaker A
multi-agent system is a beautiful example. If you want to see it here, great, but we just jump into an example. But in general, the ontology construction and the workflow construction, we have here the schema for the ontology, beautiful.
Speaker A
We'll show you how to do this. Then we have here if you want to put a workflow that instantiation here, the knowledge reasoning that is happening, and then of course, a self-learning cycle.
Speaker A
Let's start with a simple example. The job is plan a three-day trip to US with or below 1,200 euro with vegetarian restaurants only.
Speaker A
So, the LLM first creates a schema containing now types such as task-specific relevant items like city, flight hotel restaurant attraction whatsoever.
Speaker A
You got it. Plus the LLM create now properties and typed relation. So the properties have flight arrives in a particular city and the restaurant is located in a particular city and you got it. Now this is our typical ontology structure.
Speaker A
And then the knowledge graph. And the knowledge graph then contains here the actual instances. So flight number F47 from whatever arrives in New York and then over there the restaurant and whatever you call it serves here the vegetarian plate that I'm looking for.
Speaker A
Great. So we build a knowledge graph here for particular actual instances on this particular date, on this particular location and you got the idea.
Speaker A
And then this is the beauty here. Also it constructs now executable function on the knowledge graph that are allowed in the complexity of the domain itself. So for example this function might be get transportation candidates or get to
Speaker A
restaurant candidates or estimate the cost here of this particular type or whatever. So you see simple idea.
Speaker A
Okay, this was the simple introduction. You see everything is absolutely clear to me. Now please let's go to the mathematics.
Speaker A
So glad that you asked. So ontology as a kernel framework. The kernel K is simply here a function of S and F. S is here the task specific schema that we're going to develop for a task specific very specific complexity
Speaker A
and F is here simply here a function a typed reasoning function and this is here a catalog of type reasoning function here for a complexity. Plus of course we have a knowledge graph G for the graph or the intelligent solution
Speaker A
and this is the evidence structure that we need and that is instantiated under S here the task specific schema.
Speaker A
So let's start. Let's generate and then let's hopefully verify the schema S. So, an LLM analyzes now and you will see we have two different LLMs here analyzes here my task description, my query, and some sample training example. Of course,
Speaker A
somehow we have to train the machine on this new job, so beautiful. So, analyze here the task description and some training examples, great. And then with this draft now lightweight schema.
Speaker A
Schema S, unbelievable, I know. Draft, great. And this schema now specifies entity types, properties, primary keys, and typed relation. This is the classical ontology generation that you already know. If you're not familiar here the University of Oxford, I found it always
Speaker A
beautiful here data knowledge group Department of Computer Science here Hermit OWL reasoner web ontology language here if whenever I have a problem ontology, I found it here University of Oxford here.
Speaker A
So, it is standard what we just built here, the schema here the draft sch
Speaker A
invalid restriction, inconsistent properties, global inconsistencies, and you got the idea. Now, the next step. The next step is we have to build a knowledge graph and you might say, "Yes, finally." So, the corpus is divided into manageable chunks
Speaker A
and you say, "Oh my This can create another complexity down the road, but not yet. In this video, we make it simple and easy. So, LLM extracts here a schema constrained entity structure and all the relation from a particular chunk of
Speaker A
text or documents or whatever you have, great. And then the entities extracted from the different chunks are merged using here the primary key declared here in your particular schema.
Speaker A
And thus the schema determines what the graph is allowed to contain while the graph supplies now the actual evidence for the particular job, for the particular task.
Speaker A
And then we come to see compile the type reasoning function. Now gets interesting because now this is really what we need for the coding, yeah?
Speaker A
And now a composer LLM turns the recurring reasoning patterns that we detect now into some domains specific mathematical functions.
Speaker A
You may say great. So, functions F compose and here we have here a generic operator library containing here all the operation that you need for the classical lookup, entity lookup, categorical and numerical filtering, relational traversal, property projection, aggregation, everything that
Speaker A
you are familiar with from ontology build-up. And then as I told you, we are looping.
Speaker A
So, this means we can evaluate something, we can learn what's worked, what was not working, and we can start to repair it.
Speaker A
So, we have a react agent solves here, yes, beautiful and you have a particular metric that's course now here and then you have an external judge LLM.
Speaker A
And this the job of the judge LLM is simple to examine here the schema, the knowledge graph, is it the right knowledge graph, is the complexity okay, are the edges and everything constructed beautifully, the generated functions on this knowledge graph, the execution
Speaker A
trajectory, and the task score. If we have this, this judge then proposes here repairs because sometimes it is not working at a very first run.
Speaker A
So, you have now structured repairs. So, this means we can now update the artifact U, a particular action A, a proposed patch delta, or some diagnosed reasoning row.
Speaker A
And with these new repairs that the AI is doing, the loop simply repeats with the fresh training samples.
Speaker A
Into orders restrict them self to almost to at most five rounds. Beautiful. Now if we have done the training, if we have loops for everything, now it is time to say okay, now we can freeze here our kernel framework.
Speaker A
That's frozen and then if or each unseen query this new methodology builds a new graph because if it's unseen query do not have here, you remember, this is a task specific exercise. We do not have the knowledge so we build new graphs from
Speaker A
its associated corpus and the agent invokes only the function that are permitted here by our particular functions.
Speaker A
So what we have if you think about it is something, guess what? It's a loop in with a graph structure.
Speaker A
A downstream task driven ontology. And this is a beautiful compilation of you have the task requirements, then you try to find a verified schema by the LLM. You have a schema guided knowledge graph creation that is specific for the
Speaker A
query. On this knowledge graph you have now you define now with another LLM a type executable functions for your particular task. You have a feedback from the task during the learning, during the training, during the construction of this complexity. You have a score and
Speaker A
this score gives a judge LLM indication what to repair on this ontology and guess what?
Speaker A
And then everything starts all over again and we're in a loop here with a knowledge graph.
Speaker A
So if you read it careful, if I read here dynamic ontology, I thought it's completely dynamic. No, there is a time when we freeze this ontology and specially it is frozen for of course the test time interference. Everything
Speaker A
before the training construction, it is dynamic. Absolutely, we have to do the learning, but then comes the time where we say okay, we have now the necessary learning done and now out in the battlefield.
Speaker A
Of course you want to know is this working? Is this really providing some good results? So, the authors decided to choose three particular benchmark. They call the complementary agent settings, multi-step planning, CRM workflow execution, tool use overhead with
Speaker A
generous corpora. Beautiful. So, there is a particular benchmark is called travel planner for common sense and hard constraints measures. If you're familiar, great. Another benchmark, another benchmark, great. So, let's have a look at this result. Yeah, models.
Speaker A
They were running this on some old-fashioned LLMs. And okay. So, I mean a GPT-4 Omni Mini at the end of August 2026 is almost criminal.
Speaker A
But okay. Everything else is also on this. So, this is a a comparison here of methods and not of LLMs. And of course, they are at least a DeepSeek version 4 Flash.
Speaker A
So, we have our steps requirement analysis, schema drafting, the knowledge graph instantiation, and then step three, the function composition and the knowledge reasoning happening here.
Speaker A
Plus, we do have of course our you remember the external judge. The ontology evaluator here is a Claude Sonnet 4.6. Yes, I know it is not Fable 5, but okay. Let's go for a comparison because all the results are done with
Speaker A
this particular LLM backbone configuration. Now, for the travel planner, you see here for both models, DeepSeek and GPT-4 Omni Mini, that our new methodology has Yeah, it's it's it's okay. It's outperforming sometimes here. Uh GPT is even better. It's 1 2 3 4 5, four out of
Speaker A
five times it is outperforming. If we go here for a particular arena pro, you see Oh, wow. Yeah, this is really working nice. Look for the GPT-4 Mini, it is really outperforming everything else. And I mean, just look
Speaker A
compare this with a react agent for the workflow for the policy. We go from 27.5 to 83. So, yeah, this is nice. Remember A flow from one of my last videos? 66 and now we jump to 83.
Speaker A
We made AI much more intelligent. So, maybe we need less data center to be built on our beautiful planet. So, let's cross the finger we found a methodology that we can implement for more intelligent agentic system. And the third benchmark tool, Q&A, you see
Speaker A
outperforms everything, outperforms almost everything. So, yeah, there is something to it. Of course, this is just the first prototype. So, it is not perfect, but I think it is a beautiful indication because now we build automatically top ontologies for task-specific
Speaker A
exercises for queries that I define. We don't have to build beforehand a complete ontology for theoretical physics or whatever, but they are built here particular with a training for my job.
Speaker A
What is really interesting is the loop progress here on these three benchmarks. And you have these three colors and three benchmarks. And you see more or less, this is nice, no? So, we have here the metric here an improvement here in
Speaker A
the performance. But then you see, hm, at about four iteration round or five iteration round, we reach a plateau.
Speaker A
But anyway, the beginning shows us beautiful. We have a rapid improvement during the early rounds. And this indicates that the judge-guided updates quickly fix here the missing constraints and the graph mapping defects while closing here the function level gaps.
Speaker A
But then at a particular iteration round four or five, yeah, this is here almost capturing all of the benefits of this iterative refinement. And remember, this is just the prototype. This is just the first step.
Speaker A
So, take a step back, look at the paper, and yes, be amazed because I think this is nice.
Speaker A
So, this new ontology as a coronal framework learns a reusable ontology and a function catalog for a very specific task domain and normally instantiate a fresh evidence graph for each unseen query from that query a companion corpus.
Speaker A
So, you can say if you want here, in simple terms, that this particular ontology building defines here the space of permissible sorts. While the graph supplies the evidence inside this particular space.
Speaker A
Or if you wanted a little bit more on the mathematical side, the knowledge graph tells the AI what evident currently exists. And please underline currently.
Speaker A
The ontology tells it what kind of things are allowed to exist. And the function determine what the AI may compute from them on this knowledge graph, on this reduced complexity.
Speaker A
So, nice. But remember, this is also, as I showed you in my last video, a restriction. A restriction regarding learning because it exposes also here again the next frontier. A frozen ontology makes any AI more reliable by restricting it. Yes, absolutely. But you
Speaker A
are restricting it to its conceptual world. So, yeah, for known task and for unknown unknowns, as I have shown you in my last video, this is working. But you know, the very moment you want to use AI for discovery, for a scientific task or
Speaker A
pure science development whatever is an unknown, you cannot build here a knowledge graph on.
Speaker A
So, it works for known unknowns beautifully, great. But the very moment you start to drift into this genuine scientific intelligence, the system recognizes that this world is incomplete, think about Gödel, and that the missing answer cannot be represented
Speaker A
by its existing concepts in a knowledge graph or in an ontology that is fixed.
Speaker A
So, therefore, this is not the way to jump ahead here in the scientific development for performing experiments for some unknown worlds. So, this is doing here again a restriction of our crazy hallucinating LLM at the core. So, this is beautiful since we have here
Speaker A
kind of a deterministic honest structure here. We provide here the ontology. So, in a way this is necessary here to have a grip, a strong grip, on the hallucination of the LLM. But, careful, the balance here for a scientific
Speaker A
discovery act is not really here coherent with this particular architecture. And, if you're interested, so, how do we do it for some If you want to go for some crazy new scientific stuff, well, it will be a complete
Speaker A
different pathway. But, more about this in one of my next videos.
Topics:ontology engineeringdynamic ontologyknowledge graphLLM agentAI reasoningself-learning AItask-specific ontologyiterative refinementenergy efficient AINanjing University research











