首页 > AI前沿 > BudgetSchemaBench: A Budget-Swept Diagnostic for Schema Context in Text-to-SQL

BudgetSchemaBench: A Budget-Swept Diagnostic for Schema Context in Text-to-SQL

arXiv自然语言 2026-10-02 12:00 6 阅读 查看原文

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

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.

Evaluation covers three conditions

  • end-to-end retrieval
  • frozen-gold, in which the required tables are guaranteed
  • 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.