cs.AINov 26, 2026

BASIL-W: Scope-Aware Evidence for Text-to-SQL Selection

Authors: Anup Roy, Rishabh Gyanendra Upadhyay, Animesh Rameshbhai Panara, Aidan Philip Millar, Larry Murray, Robin Mills

Organizations: Inception42, Abu Dhabi, UAE · Mubadala Investment Company, Abu Dhabi, UAE

Abstract

Execution feedback can mislead text-to-SQL selectors when incomplete query outputs are treated as conclusive evidence. BASIL-W represents observations as scope-aware witnesses containing the executed SQL, its output, completion status, and certified scope. An absence claim requires a completed check covering the claimed predicate and domain. A 2x2 factorial experiment varies scope metadata and an explicit instruction while holding the model, candidates, and probes fixed. On the full Spider and WikiSQL test splits with GPT-4.1, execution accuracy increases from 85.98% to 88.50% and from 90.50% to 91.60% (all six paired contrasts Holm-adjusted p<0.006). The combined interface outperforms either factor alone. The arm ordering also holds with Qwen2.5-Coder-32B and Llama-3.3-70B and on BIRD dev, where the gain reaches +3.7 percentage points. Observed margins over the strongest matched selection baseline are +1.58 on Spider, +1.76 on BIRD dev, and +0.15 on WikiSQL; these comparisons lack paired uncertainty estimates. The Spider audit found unsupported absence-claim rates of 12.0% for raw evidence and 4.3% for BASIL-W. The design does not isolate scope content from prompt length or presentation, and the audit does not establish a causal mechanism.

Figures & tables

Explore similar work

Nov 27, 2026

KwaiSQL: Preference-Optimized Selection for Enhanced Text-to-SQL Generation

Text-to-SQL systems increasingly combine candidate generation with query selection. When these two roles share a model, can learning to select better queries also improve generation? Both tasks require judging how faithfully SQL operations express a natural-language question, making candidate comparison a potential source of supervision for generation. We investigate this connection by training a shared model for SQL generation and selection. Starting from a tool-using generator trained with execution rewards, we apply preference learning to candidate selection and use the resulting checkpoint for both roles. We analyze how selection updates can benefit generation through shared parameters and evaluate the generated candidate pools before selection, using the same tools and sampling settings. On BIRD Dev, selection preference training raises generation-only pass@16 from 81.79% to 82.83%, increasing the coverage of questions with at least one correct candidate. The resulting model achieves 74.67% execution accuracy when used for both generation and selection. These findings show that learning to compare SQL candidates provides a training signal that improves candidate generation and raises the ceiling for final query selection.Our model is publicly available at https://huggingface.co/Kwai-AutoSQL/Kwai-AutoSQL-27B.
May 31, 2026

SIRIUS-SQL: Anchoring Multi-Candidate Text-to-SQL in Execution Feedback

Text-to-SQL on complex schemas is unreliable on a single pass, so recent systems generate multiple SQL candidates and let voting filter out errors. Yet voting alone is not enough, because the multi-candidate recipe has three coupled weaknesses: 1) sampling more from a single generator produces increasingly redundant candidates, 2) existing pipelines apply one generic correction to every non-clean execution result, while runtime errors, timeouts, and empty results each indicate a different distance from correctness, and 3) existing selectors rely on a single angle such as result-majority voting or pairwise SQL comparison, missing what other angles would have caught. We present SIRIUS-SQL, which addresses all three weaknesses. A difficulty-smoothing RL recipe trains SIRIUS-32B to generate diverse executable SQL candidates, paired with a generalist LLM that fills in gaps left by the specialist. An execution-grounded lifecycle classifies each outcome and applies targeted repair before candidates re-enter the pool. A confidence-gated hybrid selector combines execution-result agreement with pairwise SQL-form judgment, escalating only near-tied cases to a deterministic structural check. SIRIUS-SQL reaches 75.88% on BIRD dev and 91.20% on SPIDER test. Two of three generalist pairings surpass Agentar-Scale-SQL, the strongest published multi-candidate system on BIRD dev.
Apr 24, 2026

PExA: Parallel Exploration Agent for Complex Text-to-SQL

LLM-based agents for text-to-SQL often struggle with latency-performance trade-off, where performance improvements come at the cost of latency or vice versa. We reformulate text-to-SQL generation within the lens of software test coverage where the original query is prepared with a suite of test cases with simpler, atomic SQLs that are executed in parallel and together ensure semantic coverage of the original query. After iterating on test case coverage, the final SQL is generated only when enough information is gathered, leveraging the explored test case SQLs to ground the final generation. We validated our framework on a state-of-the-art benchmark for text-to-SQL, Spider 2.0, achieving a new state-of-the-art with 70.2% execution accuracy.