Skip to content

Checking your reading list…

Retry

Stay curious. Build better.

Appearance

Choose how BestHub looks on this device.

Changes apply immediately.

Search articles

Open Discover with these filters

Suggested searches

NVIDIA Open-Sources Auto Ontology: Auto-Generate Ontologies for Agents

NVIDIA's Auto Ontology automatically generates ontologies from enterprise metadata, exposing them to agents via MCP, CLI, and API, achieving top scores on text-to-SQL benchmarks through a two-phase generation and answering pipeline with semantic search, SQL validation, and iterative correction.

Overview

NVIDIA has open-sourced Auto Ontology , a system that automatically generates an ontology from enterprise metadata and exposes it to agents via MCP, CLI, and API. The ontology answers six core questions: what business concepts mean, which tables they reside in, how they join, how they are calculated, their data lineage, and their trustworthiness.

Benchmark Performance

Auto Ontology ranks first on the BIRD-Interact and BEAVER text-to-SQL interactive benchmarks, which measure question-answering accuracy on ambiguous inputs and messy, large-scale databases. The system is most valuable when questions are vague, data sources are heterogeneous, definitions conflict, model context cannot hold entire documentation, and users ask in business terminology. For a single well-modeled data source with fixed questions, writing SQL directly remains sufficient.

Two-Phase Architecture

Generation Phase

The generation phase reads tables, columns, keys, views, and query history. It creates vector indexes for tables and columns, profiles values, identifies foreign-key candidates and bridge tables, writes column descriptions, groups terms, and infers links that require data confirmation. Not all steps rely on LLMs; some use SQL and rules, while others invoke models, as documented in the architecture. Output is stored in PostgreSQL with pgvector and can be imported/exported via Apache Ossie YAML. A compilation on the Wide World Importers sample database produced 31 terms.

Answering Phase

The answering phase runs a loop where the agent selects one tool per iteration: retrieve — semantic and name-based search for concepts, columns, metrics, and join paths. run_sql — queries stored values or tests drafts; validates table and column names against the catalog before execution. submit — returns final query and explanation; errors are fed back to the model for correction.

Every answer includes the SQL and execution steps; the chat interface shows raw rows, allows CSV download, and renders charts. Apart from an optional predict function, these tools do not call language models. If the tool-call limit is reached without an accepted query, the agent reports that the question cannot be answered.

Before answering, check_answerable evaluates ontology coverage. For example, asking about advertising spend ROI yielded a coverage score of 0.5 because the term "ad spend" was missing; the agent then explains the gap and suggests alternative questions or additional data sources.

Deployment Architecture

The system comprises several services:

Next.js frontend and API gateway on port 3000

FastAPI backend on port 3001

Ingestion service on port 3002

MCP server on port 3003

PostgreSQL with pgvector for data storage

Ports 3001 and 3002 are recommended for internal networks; the ingestion endpoint lacks built-in authentication. Connection credentials can optionally be stored in HashiCorp Vault.

Model Roles and Connectors

Four model roles are used, defaulting to NVIDIA NIM endpoints:

REASONING and NON_REASONING : nemotron-3.5-lightning-30b-a3b EMBED : embed-1b RERANK : rerank-8b Self-hosted NIM or any OpenAI-compatible endpoint can be substituted. The system provides 11 connectors including PostgreSQL, MySQL, Databricks, Snowflake, ClickHouse, Trino, and BigQuery; DuckDB and SQLite are supported via connection strings only. The project is licensed under Apache 2.0 .

Agent Integration Methods

MCP Server — read-only tools ( check_readiness, search_terms, get_term, check_answerable, ask_question); each user must authenticate, and calls carry user permissions. Compatible with Cursor and Claude Desktop.

REST API — POST /api/chat/completions with x-api-key authentication; returns SSE stream where result events contain the answer and sql_code.

Agent Skills — three skills for installation, modeling certification, and question validation.

Maintenance and Extensibility

Certification corrections and usage feedback fold back into the ontology. On each recompilation, only semantic foreign-key joins are re-selected; all manual edits are preserved.

Getting Started

A simple Docker Compose setup plus an NVIDIA API key is sufficient to run the stack. The source code is available at https://github.com/NVIDIA/auto-ontology.

About this article

For questions about attribution, corrections or content rights, please contactadmin@besthub.devand we will review it promptly.

MCPagentPostgreSQLNVIDIAtext-to-SQLpgvectorApache 2.0ontology generationAuto Ontology

Discussion 0

Questions, practical examples and thoughtful responses.

Open full discussion