Beyond semantic models: "Domain context as code" for high-accuracy text-to-SQL
Text-to-SQL promises self-serve analytics, but accuracy remains a bottleneck. While dbt semantic models excellently encode business logic—metrics, dimensions, and relationships—many teams find that accuracy still plateaus when questions involve specific user actions on the frontend (e.g., "UUCVR after recommend modal"). The LLM lacks the context of the Web site itself.
This talk explores what lies beyond the Data Warehouse context. We will share our approach to building "Domain Context as Code" by structuring web access log measurement designs (YAML) and integrating QA automation scenarios. By combining dbt's rich metadata with this frontend ontology, we show how to turn vague natural language questions into highly accurate Semantic Layer queries, improving both Text-to-SQL performance and overall data quality.
Check out more sessions
- Breakout session
dbt Wizard: your AI teammate for data development
Ani Venkateshwaran / dbt LabsBrandon Thomson / dbt LabsView session - Breakout session
The next wave of data infrastructure is in the Lake
Russell Christopher / dbt LabsCasey Karst / FivetranView session - Training add-on
{SOLD OUT} Becoming a dbt Architect
Akash Trivedi / dbt LabsWill Weld / dbt LabsView session
