NVIDIA Open-Sources Auto Ontology: Before AI Writes SQL, It Needs a Business Primer
LLMs can write syntactically correct SQL, but they often get “revenue” wrong. NVIDIA’s open-source Auto Ontology uses automatically constructed semantic graphs to give agents business context. It is Apache-2.0, and a tweet says the repo has already surpassed 15,000 stars. What problem does it solve, how do you use it, and where are its boundaries? Let’s break it down below.
NVIDIA has open-sourced Auto Ontology on GitHub under Apache-2.0, and a tweet says the repo has already surpassed 15,000 stars. It addresses a specific problem: databases contain hundreds of tables, multiple definitions of revenue, and complex joins; an LLM can generate valid SQL, but the numbers may still be wrong.
Why is it wrong? A traditional schema only tells the AI table names, column names, and types; it does not tell it which definition “revenue” corresponds to, which field to use, or which join path to take. When asked “What was revenue last quarter?”, an agent may pick the wrong column, miss a status filter, or mix revenue from different business lines. Syntax checks will not report an error, and the result is quietly wrong.
NVIDIA’s approach is to automatically build a semantic knowledge graph from enterprise metadata. It links business concepts to actual table columns and puts together relationships, valid join paths, metrics and reusable SQL calculations, synonym lineage for definitions, and human-reviewed definitions. When an agent receives a question, it first retrieves business context and then generates SQL. When returning an answer, it also includes the SQL and execution steps, making it easier for developers to trace where the result came from.
The repository README lists six types of elements: concepts, mappings, relationships, metrics, lineage, and certification. The semantic layer is not a new concept; dbt, Cube, and AtScale have all done similar things. What makes Auto Ontology different is automatic generation and agent consumption: it generates a draft from metadata, humans review it, and finally it exposes the definitions through MCP, CLI, and API so different agents share the same set of definitions. It is compatible with Apache Ossie and can import and export semantic models. The repo badges show that it ranks first on two text-to-SQL leaderboards, BIRD-Interact and BEAVER.

The quick start in the README uses Docker Compose to run Microsoft’s sample database Wide World Importers. Ask “What was the revenue for USB food flash drive - sushi roll in Pennsylvania in June 2015?”, and the agent first resolves the terms revenue, product, and state in the ontology, then follows relationships to find the join and executes SQL. The answer is $588.80, coming from 3 invoice lines. The response includes the SQL and steps. This example is not complex, but it shows the design focus: answers must be verifiable.

There is another example worth looking at: asking about return on ad spend. Wide World Importers has no advertising data. Through MCP’s check_answerable, the agent finds a coverage score of 0.5; no term covers ad spend. So it says it cannot find advertising spend and asks the user whether to instead ask about June 2015 revenue or connect another data source. This behavior is closer to a production environment than hardcoding a SQL query: first determine whether the question can be answered, then decide how to answer it.
For developers, Auto Ontology provides an MCP server, CLI, and REST API. MCP tools include search_terms, get_term, check_answerable, ask_question, and others; Cursor and Claude Desktop can connect to it. The REST API uses POST /api/chat/completions and returns an SSE stream. Deployment consists of a web app, a backend text-to-SQL agent, an ingestion service, an MCP server, and Postgres with pgvector. It supports 11 sources, including PostgreSQL, MySQL, Snowflake, BigQuery, Databricks, ClickHouse, Trino, DuckDB, and SQLite. Model roles are divided into reasoning, non-reasoning, embed, and rerank; by default it uses NVIDIA NIM, but you can also switch to an OpenAI-compatible endpoint.
The boundaries should also be made clear. The README itself says: if you have only one well-modeled data source and a fixed set of questions, writing SQL directly may be enough. An ontology is more valuable when questions are open-ended, there are many data sources, definitions conflict, and cross-team reuse and governance are needed. It is also not a fully automatic truth machine; the draft must be reviewed by humans, and only certified definitions will be reused. There is also data security: MCP is a read-only tool and follows user permissions; KumoRFM predictions are an optional hosted service, and enabling them uploads table data, so a data review must be done first.
Back to the question at the beginning. When AI agents do data analysis, what they often lack is not SQL syntax but business common sense. Auto Ontology turns this common sense into a searchable, reviewable, reusable graph, so agents can consult the dictionary before writing queries. This direction is not new, but NVIDIA has open-sourced it under Apache-2.0 and included a quickstart that actually runs, giving teams at least a starting point they can try. Repository: https://github.com/NVIDIA/auto-ontology
发布时间: 2026-11-28 05:28