ARCS:通过结构化消歧实现精准的文本到SQL
研究论文 · 2026/10/13
随着文本到SQL系统从演示走向实际部署,用户问题中的歧义成为主要错误来源。这些歧义通常微妙、特定于领域或数据,并可能悄无声息地导致系统输出偏离用户真实意图。传统上通过对话澄清来解决歧义,但这种方式效率低、认知负担重,且与实际用户工作流程不匹配。我们提出结构化消歧,一种通过显式、受限交互而非自由对话来解决歧义的新范式。我们构建了ARCS(SQL歧义消解语料库),这是首个针对真实数据库上自然出现、无约束歧义的文本到SQL基准,完整标注了所有有效歧义点、解释和SQL查询。实验结果表明,存在歧义时文本到SQL仍然具有挑战性:gpt-6-sol仅达到51%的端到端执行准确率,且没有开源模型超过27%。
该研究针对文本到SQL实际部署中的关键瓶颈——用户问题歧义,提出了结构化消歧新范式并构建了首个真实场景基准ARCS,实验表明现有模型在歧义下性能大幅下降,为未来研究指明了重要方向。
As text-to-SQL systems move beyond demonstrations toward real-world deployment, ambiguity in user questions becomes a primary source of errors. Such ambiguities are often subtle, domain- or data-specific, and can silently cause system outputs to deviate from the user's true intent. Ambiguity is traditionally addressed through conversational clarification, which is often inefficient, cognitively demanding, and poorly aligned with real-world user workflows. We propose structured disambiguation, a new paradigm in which ambiguity is resolved through explicit, constrained interactions rather than free-form dialogue. We construct ARCS (Ambiguity Resolution Corpus for SQL), the first text-to-SQL benchmark featuring naturally occurring, unconstrained ambiguities over real-world databases, with complete annotations of all valid ambiguity points, interpretations, and SQL queries. Experimental results show that text-to-SQL remains challenging in the presence of ambiguity: gpt-6-sol achieves only 51% end-to-end execution accuracy, and no open-source model exceeds 27%.