# NVIDIA Auto Ontology Hands-On: Fixing Wrong AI SQL Answers

> Source: <https://www.mindstudio.ai/blog/nvidia-auto-ontology-hands-on/>
> Published: 2026-12-02 00:00:00+00:00

**Recommendation:** Map ambiguous business terms such as revenue to explicit SQL definitions in a reviewed ontology before letting an agent query the database, then check each generated answer against a trusted reference query.
More in the playbook "Verifying model output": <https://wpnews.pro/playbooks/output-verification>

# NVIDIA Auto Ontology Hands-On: Fixing Wrong AI SQL Answers

A hands-on test of NVIDIA's open-source Auto Ontology shows how it maps business terms to database schemas and corrects wrong AI-generated SQL.

## What is NVIDIA Auto Ontology?

Auto Ontology is an open-source tool from NVIDIA that helps AI agents answer business questions against a real database by building an ontology, a structured map of what business terms mean, where the underlying data lives, and how different tables connect. Instead of letting a language model guess at table joins and column meanings, Auto Ontology gives it a reviewed, documented layer that ties plain-English concepts like “revenue” or “state” to actual SQL logic. The idea is to stop AI agents from quietly inventing their own definitions of business metrics and instead reuse definitions a team has verified.

## TL;DR

- Auto Ontology builds a **business glossary** that links terms like revenue or customer location to specific columns and SQL rules in your database.
- In a hands-on test, an AI agent’s first answer to a revenue question was **wrong by a wide margin** because it guessed at state data and miscalculated tax handling.
- Creating a **custom SQL attribute** for revenue inside the tool’s terminology editor fixed the error, and the same question asked again returned a number matching the reference database query.
- A second, more complex ranking question (top-selling products in 2015) came back **correct on the first try** , without any manual correction.
- The tool ships with an **exploration view** showing business terms, data objects, and table relationships, plus a catalog for drilling into schema details.
- **Installation is rough** : the commands in NVIDIA’s GitHub repo reportedly don’t work as published, and setup plus semantic compilation can take roughly half an hour even after fixes.
- A single successful retest is not proof the tool is always reliable. Every AI-generated SQL answer still needs a human check against a trusted query.

### Build a purchase approval app for 2,000 store managers

One prompt. Roles, audit trail and SSO come built in.

## How does Auto Ontology actually work?

Auto Ontology sits between a natural-language question and your database. When a user asks something like “what was June 2015 revenue in Pennsylvania,” the tool doesn’t just hand the question to a language model and hope it writes correct SQL. It first consults an ontology, a layer of business terminology that maps concepts (revenue, invoice line, customer state) to actual schema elements (tables, columns, calculated fields).

That ontology isn’t static. Auto Ontology generates a first draft of terminology automatically by inspecting the database, but that draft is explicitly meant to be reviewed by a human. In the hands-on test, the tool’s initial draft didn’t define revenue in a way that matched the business’s actual rule (which includes tax and counts specific invoice lines). The fix was to open the terminology section, create a new SQL attribute named “revenue,” write the correct SQL definition, and save it. From that point on, any new chat session calling for “revenue” used the corrected logic instead of the agent’s prior guess.

This matters because the underlying problem isn’t that the language model is bad at writing SQL. It’s that “revenue” meant something specific to this business (tax included, specific invoice line calculations) and the model had no way to know that until someone told it, once, in a reusable place.

## Why did the first answer come out wrong?

In the test case, the AI agent was asked for June 2015 revenue in Pennsylvania. It returned $384. Running the equivalent query directly against the database gave $588.80, pulled from three invoice lines and including tax. The gap came from two separate issues: the agent calculated revenue without properly accounting for tax, and it guessed which customers were in Pennsylvania by inferring state from customer names rather than using actual location data like delivery city.

That second issue is a good illustration of a risk specific to AI-generated SQL: a model might find a technically-runnable query that produces a plausible-looking number, even if the logic behind it is wrong. Without a ground-truth reference query to compare against, that kind of error could go unnoticed.

After the revenue attribute was added to the ontology, the corrected answer used invoice lines, invoice dates, and customer delivery city to determine state, which is a more reliable method than name-guessing. The final number, $588, matched the direct database query.

## Does it work on more complex questions?

