Daily Dose of Data Science· @DailyDoseOfDS_ · X·· 4d ago
NVIDIA Releases Auto Ontology to Give Text-to-SQL Agents Business Semantics
Key Takeaway
NVIDIA released Auto Ontology, which drafts an ontology from database metadata for human certification so text-to-SQL agents map business terms to the right columns instead of returning wrong numbers.
Why It Matters
Certifying semantics before query generation can cut wrong-number answers in text-to-SQL, at the cost of human ontology certification and a Postgres-plus-pgvector dependency.
Technical Breakdown · Distilled from the original source
Problem addressed
- Agents can write valid SQL against a company database and still return the wrong number, because the database stores columns and the agent must guess their meaning.
- A column named extendedprice might hold revenue, and two systems in the same company can define revenue differently.
- Auto Ontology gives the agent an ontology before any query is written: a schema mapping business concepts to the columns that hold them and defining how they relate.
What the ontology holds
- Terms: business concepts such as customer, order, or revenue, with descriptions and synonyms, mapped to the exact columns that store them.
- SQL attributes: reviewed expressions like a margin or a rolling total, reused so every measure is computed the same way each time.
- Relationships: how tables join, including bridge tables, inferred from keys and the data itself.
Drafting and query flow
- It profiles columns, samples values, extracts terms table by table, and mines past query history for SQL attributes; a human certifies the result.
- Everything lands in Postgres, with embeddings in pgvector.
- At query time the agent maps the question to certified terms, follows relationships to find joins, and writes SQL; it checks filter values against real data, repairs the query if a check fails, and returns the answer with its SQL and steps.
- When the data can't support a question, the agent says so; in NVIDIA's demo, a question about return on ad spend on a sales database with no ad data gets a clarifying reply offering revenue instead of an invented number.
Architecture and availability
- An ingestion service compiles the ontology from source databases, and any agent harness reaches it through MCP, CLI, or REST API.
- It supports eleven engines including Postgres, Snowflake, Databricks, and DuckDB.
- It runs on Nemotron by default or any OpenAI-compatible endpoint, and is Apache 2.0 on GitHub.
Source: Daily Dose of Data Science (@DailyDoseOfDS_)· x.com
PG Radar summarizes verified changes and impact. Read the original post for full technical details and code samples.