One value swap made 424 pairs of AmbiQT SQL queries return different answers
In an AskWise preprint, 424 of 1,206 eligible pairs agreed on the original data but diverged after a swap. A second database state helped preserve interpretations, but couldn’t recover ones the models missed.
Two plausible SQL queries can return identical rows today and give different answers once a record changes. That matters for a SQL assistant deciding whether it can answer immediately or needs to ask what the user meant. In their Nov. 20 AskWise preprint, Yuru Liang, Guangyinan Mei and Miles Fan show how a deliberately small change can expose that difference. The result is a test of how assistants group candidate queries, not a new leaderboard accuracy score.
What one swap exposed
The authors started with all 1,240 AmbiQT validation items in the column-synonym category and used the associated Spider databases. They held both reference queries fixed and swapped two distinct non-null values within the second synonym column, choosing the rows deterministically before checking outputs. Twenty items failed to execute and 14 lacked an eligible pair. Of the remaining 1,206, 424 (35.16%) had reference queries that agreed on the original database but disagreed after the swap. All four query–database combinations agreed in the other 782. Because a swap preserves the column’s collection of values, a whole-column aggregate can stay unchanged even when the values attached to particular rows change. Paper §5.4
A second state preserves candidates; it does not generate them
On a separate 155-question sample across 20 databases, each model proposed up to four interpretations per question. The authors compared two ways of pruning the same executable candidates: keep the first candidate for each original answer, or keep the first for each pair of original and modified answers. The latter improved mean reference-signature recall by 8.71 percentage points for Doubao Lite and 10.00 points for GPT Sol. Mean precision shifts were small, and both paired 95% intervals included zero. Neither pruning method could recover signatures the models never generated: 67 of the 208 references were already absent for Doubao Lite, and 62 for GPT Sol. Paper §5.5 and Table 3
When asking sooner costs less
AskWise asks about a choice only after finding two executions that differ in that choice alone and return different answers. On the paper’s synthetic Boolean Sales Test (120 tasks, 1,920 simulated episodes per policy), certifying the highest-gain question under fixed execution order took 13.80 execution lookups and 0.810 questions per episode. Asking at the first sign that a choice mattered took 13.18 lookups and 0.835 questions. These were lookups of precomputed SQLite answers, not live database latency measurements. Paper §§5.1–5.2
The practical takeaway: before discarding two interpretations as duplicates, test whether they agree on a plausible second state. Agreement across the states you tested is still not proof of SQL equivalence. And a clarification policy needs its own cost measurement on live workloads: the candidate audit measures what survives pruning, while the sales simulation measures a trade-off between executions and questions. Paper §§3.2, 5.2, 5.5 · Author code and results
sources
- AskWise preprint v1 and submission datearxiv.org
- AskWise §3.2: answer signaturesarxiv.org
- AskWise §5.1: tasks and policiesarxiv.org
- AskWise §5.2: policy costsarxiv.org
- AskWise §5.4: sensitivity to repairsarxiv.org
- AskWise §5.5: reference signature recoveryarxiv.org
- AskWise author repository and recorded resultsgithub.com
comments · 0
- EKOS’s pending BIRD submission pairs a SQLite-tuned run with a separate hidden-test scoreDec 3, 2026
- MotherDuck rolls out DuckDB 2.0 and reports faster cold reads, not faster agent answersDec 3, 2026
- Oracle Select AI can use two definitions of the same metric. Source order won’t break the tieDec 3, 2026