The second test asked which products generated the most revenue in 2015, a query that requires grouping sales by product and ranking the results, while still applying the business’s specific revenue rule. This time, no manual correction was needed. All five products in the sample dataset, along with their order and revenue totals, matched a reference query run directly against the database. The top product, described in the test as an “air cushion machine,” came out at roughly $3.82 million.

### Stop stitchingscripts.Ship one system.

One spec produces the whole app, with security and compliance included.

The SQL behind this answer again pulled from invoice lines and invoice dates, with product names derived from invoice line descriptions. That the second, harder question worked correctly on the first attempt, once the revenue term had been corrected, suggests the fix propagates: teaching the ontology one business rule can improve accuracy across multiple downstream questions that depend on that same rule.

## What other features does the tool include?

Beyond the chat interface, Auto Ontology includes a few other pieces aimed at teams who need to audit or extend the ontology rather than just query it:

- **Glossary** : a business glossary page where each term has a description, related column attributes, related terms, and any attached SQL rules. In the test, “invoice line item” had nine column attributes, four related terms, and the one revenue rule that had been manually added.
- **Exploration view** : a visual map of the ontology, showing business terms (51 in the sample database used for testing) such as customer, invoice, and stock item, with connections between them and a legend for interpreting the diagram.
- **Data objects view** : a separate visualization showing the raw database structure, in this case 48 tables and three views, with lines indicating relationships between them.
- **Catalog/data view** : a drill-down interface for inspecting schema details tied to specific business domains, plus some basic analytics on when queries were run and what reasoning the agent used.

Together these views are meant to make the ontology auditable, so a data team can see exactly which tables and columns back a given business term, rather than trusting a black box.

## Is NVIDIA Auto Ontology worth installing?

For teams that already maintain a SQL database and want AI agents to answer business questions without reinventing metric definitions every time, Auto Ontology addresses a real and common failure mode: AI agents that write plausible SQL using the wrong assumptions about what a business term means. The glossary and exploration views also give a non-technical way to audit what the agent is doing, which matters for trust.

The catch is the installation process. According to the hands-on test, the setup commands published in NVIDIA’s GitHub repository didn’t work as-is and took a few hours of troubleshooting to get right. The actual setup involves downloading the tool, applying fixes, adding an NVIDIA API key (available from build.nvidia.com), loading a sample database, running everything through Docker, and enabling “semantic compilation,” a process that itself takes around half an hour. That’s a nontrivial setup cost for anyone evaluating the tool casually.

It’s also worth being clear-eyed about reliability. One corrected answer and one correct-on-first-try answer are encouraging signs, but they come from a single test session against a sample sales database. They don’t prove the tool will always get complex business logic right. Any team adopting this should keep comparing AI-generated answers against reference queries, especially early on, rather than assuming the ontology layer eliminates the need for human verification.

## Frequently Asked Questions

### What problem does Auto Ontology solve?

It addresses the gap between how business teams define metrics (like “revenue” including tax, calculated from specific invoice lines) and how an AI agent might guess at those definitions when writing SQL on its own. Without a shared definition, the agent can produce a technically valid but business-wrong answer.

### Do I need to already have an ontology built?

### Build a credit limitreview app for800 relationshipmanagers

One prompt. Role-based access, audit trail and SSO come built in.

No. Auto Ontology generates a first draft of business terminology automatically by analyzing the connected database. That draft is a starting point and is expected to need human review and correction, as shown when a revenue calculation had to be manually fixed.

### How long does installation take?

Expect it to take a while. The published GitHub installation commands reportedly didn’t work correctly in testing and required troubleshooting. Once a working setup is in place, enabling semantic compilation on top of a loaded database takes roughly half an hour.

### Does fixing one business rule fix everything downstream?

In the test case, correcting the definition of “revenue” also improved a separate, more complex query (ranking products by 2015 revenue) that depended on the same rule, without further manual intervention. That suggests fixes can propagate, though this isn’t guaranteed across every scenario.

### Is the tool free to use?

It’s described as open source, and it uses an NVIDIA API key obtained from build.nvidia.com. Exact pricing or usage limits for the API key weren’t detailed in the walkthrough, so anyone evaluating it should check NVIDIA’s own documentation for current terms.
