arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.02038cs.CLcs.AIcs.DB
收藏

BEAVER:一个企业文本到SQL基准测试

BEAVER: An Enterprise Benchmark for Text-to-SQL

MIT(麻省理工学院);Harvard University(哈佛大学);Greenshoe, Inc.(Greenshoe公司)

Peter Baile Chen, Devin Yang, Weiyue Li, Fabian Wenz, Yi Zhang, Nesime Tatbul, Michael Cafarella, Çağatay Demiralp, Michael Stonebraker

AI总结:

BEAVER是首个基于企业私有数据仓库构建的文本到SQL基准测试,包含9128个问题-SQL对和19个领域的812张表,通过合成高质量查询和细粒度评估方法,揭示了现有模型在复杂企业场景下的性能差距。

摘要:

现有文本到SQL基准测试大多基于公开数据库,具有结构化模式和简单的问-SQL对。尽管大语言模型(LLMs)在这些设置中表现优异,但其在复杂私人企业环境中的有效性尚未得到验证,这些环境具有复杂的模式、领域知识和涉及复杂结构和函数的分析用户查询。为弥合这一差距,我们引入BEAVER,首个基于私人数据仓库的文本到SQL基准测试。它包含9128个问题-SQL对,来源于真实世界查询日志和19个不同领域的812张表。构建此基准测试具有挑战性,因为(1)企业查询日志稀缺,由于隐私限制;(2)现有基于准确率的全部或无全部评估度量使错误诊断困难--尤其是在生成正确查询时需要解决多个复合挑战,如领域知识和查询复杂性。我们从两个层面解决这些问题。在数据集层面,我们合成高保真、专家验证的查询,增加数据集大小并隔离个体挑战或组合它们,生成专注于领域知识、查询复杂性和两者的查询。在评估层面,我们为五个关键子任务提供人工注释和评估度量,以实现细粒度分析。我们的评估揭示了与现有基准相比的显著性能差距:使用先进模型GPT-5.2的SOTA代理框架仅达到10.8%的准确率。当提供所有子任务注释作为oracle提示时,准确率增加到30.1%,证实主要瓶颈在于正确解决这些子任务。最后,我们提供残余误差的分类,即使在子任务提示下仍存在特定挑战,如使用高级函数。

英文摘要:

Existing text-to-SQL benchmarks have largely been constructed from public databases with well-structured schemas and simplistic question-SQL pairs. While large language models (LLMs) excel on these settings, their efficacy in complex private enterprise environments, characterized by intricate schemas, domain knowledge, and analytical user queries involving sophisticated structures and functions, remains unproven. To bridge this gap, we introduce BEAVER, the first text-to-SQL benchmark derived from private data warehouses. It comprises 9128 question-SQL pairs sourced from real-world query logs and 812 tables across 19 diverse domains. Building this benchmark is challenging because (1) enterprise query logs are scarce due to privacy constraints, and (2) existing all-or-nothing evaluation metrics based on accuracy make error diagnosis difficult -- especially when producing a correct query involves solving multiple compounded challenges, such as domain knowledge and query complexity. We address these issues at two levels. At the dataset level, we synthesize high-fidelity, expert-verified queries that increase dataset size and isolate individual challenges or combine them, producing queries focused on domain knowledge, query complexity, and both. At the evaluation level, we provide human annotations and evaluation metrics for five critical subtasks to enable fine-grained analysis. Our evaluation reveals a significant performance gap compared to existing benchmarks: SOTA agentic frameworks using the advanced model GPT-5.2 achieve only 10.8% accuracy. When provided with all subtask annotations as oracle hints, accuracy increases to 30.1%, confirming that a major bottleneck lies in correctly resolving these subtasks. Finally, we provide a taxonomy of the residual errors that persist even with subtask hints, identifying specific challenges such as the use of advanced functions.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