NVIDIA's Auto-Ontology is an open-source context layer that compiles database metadata into a certified semantic ontology to improve agentic text-to-SQL reliability. Deployed via Docker Compose alongside PostgreSQL 17 with pgvector, the system comprises a Next.js frontend (port 3000), a FastAPI backend and ingestion service (ports 3001, 3002), and an MCP server (port 3003) exposing read-only tools like check_answerable and ask_question. It operates in three stages: generation extracts schemas, profiles columns, and infers terms, relationships, and SQL attributes from sources including PostgreSQL, MySQL, Snowflake, Databricks, and Trino; certification allows human review of definitions via UI or API; and answering uses a dual-model pipeline—Nemotron-3.5-Lightning-30B for reasoning (ontology construction, SQL writing) and Nemotron-3.5-Embed-1B with Nemotron-3.5-Rerank-8B for retrieval. Unlike schema-in-context approaches, Auto-Ontology supplies agents only relevant terms and reviewed SQL expressions, reducing token growth and preventing hallucinated joins. Evaluation via auto-ontology-eval benchmarks (BIRD, BEAVER, FDABench-Lite) compares ontology-grounded agents against schema-only controls using execution-match verification. The system supports Apache Ossie import/export, KumoRFM for predictive queries, and REST/SSE APIs for integration, with authentication via Better Auth and optional HashiCorp Vault for credentials.
Read original
github-trending/python