BudgetSchemaBench: A Budget-Swept Diagnostic for Schema Context in Text-to-SQL
Abstract
Data agents over structured sources must fit database schema into the model's context window. Large catalogs can span many databases and thousands of columns, so cost constraints may require choosing between table coverage and serialization detail well before the context window is full. We introduce BudgetSchemaBench, an execution-grounded diagnostic for this setting. Its construction derives relevance labels mechanically from gold SQL, without human- or LLM-authored ground truth. Using a pooled 80-database catalog, we sweep four schema-context budgets and compare three representations while keeping each retriever's table ranking fixed. A source-namespace check rejects queries that obtain the correct result from the wrong database. The evaluation covers three conditions: end-to-end retrieval; frozen-gold, in which the required tables are guaranteed; and a probe that removes those tables. For the primary solver with raw serialization, raising the budget from 2.5% to 50% of the catalog improves execution accuracy on 1,279 held-out questions by 18 percentage points under lexical retrieval but only 3 under dense retrieval; the dense retriever already finds most required tables at the smallest budget. When the required tables are removed, 94.6% of correct predictions name one of them exactly, consistent with reconstruction of absent schema from parametric knowledge. For the two main solvers in the frozen-gold condition, the three representations differ by at most 2 percentage points, and the widest paired 95% confidence interval bounds the difference within +/-4 points. We observe the same qualitative patterns with one reasoning model from a different family. When retrieval is coverage-limited, execution accuracy is more sensitive to the schema budget than to the tested serializations. The diagnostic and the code used to construct and evaluate it are publicly available.
Create a lesson
Metadata
- Categories
- cs.CL, cs.AI, cs.DB
Related papers
Semantic-aware Decoding for Diverse Text-to-SQL under Schema Ambiguity
Shared title terminologycs.CLYuxuan Jiang, Anna Mitsopoulou, Apostolos Koukouvinis et al.
Which Part of the Context Layer Does the Work? Separating Semantic Content from Retrieval Scaffolding in Text-to-SQL Agents
Shared title terminologycs.CLQing Ye
Beyond Fixed-Context Likelihood: Zero-Shot AI-Generated Text Detection via Context Perturbation Discrepancy
Shared title terminologycs.CLYifan Tang, Jingran Li, Yihao Wang et al.
Auditing and Repairing LLM-as-Judge Failures in a Production Text-to-SQL Pipeline
Shared title terminologycs.CLHaowei Liu, Hsin-Tai Wu, Yi Fang
NORMCRAFT: Cultural Norm Generation for Context-Aware Language Model Alignment
Shared title terminologycs.CLTangyuan Zhang, Zhuang Li, Fatemeh Shiri et al.
Open-Source FUTO Keyboard Layouts and Predictive Text for a Few Endangered Languages
Shared title terminologycs.CLMika Hämäläinen, Jack Rueter, Khalid Alnajjar