Auto Ontology

A semantic layer that lets data agents write SQL you can trace back to certified definitions

Auto Ontology is a Python framework for building semantic, graph-based reasoning layers over data. It enables deterministic query generation, better context retrieval, and more explainable AI for LLM and agent workflows.

Category
Data & databases
Audience
Data & ML
Language
Python
Licence
Apache-2.0

Updated

Auto Ontology is an open-source Python framework from NVIDIA for building a semantic, graph-based context layer over enterprise data, so an agent can turn a plain English question into SQL written in your organization's own vocabulary. It is for data and analytics engineers who own a warehouse full of tables and have been asked to put an agent in front of it, and for developers building agent harnesses that need to know where data lives and what it means.

What it does

The README's framing is blunt: a revenue metric answered faster is worth nothing if the number is wrong. Agents can already retrieve documents and query databases, but they have no shared idea of what "revenue" or "product" means in a given company, and different systems define those terms differently.

Auto Ontology builds that missing layer out of metadata you already have. The project groups its work into five jobs:

  • Discover: generate an ontology from enterprise metadata, and connect ontologies and semantic models you already run.
  • Ground: give agents one trusted business meaning for metrics, entities and relationships, reconciling definitions that conflict across systems.
  • Validate: check generated queries against certified definitions and lineage, and return provenance with every answer.
  • Expose: serve that context to any agent harness over MCP, a CLI or an API.
  • Learn: fold certified corrections and real usage back into the ontology.

The capability in practice is natural-language querying of structured data, with the generated SQL handed back rather than hidden.

How it works

You point it at your metadata and it produces a knowledge graph of entities, metrics and relationships. When a question arrives, it resolves terms like revenue, product and state to the ontology's own terms before writing any SQL, which is what the project means by deterministic query generation rather than a guess made from table names. The answer comes back with the SQL and the steps that produced it, so you can re-run the query against the real source and see where each number came from.

Because the layer is served through MCP as well as a CLI and an API, it slots into an agent framework you already use instead of replacing it, and NVIDIA positions it as a complement to a semantic model you maintain rather than a competitor to it.

One note on numbers: this repository publishes no accuracy claim at all. For text-to-SQL evaluation it points at a separate NVIDIA repository, ontology-sql-eval, where you can run benchmarks such as BIRD yourself. The roughly 9,900 stars are a measure of interest, not of correctness.

Getting started

The code lives at github.com/NVIDIA/auto-ontology under Apache 2.0, so a plain clone is the starting point and there are no release builds to hunt down. To run it as the video shows, you need two things: an NVIDIA API key and Docker.

The API key is the part that costs money. The framework itself is free, but the model doing the question-to-SQL work is a hosted NVIDIA service you authenticate against, and nothing in these materials describes a local-model path, so plan for API usage rather than a self-contained install. Beyond Docker, the project does not list operating system, GPU, memory or VRAM requirements, so treat your own environment as unverified until you try it. Bundled third-party components are listed in THIRD_PARTY_NOTICES.md.

One more thing to know before you fork it: the repository states that it is currently not accepting external contributions.

When to use it / when not

Use it instead of simply asking Claude or ChatGPT to write SQL against a pasted schema when the schema is large, the definitions are contested, and somebody downstream will act on the number. That is what the validation and provenance steps buy you: an auditable trail instead of a plausible-looking query.

Don't use it if your data is a handful of tables that one person already understands, where an ontology layer is maintenance work you will do for no gain. Don't use it either if you cannot route metadata and questions through NVIDIA's hosted models, or if you need a dependency you can patch upstream, because outside contributions are closed and the project is new: it was created in April 2026 and has been pushed to through November 2026.

Data teams being pushed toward agentic analytics should take this one seriously, because it names the real failure of that pattern, confident wrong answers, and attacks it with reconciled definitions, lineage and returned SQL instead of better prompting. It is young, closed to outside patches and tied to an NVIDIA API key, which makes it a better fit for a team evaluating a semantic layer for agents than for a weekend experiment. If you maintain the warehouse that everyone else's agents are about to query, it is worth reading closely even if you end up building the layer yourself.

More in Data & databases

All of Data & databases →