Toward Effective and Reliable LLM Agents via Dynamic Ontology
The paper introduces OaK, a framework that dynamically constructs and refines task-oriented ontologies to explicitly ground knowledge and relations, thereby enhancing the evidence utilization and reliability of multi-step reasoning in large language model agents.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
In the rapidly evolving world of artificial intelligence, a specific type of software known as a "large language model" has emerged as a powerful tool for understanding and generating human language. These models are often used to build "agents," which are programs designed not just to chat, but to perform complex tasks by breaking them down into smaller steps, such as searching for information, using digital tools, and making decisions based on what they find. However, as these agents attempt longer and more complicated jobs, they often struggle. They can lose track of the facts they need, make logical leaps that don't hold up, or get stuck in loops of error because they rely too heavily on the vast, unstructured knowledge stored inside their own memory. To solve this, researchers are exploring ways to give these agents a clearer, more organized map of the world they are navigating, ensuring that every step they take is grounded in reliable evidence rather than guesswork.
A team of researchers at Nanjing University and other institutions has developed a new framework called OaK to address these reliability issues. Their work focuses on a concept called an "ontology," which is essentially a structured dictionary of concepts and the relationships between them, written in a way that computers can strictly interpret. While traditional methods for creating these structures require experts to manually define every rule—a slow and difficult process—the new system automates the creation of these maps specifically for the task at hand. The researchers found that by building a custom, dynamic structure for each job, they could significantly improve how well an agent plans and executes multi-step tasks, making the process more transparent and less prone to failure.
The core of the OaK system is a two-stage process that happens before the agent ever attempts a real-world task. First, the system looks at a set of training examples and the specific requirements of a job, such as planning a trip or managing customer data. It then automatically drafts a schema, which is a blueprint defining the important types of information involved, like "hotels," "flights," or "budgets," and how they connect. This blueprint is not just a list; it is rigorously checked by a logical reasoner to ensure there are no contradictions or missing rules. If the blueprint is flawed, the system fixes it before moving on. Once the blueprint is solid, the system builds a knowledge graph, a network of actual data points pulled from the training materials, organized exactly according to the rules of the blueprint.
With this structured foundation in place, the system creates a set of specialized tools, or functions, that the agent can use. Instead of asking the agent to figure out how to search for a flight, filter by price, and check availability all by itself, the system provides pre-built tools that perform these specific actions correctly. The agent then uses these tools to solve problems, guided by the strict rules of the blueprint. If the agent makes a mistake or the task fails, a "judge" model reviews the entire process, identifies exactly where the blueprint or the tools went wrong, and suggests improvements. This cycle of building, testing, and refining repeats several times until the system is robust enough to handle unseen questions. The result is a "kernel," a frozen, reliable interface that the agent uses to interact with data, ensuring that every decision is backed by evidence and that the agent cannot accidentally invent facts or ignore constraints.
The researchers tested this approach on three very different types of challenges to see if it held up in the real world. The first was a travel planning task where an agent had to arrange flights, hotels, meals, and activities while adhering to strict budget and schedule constraints. The second involved managing customer relationships in a business setting, requiring the agent to follow complex company policies and retrieve specific records. The third tested the ability to combine information from various external sources, like flight databases and restaurant reviews, to answer detailed questions. In every case, the OaK system outperformed standard methods. On the travel planning task, for instance, the system improved the success rate of completing a full, valid itinerary from roughly 15 percent to nearly 56 percent when using one of the base models, and from about 4 percent to nearly 20 percent with another. It also showed significant gains in the business and data tasks, particularly in scenarios where the agent needed to follow strict rules or combine data from multiple tables.
The study also revealed why these improvements happened. When the researchers removed the custom-built tools or stopped the system from refining its blueprint over multiple rounds, performance dropped sharply. This indicated that simply giving the agent access to data was not enough; the agent needed the structured rules and the pre-packaged tools to coordinate its actions effectively. The system worked by making the agent's reasoning process visible and constrained, preventing it from wandering off into unsupported assumptions. While the new method required slightly more time to run and produced more output text than some simpler approaches, it used fewer input tokens, suggesting that the structured interface made the agent more efficient at processing the information it needed. The researchers concluded that by turning domain knowledge into an executable, self-correcting interface, they could make artificial intelligence agents more reliable, trustworthy, and capable of handling the complex, multi-step reasoning required in real-world applications.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.