3D Interface for Auto-Ontology Issue Identification & Resolution
Hand an LLM a 24-table retail warehouse with no declared foreign keys and it will happily guess the joins. I built a pipeline using NVIDIA Auto Ontology and NIM to compile Snowflake TPC-DS metadata into a governed PostgreSQL semantic layer over MCP, paired with a navigable WebGL2 3D city that surfaces ontology gaps and drifted definitions directly on the structure.
Naive text-to-SQL breaks on real enterprise warehouses for boring, predictable reasons: no declared foreign keys, cryptic column names, billion-row fact tables where a missing date filter blows up compute, and business terms nobody wrote down in the schema. When you hand a raw catalog to an LLM, it doesn’t stop to ask what a join means — it guesses, and once an agent guesses wrong in front of finance or operations, trust is gone.
An ontology is the contract between the warehouse and the agent: glossary terms mapped to SQL attributes, inferred semantic relationships, join keys, and grain, compiled once and governed in one place. The catch is that nobody wants to audit 48 ontology concepts, 132 inferred edges, and hundreds of columns by scrolling through raw JSON or nested YAML. So I built a 3D WebGL2 interface that turns the compiled semantic layer into a navigable city where humans and agents inspect the exact same map.
From warehouse metadata to governed MCP
The backend pipeline runs end to end in Docker over Snowflake’s standard TPC-DS retail warehouse (24 tables, 425 columns):
- Metadata ingestion & embeddings: reads Snowflake catalog metadata and builds embeddings across tables and columns.
- Semantic compilation with NVIDIA NIM: uses a reasoning model to propose business glossary terms, column descriptions, table grains, and inferred
*_SKjoin relationships where the warehouse has no declared foreign keys. - PostgreSQL semantic layer: persists the compiled ontology, lineage, and quality flags as a governed semantic store.
- Read-only MCP exposure: exposes the semantic layer over MCP so agents query validated terms and join paths instead of reverse-engineering raw DDL on every question.
Navigating the semantic layer as a city
The WebGL2/Three.js client renders a static snapshot of the compiled TPC-DS ontology entirely in the browser:
- Eight domain monoliths: Sales, Returns, Inventory, Customer, Product, Time, Channels, and Reason stand as navigable towers, with
24pull-out table shelves showing columns, join keys, and row counts. - Inferred relationship filaments:
48ontology concepts and132cross-domain edges visualize how tables connect across domains before an agent writes a line of SQL. - Surface-level quality & fault telemetry: missing descriptions, unmapped columns, and medium/high-severity ontology issues stay flagged directly on the affected shelves so reviewers can drill straight into what needs fixing, alongside simulated pipeline jobs you can fault, trace, and resolve live.
Why visual inspection matters
A semantic layer isn’t “done” when a compiler finishes running — it’s done when domain owners can see where the compiler guessed, spot drifted definitions, and fix gaps before downstream agents rely on them. Making the ontology spatial turns an invisible metadata table into something an architect, an analyst, and an engineer can point at in the same room.
You can explore the live client-side WebGL2 build directly from the attachment link above — it runs 100% in the browser on the static TPC-DS snapshot with keyboard shortcuts, Eagle-Eye overview, and direct table docking.