Know What I don't Know:处理Text-to-SQL中的歧义和不可回答问题
Know What I don't Know: Handling Ambiguous and Unanswerable Questions for Text-to-SQL
AI总结:
针对text-to-SQL无法处理歧义和不可回答问题,研究总结了6类特征并提出反事实示例生成方法与弱监督DTE模型,实现错误检测、定位与解释,在真实和生成示例上均取得最佳效果。
摘要:
text-to-SQL任务旨在关系表的上下文中,将自然语言问题转换为相应的SQL查询。现有的text-to-SQL解析器会为任意用户问题生成一个“看似合理”的SQL查询,从而无法正确处理有问题的用户问题。为了将这一问题形式化,我们对text-to-SQL中观察到的歧义和无法回答的案例进行了初步研究,并将其总结为6个特征类别。相应地,我们找出了每个类别背后的原因,并提出了处理歧义和无法回答问题的要求。基于此项研究,我们提出了一种简单而有效的反事实示例生成方法,可自动生成歧义和无法回答的text-to-SQL示例。此外,我们提出了一种弱监督的DTE(Detecting-Then-Explaining,先检测后解释)模型,用于错误检测、定位和解释。实验结果表明,与各种基线相比,我们的模型在真实世界示例和生成示例上均取得了最佳结果。我们在以下网址发布了我们的数据和代码:https://github.com/wbbeyourself/DTE。
英文摘要:
The task of text-to-SQL aims to convert a natural language question into its corresponding SQL query within the context of relational tables. Existing text-to-SQL parsers generate a "plausible" SQL query for an arbitrary user question, thereby failing to correctly handle problematic user questions. To formalize this problem, we conduct a preliminary study on the observed ambiguous and unanswerable cases in text-to-SQL and summarize them into 6 feature categories. Correspondingly, we identify the causes behind each category and propose requirements for handling ambiguous and unanswerable questions. Following this study, we propose a simple yet effective counterfactual example generation approach that automatically produces ambiguous and unanswerable text-to-SQL examples. Furthermore, we propose a weakly supervised DTE (Detecting-Then-Explaining) model for error detection, localization, and explanation. Experimental results show that our model achieves the best result on both real-world examples and generated examples compared with various baselines. We release our data and code at: \href{https://github.com/wbbeyourself/DTE}{https://github.com/wbbeyourself/DTE}.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。