dbt Summit
All on demand sessions
On demand session

Beyond semantic models: "Domain context as code" for high-accuracy text-to-SQL

How to turn vague natural language questions into highly accurate semantic layer queries, improving both Text-to-SQL performance and overall data quality.

Recorded at dbt Summit · 2026Breakout session archive
01

Overview

Breakout session · 2026

Text-to-SQL accuracy plateaus on questions tied to specific frontend actions that dbt semantic models don't capture. This session introduces "Domain Context as Code": YAML-based web access log measurement designs plus QA automation scenarios, merging dbt metadata with frontend ontology to turn imprecise questions into precise Semantic Layer queries.

What you'll take away

  1. 01

    A text-to-SQL agent had access to the right data but still returned wrong answers because near-identical event names (tap reserve, tap reserve icon, show render) couldn't be reliably disambiguated from the data alone.

  2. 02

    Rather than build a general-purpose ontology, Recruit Holdings took an issue-driven approach: pick a specific failure, identify the exact hidden context needed, and write it into a reviewable YAML file.

  3. 03

    That same YAML file now has to be written and reviewed before any related feature ships, with front-end logging code generated from it and QA tests built against it, so context stops going stale after launch.

02

Session speaker

01 speaker
  • Junya Morita

    Recruit Co.,ltd.