Generated banner for Nvidia Ontology Query
Generated logo for Nvidia Ontology Query

Nvidia Ontology Query

NVIDIAOfficialCreated by NVIDIA

  • Skill
  • Tool integration
  • Data and AI
  • Apache-2.0
  • Medium risk

From the author

Query Auto Ontology and validate generated SQL, rows, and answers. Use for MCP or REST access, readiness, authentication, conversations, and grounded questions.
— the description by NVIDIA

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a structured procedure for agents to interact with the Auto Ontology system. It emphasizes a rigorous validation process for all generated answers, ensuring that SQL, returned rows, and prose are checked against material constraints before being presented. The skill supports both MCP for direct reads and a REST gateway for authenticated access, while strictly separating query execution from data management tasks.

What it does

  • Verifies system readiness and database connectivity before query execution.
  • Searches semantic terms to confirm answerability within the ontology.
  • Executes text-to-SQL queries via MCP or authenticated REST endpoints.
  • Validates generated SQL, row data, and prose against material constraints.
  • Handles conversation threads and state management for multi-turn interactions.
  • Provides fallback mechanisms for authentication and error handling.

When to use it

  • When you need to retrieve grounded, data-backed answers from an Auto Ontology deployment.
  • When performing diagnostic or descriptive analysis that requires SQL validation.
  • When integrating an agent with an Auto Ontology instance via MCP or REST.
  • When you need to ensure that query results are accurate and meet specific business logic requirements.

Advantages

  • Ensures high-integrity answers through a mandatory validation workflow.
  • Provides a consistent interface for both MCP and REST-based clients.
  • Reduces errors by enforcing checks on SQL, grain, and data lineage.
  • Supports secure, authenticated access to ontology data.

Usage examples

“How many orders were shipped last week?”
The agent checks readiness, searches for relevant terms, executes the query, validates the SQL and rows, and returns a verified count.
“What is the total revenue for the current quarter?”
The agent performs a grounded query, verifies the measure grain and time scope, and provides a validated answer based on the returned rows.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/nvidia/nvidia-ontology-query/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip nvidia-ontology-query.zip -d .agents/skills

Documentation by NVIDIA

<!-- SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. SPDX-License-Identifier: Apache-2.0 -->

Auto Ontology grounded queries

Purpose

Query the current Auto Ontology implementation from an agent without prescribing a harness, SDK, or LangGraph template. Typed workflow artifacts, statuses, gates, and handoffs are in runtime-contract.yaml.

Prerequisites

Use a running Auto Ontology deployment and an authenticated MCP or REST client. If Auto Ontology is not running, use nvidia-ontology-setup first.

Limitations

This skill reads and validates answers. It does not expose FastAPI directly, write semantic definitions, publish governed results, or provide a raw-schema browser. Hand mutations and publication to nvidia-ontology-management.

Instructions

  1. Call readiness before asking a question.

  2. Discover terms and confirm answerability through the semantic layer.

  3. Ask through MCP, or use the authenticated Next.js REST gateway as fallback.

  4. Validate material intent, SQL, rows, truncation, and prose before presenting a claim-bearing answer.

Prefer MCP for reads

When the harness speaks MCP, use it. The handshake tool list is the live source of truth (mcp/auto_ontology_mcp/tools.py). Do not copy a tool table into the session; if the handshake and this skill disagree, trust the handshake.

Sequence (the server also advertises this so models do not jump straight to ask_question):

  1. check_readiness — compiled semantic layer and a live DB connection.

  2. search_terms — what the nouns mean here.

  3. check_answerable — cheap coverage check.

  4. ask_question — full text-to-SQL; tens of seconds; answer + SQL + rows (capped at 100 rows, with row_count / truncated).

  5. For a claim-bearing answer, validate material intent, generated SQL, returned rows, truncation, and prose using query-validation.md.

Everything on MCP reads. There is no MCP tool for raw databases, schemas, or columns on purpose. describe_table is the legitimate table view: terms and SQL attributes the table participates in.

Connect: AUTO_ONTOLOGY_API_URL is the web app. Run auto-ontology-mcp, point the client at …/mcp, user signs in. No token on the MCP server. Details: repository mcp/README.md and docs/mcp.md.

REST fallback and write handoff

When MCP is unavailable, public clients call the authenticated Next.js gateway, not FastAPI :3001. FastAPI trusts x-auto-ontology-user-id and must not be exposed. A direct FastAPI request without conversation_id is stateless; with conversation_id it requires that internal header.

Auth (any of these; resolved in one place):

  • Browser session cookie

  • API token: x-api-key: $AUTO_ONTOLOGY_API_TOKEN (Authorization: Bearer works for auto_ontology_… tokens too). Token acts as its owner.

  • OAuth bearer issued by Auto Ontology (MCP sign-in)

  • SSO id token (Authorization: Bearer <jwt>), e.g. AI-Q — see stack.md

Shapes: docs/openapi/auto-ontology-api.json. Do not scrape all ~87 operations. A write request hands off to nvidia-ontology-management; this skill does not turn a read-only question into a mutation.

Chat

POST /api/chat/completions — SSE step / result / error / charts, then [DONE]. Permission chat:use; a request with conversation_id also needs conversation:write, or it gets 403.

  • Omit conversation_id for a one-shot (no history, no chart step).

  • Supply a client-generated UUID to create or continue a thread (needs chat:use and conversation:write).

  • Wait for [DONE] before the next turn; overlapping requests return 409 Conversation in progress.

  • A 404 on a conversation id means it belongs to another user.

