Text-to-SQL, which involves translating natural language into Structured Query Language (SQL), is crucial for enabling broad access to structured databases without expert knowledge. However, designing models for such tasks is challenging due to numerous factors, including the presence of 'noise,' such as ambiguous questions and syntactical errors. This study provides an in-depth analysis of the distribution and types of noise in the widely used BIRD-Bench benchmark and the impact of noise on models. While BIRD-Bench was created to model dirty and noisy database values, it was not created to contain noise and errors in the questions and gold queries. We found that noise in questions and gold queries are prevalent in the dataset, with varying amounts across domains, and with an uneven distribution between noise types. The presence of incorrect gold SQL queries, which then generate incorrect gold answers, has a significant impact on the benchmark's reliability. Surprisingly, when evaluating models on corrected SQL queries, zero-shot baselines surpassed the performance of state-of-the-art prompting methods. We conclude that informative noise labels and reliable benchmarks are crucial to developing new Text-to-SQL methods that can handle varying types of noise.
翻译:文本到SQL(将自然语言转换为结构化查询语言)对于让非专业人士便捷访问结构化数据库至关重要。然而,由于多种因素(包括歧义问题和语法错误等“噪声”的存在),设计此类任务模型具有挑战性。本研究深入分析了广泛使用的BIRD-Bench基准测试中噪声的分布和类型,以及噪声对模型的影响。虽然BIRD-Bench旨在模拟脏乱和含噪声的数据库值,但其并未设计为包含问题和金标准查询中的噪声与错误。我们发现,数据集中问题和金标准查询中的噪声普遍存在,且不同领域的噪声量各异,噪声类型分布不均。不正确的金标准SQL查询(进而生成错误的金标准答案)严重影响了基准测试的可靠性。令人意外的是,当使用修正后的SQL查询评估模型时,零样本基线方法的表现超越了最先进的提示方法。我们得出结论:信息丰富的噪声标签和可靠的基准测试对于开发能处理多种噪声类型的新文本到SQL方法至关重要。