GitHub - NVIDIA/auto-ontology: 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.
NVIDIA Auto Ontology is an open-source library that builds a semantic layer from enterprise metadata so AI agents can understand where data lives, what metrics mean, and whether answers are trustworthy. The repo also includes a full Docker/Kubernetes app for natural-language-to-SQL querying on top of that catalog.
- The core problem is reliability: a fast answer built on a wrong metric definition is worthless, so agents need certified business meaning, lineage, and provenance attached to every result.
- It reconciles conflicting definitions across systems, validates generated SQL against certified definitions, and serves context through MCP, CLI, and API, and it learns from corrections over time.
- The bundled app runs a Next.js frontend, FastAPI backend, and Postgres with pgvector, using NVIDIA NIM models (Nemotron LLM, embeddings, reranker), with SSO, RBAC, optional Vault for credentials, and API tokens for scripted access.
NVIDIA Auto Ontology is an open-source library (Apache 2.0) aimed at a specific problem: agents can query data quickly, but a fast answer built on the wrong definition of "revenue" is worthless. The project builds a context layer on top of enterprise metadata that tells an agent where data lives, what it means, whether it should be used, how to use it, where it came from, and what else resembles it. It reconciles conflicting definitions across systems, and it is designed to sit alongside semantic models a company already owns rather than replace them. Access is through MCP, a CLI, or an API, so it can plug into most agent harnesses.
The stated feature set breaks into four jobs. Discover generates ontologies from metadata and builds knowledge graphs. Ground attaches business meaning to metrics and entities. Validate checks generated SQL against certified definitions and lineage, returning provenance with each answer. Learn feeds certified corrections and usage patterns back into the ontology. The repo also ships a natural-language-to-SQL feature that runs queries against connected databases, using NVIDIA NIM for inference. The stack is Next.js 16 and React 19 on the frontend, FastAPI on Python 3.12+ for the backend and an ingestion worker, and Postgres with pgvector holding both the app metadata and the vector store. HashiCorp Vault is optional for credentials. Supported sources named are Databricks, Postgres, Snowflake, and DuckDB.
Setup is Docker Compose for local use or a Helm chart for Kubernetes. The defaults use nvidia/nemotron-3-nano-30b-a3b for chat, nvidia/nemotron-3-embed-1b for embeddings, and nvidia/llama-nemotron-rerank-vl-1b-v2 for reranking, each configured through a triplet of endpoint, key, and model environment variables with fallbacks to a shared default. Two things need attention before running it. First, credentials added through the UI are stored in plaintext in Postgres unless Vault is fully configured; a partial Vault config is silently ignored with only a warning. Second, `AUTH_SECRET` and `APP_URL` are mandatory, and a stale session cookie after changing the secret will break the UI until you clear site data. Scripts can authenticate with API tokens sent as `x-api-key`, and a token inherits its owner's permissions with no scoping of its own. The project is not currently accepting external contributions, so it is usable and inspectable but not a collaborative effort at this stage.