In a real-estate SQL test, dbt marts cut wrong answers but left nine questions unanswerable
The maintainers fixed the coverage gap, but the repaired layer needs fresh questions for a clean test.
A semantic layer can stop a SQL agent from returning the wrong number and still leave it unable to answer questions the raw tables can handle. That is what happened in a maintainer-run real-estate evaluation comparing agents querying source tables with agents querying dbt marts and their metric definitions. The questions covered rents, sales comps and building permits. Nine of the 60 needed fields the original marts did not expose, including parcel identifiers, permit numbers and leasing-site information.
Fewer wrong answers did not always mean more right answers
On the original 50-question scored split, the semantic arm lowered the study’s plausible-but-wrong rate for all three Claude models. That metric counts wrong results from SQL that ran, as well as answers to questions the agent should have refused. For Sonnet, the rate fell from 30% on raw tables to 22% on the marts, but execution accuracy also fell, from 69% to 64%. Six questions in that split needed missing fields, and the semantic arm refused every attempt at those questions. The report also traces many wrong raw-table answers to omitted business rules, such as the filters used to qualify sales comps.
The rerun tested a repair, not generalization
After the maintainers added missing fields and a permit-level fact table, the revised semantic arm beat the original raw arm across all 60 questions. Sonnet rose to 83.3% versus 67.5% on raw tables. But the report explicitly disqualifies the original holdout as a clean holdout: questions from that split shaped the changes, and one design decision was checked against its reference SQL. The added permit-level table also introduced a new error on one question when agents chose permit rather than project granularity. The public repository ships questions, expected answers, SQL and scored outcomes, but not the database snapshot, so readers can rescore the recorded outputs rather than replay the full SQL experiment.
For teams evaluating their own marts, the useful first check is whether reference queries can produce the expected answers using only the curated tables. Then track wrong answers and false refusals separately. If the evaluation tells you what to add to the marts, keep those questions as regression tests and use fresh ones to measure how well the repair generalizes.
sources
comments · 0