TL;DR: Instead of joining the semantic layer argument, Jacob Matson and Alex Monahan just ran the eval. Same warehouse, same questions, one agent grounded in plain-text context with SQL snippets, one working through a real semantic layer built with Malloy. SQL-based context hit 100% on their benchmark. Malloy peaked at 95% and used more tokens. But the semantic layer still earns its keep as a contract for change.
The experiment
They pulled 26 golden question-answer pairs and the data manual from the DABStep benchmark, then had Fable generate both a Malloy semantic model and a MotherDuck Guides context layer — no Malloy written by hand. A cheaper model answered roughly 400 held-out questions through each layer. The setup and results are in how AI writes the semantic layer, and the harness is open source in the agentic-malloy labs repo if you want to run it on your own data.
What the evals showed
With SQL snippets in context, agents scored 100%. Through Malloy, the best run reached 95% and burned more tokens. The models needed extra turns to work in a language they'd barely seen in training — fifty years of SQL on the internet is a lot of pretraining data to compete with. The agents also cheated: in early runs, about 40% of the time they compiled the Malloy, read the generated SQL, and just edited the SQL directly. The harness had to forbid raw SQL to get a clean comparison.
Why keep a semantic layer at all
Change a metric definition once and every consumer picks it up on their next refresh. That contract between data producers and consumers is where the real value sits, and it grows with org size. A ten-line Malloy query can also replace hundreds of lines of generated SQL, which makes review far easier for whoever has to sign off.
Falling model prices change the answer
Mid-experiment, a price drop made the smallest frontier model the most cost-effective choice. Eval runs went from about $500 on a large model to $4–5. The optimal model changed while the experiment was still running, which is the argument for owning your evals. MotherDuck's AI analytics eval field guide covers how to build your own.
Practical takeaways
Use context (like MotherDuck Guides) to route agents to the right semantic models with progressive disclosure. Bootstrap a context layer from your query history with something like SQLGlot. Consider a two-tier design: governed metrics first, transparent fallback to SQL. And don't ask an agent how confident it is. Measure it.



