Back to blog

Why Agentic AI Needs Ontologies?

2026-08-23

Why Agentic AI Needs Ontologies: A Blueprint for Reliable Enterprise Systems

The shift from simple Large Language Model (LLM) wrappers to autonomous Agentic systems is rapidly reshaping how we approach software and data architecture. But while LLMs are incredibly powerful, they are inherently probabilistic. For those of us architecting data platforms and business intelligence applications, probabilistic outputs aren't enough, we need deterministic guardrails.

So we explore on how to bridge the gap between probabilistic AI agents and structured business logic. Here is a look at why this convergence is critical and how we can implement it.

The Return of Symbolic AI

In the early days of AI, expert systems—or Symbolic AI—ruled the landscape. They were rule-based and highly structured but ultimately failed to scale. Today, neural networks have solved the scaling problem, but they lack the structural boundaries of expert systems.

This brings us to Neuro-Symbolic AI. By integrating neural networks (LLMs) with symbolic logic (knowledge graphs and ontologies), we can keep agents on the rails. As Coyle points out, hallucination isn't a bug in LLMs; it's a feature of probabilistic models. Ontologies provide the necessary framework to ground those models in reality.

Building the Ontology

At its core, an ontology is a formal representation of entities, their properties, and their relationships to one another.

For data engineering teams used to relational databases, schema changes can be rigid and painful. Graph databases and ontologies offer a much more flexible, bottom-up or top-down modeling approach. Best of all, you don't have to start from scratch. We can leverage existing taxonomies that have been refined over the last two decades, such as Schema.org, FOAF, and DBpedia.

Implementing Guardrails with OWL

Where ontologies truly shine for agentic systems is in applying constraints using technologies like OWL (Web Ontology Language). When an agent makes a decision, we can validate it against logical rules:

  • Transitive Properties: If A is an ancestor of B, and B is an ancestor of C, then A is an ancestor of C.
  • Functional Properties: Constraints that dictate a strict 1:1 relationship (e.g., an individual can only have one biological father).
  • Disjoint Properties: Ensuring mutually exclusive categories. For example, if "Customer" and "Support Rep" are disjoint, the system can block an agent from accidentally sending a refund payout to an internal support desk instead of the buyer.

Controlling the Agent Loop

Agents cross the threshold into being "Turing complete" when we introduce loops (sequence, conditionals, iteration). However, loops in agentic systems carry high risks: they can drift, break, or rapidly burn through token budgets.

When an LLM agent uses a tool, it doesn't actually execute the code. It merely predicts the tool to use and generates the parameters. As engineers, we must surround these inputs and outputs with strict validation:

  1. Pydantic at the door: Use typing frameworks like Pydantic to ensure the LLM's payload matches expected data types before processing.
  2. Ontology at the ledger: Run the output through your knowledge graph's logic constraints to ensure it violates no business rules.
  3. Pure Agents: Ensure your agents have no side effects during the reasoning phase. Only execute database changes once the ontology validation passes.

Conclusion

As we navigate this transition toward AI agents in the BI and data engineering space, the best way forward is to get hands-on. Map out your domain's ontology, experiment with tool-use loops, and start engineering the guardrails that will safely bring Agentic AI into production.

*** Reference: [Why Agentic Systems Need Ontologies - A session from Frank Coyle, UC Berkeley at the AI Engineer Summit]