TL;DR
Bridge is a new framework that significantly improves how AI translates natural language into SQL by grounding ambiguity resolution in the actual database schema. By pre-calculating a "Column Ambiguity Graph" offline, it helps Large Language Models (LLMs) identify confusing terms and ask users precise clarification questions, boosting execution accuracy by 11.6% over state-of-the-art baselines.
What Problem Does This Paper Address?
Translating natural language into SQL (Text-to-SQL) is hard because human language is inherently messy and underspecified. If a user asks for "educational level name," does that map to a column for school categories, instruction levels, or option types?
Current interactive systems try to solve this by having an LLM ask the user for clarification. However, these systems usually rely on the LLM’s "parametric knowledge"—essentially its internal best guess—to identify what might be ambiguous. This often leads to the model missing database-specific nuances or asking irrelevant questions, which drives up costs and frustrates users. The authors found that even top-tier systems fail to resolve column-grounding errors over 60% of the time, even after ten rounds of interaction.
Methods
The authors introduce Bridge, a framework that shifts the burden of identifying ambiguity from real-time LLM guesswork to a database-grounded discovery process. It operates in two main stages:
1. Offline Construction
Before any questions are asked, Bridge builds two reusable structures for a database:
- Column Ambiguity Graph (CAG): This graph maps out which columns are likely to be confused with one another. It uses three "views" to find candidates: semantic similarity (meaning), surface-name similarity (lexical overlap), and value-domain collision (overlapping data entries). An LLM then verifies these pairs and writes a "trigger context"—a brief explanation of why these columns might be confused.
- Value Similarity Index: A fast lookup index (using MinHash-LSH) to find similar values across different columns.
2. Online Disambiguation
When a user asks a question and the initial SQL prediction is rejected, Bridge kicks in:
- Dual-Channel Retrieval: It uses the columns and values in the failed SQL as "anchors" to pull relevant alternatives from the CAG and the Value Index.
- Cross-Channel Integration: It filters these alternatives by checking if a retrieved column actually contains the values mentioned in the user's query, pruning away irrelevant noise.
- LLM Detection: Finally, the LLM uses these specific, grounded cues to generate a targeted clarification question (CQ) for the user.
Datasets
The researchers evaluated Bridge using BIRD-dev, a popular and challenging cross-domain Text-to-SQL benchmark. To make the test even harder and more realistic, they excluded the "evidence" (hints) usually provided by the benchmark, forcing the system to rely entirely on its own ambiguity detection logic.
Key Insights and Ideas
- Grounding Over Guesswork: The core "aha moment" is that LLMs are much better at choosing between specific, database-provided alternatives than they are at brainstorming potential ambiguities from scratch.
- The Power of "Trigger Contexts": Simply knowing two columns are related isn't enough. By distilling why they are ambiguous (e.g., "both refer to school categories but use different levels of detail") into the graph, Bridge provides the LLM with the necessary reasoning cues to ask better questions.
- Efficiency via Pruning: By using the initial (incorrect) SQL as an anchor, Bridge avoids overwhelming the LLM with the entire database schema, focusing only on the "neighborhood" of the error.
Key Results
- Accuracy Boost: Bridge achieved 77.38% execution accuracy on BIRD-dev, outperforming the strongest baseline (Sphinteract) by 11.60%.
- Precision in Grounding: The system improved column-linking precision by 12.37%, proving it is much more effective at picking the right database fields.
- Cost Efficiency: Bridge reached higher accuracy in just one turn than the baseline did in ten, significantly reducing the number of tokens (and thus the cost) required for LLM processing.
- Model Agnostic: While it performs best with large models like Qwen-3.5-27B, the database-grounded guidance even helped smaller 4B and 9B models outperform larger baselines that lacked the ambiguity graph.
Limitations and Future Work
The authors note that the Column Ambiguity Graph is currently static. If a database schema changes frequently or the data values shift significantly, the graph and value index would need to be updated. Future work will focus on incremental maintenance—updating only the affected parts of the graph rather than rebuilding it from scratch—to support dynamic, real-world databases.
Summary updated