Python (from the Auto Ontology README; no extra SDK):

import os
import requests

session = requests.Session()
session.headers["x-api-key"] = os.environ["AUTO_ONTOLOGY_API_TOKEN"]

terms = session.get("https://ontology.example.com/api/terms").json()

answer = session.post(
    "https://ontology.example.com/api/chat/completions",
    json={"question": "How many orders shipped last week?"},
)
# response is SSE, not a single JSON object

Open an API-created thread in the UI at /chat?focus=<conversation_id> when it belongs to the signed-in user.

Discovery (semantic layer, not a catalog browser)

MCP first. REST fallback:

  • GET /api/terms (query, skip, limit)

  • GET /api/terms/{term_id}

  • GET /api/exploration/tables/{table_id}/details

  • GET /api/exploration/graph

Writes and compile reset: nvidia-ontology-management.

Validate claim-bearing answers

Do not treat successful execution as sufficient evidence. Before presenting a decision-facing result, apply query-validation.md to check population, measure, unit, grain, joins, lineage, status, validity, rows, truncation, and answer prose. If a material constraint cannot be verified, return the gap rather than a stronger claim.

Empty or failed answers

ask_question / chat returned nothing useful → check_readiness (or GET /api/semantic-compilation/status) before rewriting the question. A named database is not proof SQL can execute. See nvidia-ontology-setup troubleshooting.

Examples

  • For a grounded count, run check_readiness, search_terms, check_answerable, and then ask_question.

  • If a response is truncated or violates measure grain, refuse the complete claim and follow query-validation.md.

Troubleshooting

For empty or failed answers, check readiness and compilation status before rephrasing. For REST errors, verify the public web origin, authentication, and conversation ownership before retrying.

See also

  • stack.md — AI-Q, Nemotron, cuOpt (what exists vs what partners wire)

  • query-validation.md — material intent, SQL, rows, and answer checks

  • nvidia-ontology-management — model, modify, and publish through the layer

  • nvidia-ontology-setup — bring-up and MCP OAuth discovery

Files

references/query-validation.md

<!-- SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. SPDX-License-Identifier: Apache-2.0 -->

Grounded query and answer validation

Use this workflow for descriptive and diagnostic questions after the ordinary MCP or REST readiness and answerability sequence in the parent skill. It checks the generated SQL, returned rows, and answer separately; successful execution alone does not prove that the intended question was answered.

Resolve the material question

Before ask_question, restate the required:

  • population and exclusions;

  • measure, unit, and result grain;

  • grouping, ordering, and distinctness;

  • time range, as-of time, and comparison basis;

  • run/scenario identity, parent lineage, status, validity, and supersession;

  • required source or artifact role.

Clarify material ambiguity instead of selecting a convenient default. Resolve the approved Term, SQL attribute, source expression, denominator, filters, and join path. Do not substitute a similarly named measure or source field.

Inspect the SQL

Check that the generated SQL preserves every material constraint. In particular:

  • required tables, columns, joins, literals, and time predicates are present;

  • joins use approved keys and direction;

  • detail rows are aggregated at detail grain before joining to run summaries;

  • an already run-level metric is not summed after a one-to-many detail join;

  • quantity is not replaced by a ratio, rate, average, or horizon total;

  • requested run, scenario, parent, status, validity, and supersession filters are explicit;

  • the selected hash or identifier has the requested source role.

If a material constraint is missing or substituted, do not present the result as an answer. Preserve the SQL and report the mismatch or request clarification. When a one-to-many fanout is detected, obtain and execute a corrected run-grain query before presenting a validated result. A supplied run-level value may be identified as source evidence while diagnosing the multiplication, but it must not be relabeled as a validated query result.

Check rows independently

Validate row keys, population, cardinality, values, units, time scope, denominator, provenance, and literal states. Recompute simple totals and ratios when the returned rows permit it. Empty or null is not automatically zero.

A truncated result cannot prove a complete list, ranking, or total. Narrow the claim or request an aggregate over the complete population. Keep exact values separate from presentation rounding.

Check the answer

Lead with findings from the returned rows, not a description of what the SQL would do. Require the prose to match the validated values, units, scope, and status. Preserve identifiers and literal recommendation state when requested.

Observed, computed, modeled, predicted, recommended, and committed are distinct evidence states. A retrieved recommendation does not become an approved or executed action. Diagnostic association is not causality; counterfactual claims need appropriate evidence.

Follow-ups and failure behavior

Wait for the prior SSE stream's [DONE] before a conversational follow-up and preserve its load-bearing constraints. Use a fresh conversation for independent evaluation questions. Do not use expected or evaluator-gold answers as model context.

Retain a concise receipt containing question identity, ontology/source identity, SQL, rows, row count, truncation, answer, attempts, and observed gaps. Never record credentials. On missing evidence, wrong population, invalid state, or unverifiable truncation, fail closed instead of silently trimming or choosing the latest available row.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs an MCP server, Needs Python

Security

What our scanner noticed· Medium risk

  • Large base64-encoded blobs

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
NVIDIA
Publisher
NVIDIA (Official)
Source
NVIDIA/skills · skills/nvidia-ontology-query · commit fce3cca
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE-APACHE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by NVIDIA.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download nvidia-ontology-query.zip