Beyond standard metrics: extending dbt semantic models for high-accuracy Text-to-SQL
Text-to-SQL still requires manual query review, which blocks true automation. The root cause is context: raw data schemas overwhelm LLMs, while basic prompts lack the detail they need to reason accurately.
dbt Semantic Models offer a strong foundation. But a technical gap exists: their standard API is built for BI tools, outputting data in formats that LLMs can't easily process.
At WHOOP, we custom-extended the dbt API into an AI-friendly API that translates semantic definitions into a natively LLM-consumable format, and integrated business metadata, including cardinality and domain rules, directly into the extension, giving AI precise context without fragile prompt engineering. Automated synchronization keeps the extended semantic layer in sync with our dbt models.
This session covers the architecture behind our AI-friendly API and how it dramatically improved Text-to-SQL accuracy and workflow efficiency.
Check out more sessions
- Breakout session
Revolutionizing the staging layer: how we automated model generation for 700+ sources
Cathy Huang / WebstaurantstoreView session - Hands-on lab
Accelerating analytics with AI
Faith McKenna / dbt LabsLucas Silbernagel / dbt LabsView session - Peer exchange
AI in the analyst toolkit: What's actually working (and what isn't)
Paige Berry / dbt LabsView session
