zikele

zikele

人生如此自可乐

AmbiSQL:文本到SQL的交互式歧义检测与解决

2508.15276v1

中文标题#

AmbiSQL:文本到 SQL 的交互式歧义检测与解决

英文标题#

AmbiSQL: Interactive Ambiguity Detection and Resolution for Text-to-SQL

中文摘要#

文本到 SQL 系统将自然语言问题转换为 SQL 查询,为非专家用户提供重要价值。 虽然大型语言模型(LLMs)在此任务中表现出有希望的结果,但它们仍然容易出错。 查询歧义已被认为是基于 LLM 的文本到 SQL 系统的主要障碍,导致用户意图的误解和不准确的 SQL 生成。 我们展示了 AmbiSQL,一个交互式系统,能够自动检测查询歧义,并通过直观的多选问题引导用户澄清其意图。 我们的方法引入了一个细粒度的歧义分类法,用于识别影响数据库元素映射和 LLM 推理的歧义,然后结合用户反馈重写模糊问题。 在模糊查询数据集上的评估表明,AmbiSQL 在歧义检测中的精度达到 87.2%,当与文本到 SQL 系统集成时,SQL 精确匹配准确率提高了 50%。 我们的演示展示了显著的性能提升,并突出了系统的实用性。 代码仓库和演示可在以下地址获取:https://github.com/JustinzjDing/AmbiSQL.

英文摘要#

Text-to-SQL systems translate natural language questions into SQL queries, providing substantial value for non-expert users. While large language models (LLMs) show promising results for this task, they remain error-prone. Query ambiguity has been recognized as a major obstacle for LLM-based Text-to-SQL systems, leading to misinterpretation of user intent and inaccurate SQL generation. We demonstrate AmbiSQL, an interactive system that automatically detects query ambiguities and guides users through intuitive multiple-choice questions to clarify their intent. Our approach introduces a fine-grained ambiguity taxonomy for identifying ambiguities that affect database element mapping and LLM reasoning, then incorporates user feedback to rewrite ambiguous questions. Evaluation on an ambiguous query dataset shows that AmbiSQL achieves 87.2% precision in ambiguity detection and improves SQL exact match accuracy by 50% when integrated with Text-to-SQL systems. Our demonstration showcases the significant performance gains and highlights the system's practical usability. Code repo and demonstration are available at: https://github.com/JustinzjDing/AmbiSQL.

文章页面#

AmbiSQL:文本到 SQL 的交互式歧义检测与解决

PDF 获取#

查看中文 PDF - 2508.15276v1

智能达人抖店二维码

抖音扫码查看更多精彩内容

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.