Click any tag below to further narrow down your results
Links
SLayer is an open-source Python semantic layer that sits on top of a data warehouse so AI agents and people can query metrics without writing SQL by hand. You define a column like revenue once, then query it with expressions such as avg(revenue) or time_shift(sum(revenue), -1, 'year').
- Unlike traditional BI semantic layers, which need every metric and aggregation predefined, SLayer lets agents combine metrics, apply transforms like time shifts, and change aggregations on the fly.
- It handles read-only database connectivity, SQL generation, and row-level security, so the LLM doesn't have to write raw SQL.
- It exposes the same definitions over MCP, REST, CLI, Python, Flight SQL, and a Postgres-style SQL API, and imports configs from dbt, Cube, and Ossie.
- Install is via uv, and it can be added to Claude Code as an MCP server with a demo Jaffle Shop database for a quick start. It sends aggregated usage stats once a day unless you opt out.
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.
The article examines why translating natural language into SQL for live data warehouses remains a tough problem. It traces the rise of ad-hoc queries in 1990s‐era historical data stores and shows how schema complexity and performance needs outpace current text-to-SQL systems.
- Benchmarks like Spider (max 200 tables, single database per task) don't reflect real enterprise warehouses with hundreds of tables and thousands of columns spanning dozens of schemas
- Production metadata is messy: cryptic/inconsistent column naming, typos, abbreviations, and mixed-language query logs undermine model performance
- Vendor-specific SQL extensions (Oracle's LISTAGG, PostgreSQL's JSONB operators) and user-defined types routinely break academic text-to-SQL models
- The authors call for shared benchmarks built from anonymized real industry schemas/workloads and argue LLMs need integration with metadata services and human feedback loops before replacing analysts in critical settings
This article reruns a 2023 benchmark with the latest LLMs, comparing direct SQL generation against querying through a structured dbt Semantic Layer. It finds that while text-to-SQL accuracy has jumped, a modeled Semantic Layer still delivers near-perfect, deterministic results for covered queries, making it ideal for complex or critical use cases.
- Top 2026 LLMs (Opus 4.6, Sonnet 4.6, GPT-5.3 Codex, GPT-5.2) now hit 80%+ accuracy on raw text-to-SQL, up sharply from the GPT-4 era's ~60%
- A fully modeled dbt Semantic Layer still reaches near-100% accuracy on in-scope queries, versus ~95% for a minimal semantic layer and ~60-80% for plain text-to-SQL
- Data modeling matters more than model choice: basic modeling boosted accuracy 15-20 points, while swapping between top-tier LLMs or reasoning settings only shifted results by single digits
- Semantic layers pay off for complex, messy, enterprise-scale data, while raw LLM text-to-SQL remains a fine low-setup option for one-off or small-dataset analysis
The article discusses the shortcomings of achieving high accuracy in Text-to-SQL systems, emphasizing that 90% accuracy is insufficient for enterprise applications. It highlights the need for rigorous evaluation frameworks, like Spider 2.0, to ensure reliability and trust in AI-driven analytics.
- 90% accuracy still means 1 in 10 SQL queries is wrong, which is enough to destroy user trust and stall enterprise adoption.
- Standard benchmarks like Spider 1.0 don't reflect enterprise reality; Spider 2.0 tests against schemas with 3,000+ columns to simulate real-world messiness.
- Simple accuracy scores are misleading — metrics like Execution Accuracy (EX) and Soft-F1 are needed to actually capture whether generated SQL is reliable.