Interactive Text-to-SQL via Expected Information Gain for Disambiguation

Luyu Qiu, Jianing Li, Chi Su, Lei Chen · 2025

Read Interactive Text-to-SQL via Expected Information Gain for Disambiguation by Luyu Qiu, Jianing Li, Chi Su, Lei Chen (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2507-06467.txt.

Introduction

Luyu Qiu, Jianing Li, Chi Su, and Lei Chen build a database helper that asks before it guesses, in a 2025 paper. Turning plain questions into database code trips on vague wording: one phrase can mean several queries. Most tools bet on one reading at once and risk a wrong answer. This system keeps a spread of candidate queries, each with a chance weight, and talks with the user to thin the spread.

At each step it picks the fork where a question would teach it the most. That pick follows a classic rule that weighs how much a reply should cut the doubt on average. The user answers, the spread updates, and the code firms up. The authors say the back-and-forth suits real business data, where terms are loose and the cost of a wrong table is high. The frame turns guessing into guided choice.

Catalog record

CREATORLuyu Qiu, Jianing Li, Chi Su, Lei Chen
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE57 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2507-06467

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Interactive Text-to-SQL via Expected Information Gain for Disambiguation Luyu Qiu, Jianing Li, Chi Su, Lei Chen Abstract . Relational databases are foundational to numerous domains, including business intelligence, scientific research, and enterprise systems. However, accessing and analyzing structured data often requires proficiency in SQL, which is a skill that many end users lack. With the development of Natural Language Processing (NLP) technology, the Text-to-SQL systems attempt to bridge this gap by translating natural language questions into executable SQL queries via an automated algorithm. Yet, when operating on complex real-world databases, the Text-to-SQL systems often suffer from ambiguity due to natural ambiguity in natural language queries. These ambiguities pose a significant challenge for existing Text-to-SQL translation systems, which tend to commit early to a potentially incorrect interpretation. To address this, we propose an interactive Text-to-SQL framework that models SQL generation as a probabilistic reasoning process over multiple candidate queries. Rather than producing a single deterministic output, our system maintains a distribution over possible SQL outputs and seeks to resolve uncertainty through user interaction. At each interaction step, the system selects a branching decision and formulates a clarification question aimed at disambiguating that aspect of the query. Crucially, we adopt a principled decision criterion based on Expected Information Gain to identify the clarification that will, in expectation, most reduce the uncertainty in the SQL distribution. This strategy enables globally optimal disambiguation, leading to more accurate and robust query generation with minimal user effort. Moreover, it ensures that each interaction step is interpretable and targeted, enhancing user trust and transparency. Our method aligns with recent advances in interactive and uncertainty-aware semantic parsing and offers a flexible framework adaptable to various real-world datasets and application scenarios. Empirical evaluations demonstrate that our approach significantly improves query accuracy in ambiguous settings while requiring fewer interactions than baselines. † † authors: . PVLDB Reference Format: PVLDB, 14(1): XXX-XXX, 2020. doi:XX.XX/XXX.XX † † This work is licensed under the Creative Commons BY-NC-ND 4.0 International License. Visit https://creativecommons.org/licenses/by-nc-nd/4.0/ to view a copy of this license. For any use beyond those covered by this license, obtain permission by emailing [email protected] . Copyright is held by the owner/author(s). Publication rights licensed to the VLDB Endowment. Proceedings of the VLDB Endowment, Vol. 14, No. 1 ISSN 2150-8097. doi:XX.XX/XXX.XX PVLDB Artifact Availability: The source code, data, and/or other artifacts have been made available at URL_TO_YOUR_ARTIFACTS . 1. Introduction Figure 1. Illustration of the (a) Text-to-SQL system, and (b) the ambiguity from the natural language query. 1.1. Natural Language as a Bridge to Databases Natural language interfaces serve as a transformative bridge, substantially lowering the barrier for non-expert users who seek to engage with relational databases and perform sophisticated data analysis tasks. The fundamental appeal of these interfaces lies in their intuitive simplicity—users communicate their analytical queries using everyday language, thereby bypassing the need for proficiency in structured query languages such as SQL. Driven by this vision, Text-to-SQL systems ( Zhong et al. 2017 ; Sutskever et al. 2014 ; Choi et al. 2021 ) automate the translation of natural language questions into executable SQL queries, democratizing data access and fostering widespread analytical empowerment. Recent advancements in this area, particularly those leveraging large language models (LLMs), have significantly accelerated progress. Notably, state-of-the-art systems now reach execution accuracy as high as 86.6% on widely recognized benchmarks like Spider ( Gao et al. 2023 ; Yu et al. 2018 ) , as illustrated in Fig. 1 (a). 1.2. User Intent, Linguistic Expression, and Ambiguity Despite impressive empirical performance demonstrated by current Text-to-SQL systems, fundamental challenges persist when deploying these methods in practical, real-world scenarios. At the core, Text-to-SQL translation is not merely a linguistic or syntactic conversion task; it is fundamentally about accurately capturing and translating a user’s underlying analytical intent into structured queries. Conceptually, this translation process involves two critical stages: first, users mentally formulate an analytical intention; second, they express this intention using natural language. Most existing Text-to-SQL methodologies predominantly address the second stage—translating the provided natural language into SQL queries—implicitly assuming that the natural language expression completely and unambiguously conveys the user’s original intent. However, this assumption is inherently problematic. Human analytical intentions are often nuanced, context-dependent, and less precise than their linguistic expressions suggest. Natural language, while expressive and flexible, frequently contains ambiguity, underspecification, and implicit contextual dependencies that can obscure the user’s true analytical goals. Consequently, even a flawless translation of a natural language query into SQL becomes inadequate if the original linguistic query does not sufficiently encapsulate or clearly represent the user’s intended meaning. Addressing the translation process alone, without explicitly recognizing and managing these inherent ambiguities, is insufficient for achieving genuinely accurate and user-aligned query generation in realistic settings. 1.3. Practical Limitations of Existing Text-to-SQL Systems Acknowledging this deeper philosophical limitation highlights two specific and interrelated practical challenges that constrain the effectiveness of current Text-to-SQL systems in realistic deployments. Firstly, existing large language models, although powerful, are predominantly trained on generic, web-scale corpora in which SQL knowledge is underrepresented. As evidenced by language usage statistics on platforms such as GitHub, SQL constitutes only a minor fraction of programming data compared to dominant languages like Python. This skewed distribution significantly limits the ability of these models to adequately reason about relational schema, grasp SQL-specific semantics deeply, or robustly generalize to the diverse and complex scenarios commonly encountered in practical database queries. Secondly, and more fundamentally, is the semantic ambiguity intrinsic to user-generated natural language questions ( Bhaskar et al. 2023 ; Dong et al. 2024 ; Wang et al. 2023 ) . Practical analytical queries posed by users routinely support multiple valid interpretations. For example, a seemingly straightforward request such as “List new employees" may implicitly refer to those hired in the last week, the current quarter, or a user-defined interval. Without explicit clarification, purely linguistic models relying solely on textual cues are inherently ill-equipped to disambiguate such uncertainties, frequently producing results misaligned with users’ true analytical intentions. 1.4. Semantic Ambiguity and User Intent The ambiguity discussed here is particularly prevalent and problematic in real-world analytical contexts. Unlike schema-related ambiguity arising from database structures, we explicitly address semantic ambiguity embedded within the natural language itself, as depicted in Fig. 1 (b) and further illustrated by Fig. 2 . Such semantic ambiguity manifests through: • Temporal expressions lacking explicit reference points ( e.g. , “after 2020," “recent hires"), • Pronouns and noun phrases with multiple plausible referents ( e.g. , “her department"), • Vague qualitative descriptors ( e.g. , “top employees" without defined ranking criteria). Consider the illustrative query, “Show me the top performers from last year." Here, semantic uncertainty arises from both temporal and evaluative ambiguity: “last year" may vary in interpretation relative to the current date, fiscal year, or timestamps embedded within the data; simultaneously, “top performers" could imply multiple evaluation metrics, including sales volume, performance ratings, or customer satisfaction scores. Figure 2. Illustration of candidate branches. When faced with these ambiguities, conventional Text-to-SQL systems typically generate a singular, deterministic output ( Pilault et al. 2023 ; Li et al. 2022 ; Futeral et al. 2022 ) , often yielding incorrect or unintended results. Such outcomes not only degrade system accuracy but also undermine users’ trust, particularly when the

Read the complete text