TRANSMISSION // 2611.30873v1
Helping AI Keep More Than One Database Interpretation in Play
Source published
SchemaBeam adjusts how an AI generates database queries, helping it retain alternative readings when a natural-language question is ambiguous.

“Show German books” could mean books by German authors or books published in Germany. A new decoding method aims to keep both readings among an AI system’s candidate database queries, so a later step can help resolve what the user meant.
Turning a plain-language question into a database query can be difficult when its words point to different parts of a database. “Show German books,” for example, could mean books written by German authors or books released by German publishers. Both readings may produce valid SQL, but a system that returns only one could choose the wrong intent.
Yuxuan Jiang and colleagues propose a way to help text-to-SQL systems keep more possible readings in view. Their method, Semantic-aware Logit Adjustment (SLA), targets interpretation coverage: whether a shortlist of generated queries includes the plausible interpretations of an ambiguous question. Combined with beam search—a standard way to generate and rank candidate outputs—it forms a system the authors call SchemaBeam.
Why candidate generation can miss alternatives
Language models generate SQL one token at a time. When a question might refer to an author or a publisher, the model may strongly favor one choice at the point where the queries diverge. Beam search can then continue exploring variations of that reading while the other drops out. Random sampling may not help much if one option is far more probable than the other.
The researchers use relationships between database elements as a clue. They represent tables and columns as text, use an embedding model to estimate semantic similarity, and calculate those similarities before query generation. During decoding, a prefix tree tracks whether the model is generating a schema element and which tokens are valid continuations. At selected points in the SQL query, SLA boosts the scores, or logits, of valid alternatives related to the model’s leading choice.
The adjustment is designed to increase the chances that alternatives appear without changing the top-ranked token at that step. SchemaBeam also restricts generation to valid schema continuations in selected query positions, masks related tokens, and deduplicates outputs syntactically using their abstract syntax trees (ASTs). It does not require changing the model’s training.
What the tests found
The paper evaluates SchemaBeam on two ambiguity benchmarks: AmbiQT and the vagueness portion of Ambrosia. The tested base models are Llama3.1-8B, Qwen2.5-Coder-14B, and Qwen3.6-27B, spanning two model families. The researchers measure whether at least one, or both, of two designated interpretations appear in the first five predictions. These measures capture coverage, not whether the system’s leading answer is correct in every real-world situation.
The paper reports that SchemaBeam improved the “both interpretations” measure over standard beam search in every setting across the three models and the evaluated ambiguity categories in both benchmarks. It improved the “either interpretation” measure in most settings. The central result is therefore about retaining alternatives in a candidate list—not independently determining which interpretation the user intended.
In a comparison using Qwen2.5-Coder-14B, the paper reports SchemaBeam at about 1.1 times the latency of standard beam search. The authors describe its coverage results as competitive with several prompting- and fine-tuning-based approaches, with lower inference cost in their tests. That comparison has qualifications: the authors reimplemented some methods, and for ODIN, whose code they say was unavailable, they used Claude 3 Haiku. It is not a universal ranking across systems or settings.
The method also has limits. Semantic similarity is a clue, not proof that two database elements represent genuinely plausible readings of a question. In one example, SchemaBeam failed to rank the correct query highly enough because increased diversity also introduced variation in other schema choices. The paper notes that some remaining errors in stronger models concern SQL structure, such as missing or redundant subqueries, rather than schema selection. Generating more schema alternatives cannot correct every kind of query error.
What remains uncertain
The evidence supports a specific conclusion: in these benchmark experiments, SchemaBeam more often kept both designated interpretations among its top-five candidates than standard beam search did. It does not resolve ambiguity by itself. A deployed system may still need to ask the user which reading they intended, and additional candidates are useful only if they are valid and meaningfully distinct.
This work is an arXiv preprint; the supplied source does not establish peer review. Its experiments use selected benchmarks rather than everyday database deployments, so performance on other schemas, domains, and user interactions remains uncertain. The findings are experimental results, not a guarantee that an AI will correctly handle every ambiguous database question.
- text-to-SQL
- database ambiguity
- large language models
- SQL decoding
- SchemaBeam
- AI evaluation
Reviewed cross-references
These connections were reviewed by a model, not independently fact-checked by a human. Similarity does not imply agreement; consult the original papers and the evidence below.
Physicians preferred conversational database queries, but accuracy remained a concern
Supporting evidence: Jiang et al. describe schema-ambiguity benchmarks as typically assigning one ground-truth query despite multiple acceptable interpretations; Lee et al. report that clinician-authored queries in their MIMIC-IV study prompted clarification more often than predefined questions (24.8% versus 1.8%) and argue that benchmark-style evaluation can underrepresent clinical ambiguity. Together, these findings support the bounded point that evaluations built around fully specified, single-answer questions may miss some ambiguity encountered in use. The studies examine different forms of ambiguity and different outcomes, so they are complementary rather than a direct comparison; both are preprints and the cited evidence is excerpted.
Model review: · openai-codex/gpt-6-luna
Evidence and provenance
Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.
2611.30873v1 — Original paper
Excerpt reference:
static/papers/2611.30873v1.md:13-80
Basis: Paper text
Source SHA-256:21434a7e73cdd776a19b864069319f068c2955a73a5d4a0387e6a863ea8f7b0b2611.00605v1 — Original paper
Excerpt reference:
static/papers/2611.00605v1.md:13-74
Basis: Paper text
Source SHA-256:59f9c53f3764fc5148e418bf5b78ac7834858ddd43ca4dd0f817b23820f691242611.00605v1 — Original paper
Excerpt reference:
static/papers/2611.00605v1.md:583-627
Basis: Paper text
Source SHA-256:59f9c53f3764fc5148e418bf5b78ac7834858ddd43ca4dd0f817b23820f69124
Related reading
Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.
When an AI Queries a Database, How Does It Know What You Mean?
Source published
Shared keywords: ai evaluation, large language models, text to sql
When Should a Text-to-SQL System Abstain?
Source published
Shared keywords: large language models, text to sql
Physicians preferred conversational database queries, but accuracy remained a concern
Source published
Shared keywords: large language models, text to sql
Why SQL agents need knowledge while they work
Source published
Shared keywords: large language models, text to sql
Can a local AI team help utilities question their smart-meter data?
Source published
Shared keywords: text to sql