Repository navigation
DEV-2064 slayer-evals: raw-SQL flavor, combo and trap tasks, 3-flavor baseline - #2
Merged
ZmeiGorynych merged 7 commits intoOct 7, 2026
Conversation
… tasks, 3-flavor baseline
…s, task proofs, new tables, 3-flavor report Also commits the probe-table hashes computed on the unchanged generator and regenerates the report fixtures in the new result and trace schema.
…7 traps and 11 combos, 3-flavor report SLayer is pinned to the commit that fixes DEV-2062 until it is released.
…ll failure breakdown The system prompt now asks every agent for exact values and null labels for unknown groups; sql+python was rerun with it.
…inst overlap; truncated SQL results carry a truncated warning
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Turns the benchmark from "do agents reach for SLayer's DSL?" into a three-way comparison with an agent that queries the database directly, and adds the tasks that make that comparison interesting: questions combining several capabilities, and traps where the straightforward SQL silently returns wrong numbers.
Linear: DEV-2064
What changes
A third flavor,
sql+python. No SLayer at all. The agent gets asqltool, plussubmit_answerand the same Python sandbox (which is not given the database). Thesqltool:ATTACH,COPY,INSTALL/LOAD, file reads and re-enabling access all fail;{columns, rows, truncated}, capped at 1,000 rows.Runs now default to all three flavors.
Grading across flavors.
single_querynow counts any successful SLayerqueryorsqlcall whose own result is the answer.sql+pythonpass on an empty answer whose message names the problem.uses_saved, e.g.monthly_rev) auto-fail insql+pythonwithout starting an agent (end reasonauto_fail).null_as_zero.slayer_errorsis nowquery_errors.The report leads with a suite × flavor table and says plainly that correct is the cross-flavor comparison, since one SQL statement can express nearly anything. A pitfall × flavor table follows, then the per-row tables, where a multi-row task counts under every row it covers.
Task format.
rowbecomescovers: rows plus pitfall kinds, from which the suite is derived (capability,combo,trap); files live undertasks/<suite>/.slayer_query, and traps carry thenaive_sqlthat falls into them.tests/test_task_proofs.pyruns every reference query through SLayer and every naive statement on the built database. It fails when a reference query doesn't answer its task, when a trap's naive SQL happens to be right, or when a covered row's DSL marker is missing from the reference query (new arc42 principle 7).Data and tasks.
products,order_items(lines sum to the order amount to the cent),campaigns,campaign_members(a bridge), andcities(keyed on city and region; Oslo is in two regions).NOT INwith NULL, filtered totals, distinct re-aggregation, missing months, filtering before a window, row windows over gaps, timestamp bounds, average of averages, and more.join,null,not in, …); q3, q6, q10, q12 and q25 were reworded.System prompt. It now asks every agent to "submit exact values without rounding, and use null as the label of a group whose key is unknown". Without it the strict grader marked the raw-SQL agent wrong on answers that only differed in rounding or a made-up "Unknown" label.
Baseline (Opus 5.5, one trial per task × flavor)
slayercorrect / passedslayer+pythonsql+pythonThe raw-SQL agent fell into none of the traps. On this set SLayer's lead is not correctness; its agents still often assemble a correct answer from several queries.
docs/baseline-failures.mdbreaks it all down.The
sql+pythontrials were rerun after the system-prompt sentence was added; the SLayer flavors ran just before it.q12-net-revenuewas rerun in all flavors after its prompt fix.Notes for review
1653a91(main, the DEV-2062 fix for a saved ratio measure plus a transform over it), whichcombo/c-aov-changeneeds. Switch to the release once it's out. That version requiresdirection=onrank, so the reference queries use it.TrialResultand task files changed shape (row→covers), so old result files no longer load. The baseline and test fixtures are regenerated.openspec/changes/dev-2064-…/.