arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.08018cs.AI
收藏

UniQL:迈向方言通用的文本到SQL基准测试

UniQL: Towards Dialect-Universal Benchmarking for Text-to-SQL

SKLCCSE, Beihang University(北京航空航天大学软件开发环境国家重点实验室);The University of Hong Kong(香港大学)

Jianling Gao, Chongyang Tao, Jiayuan Bai, Liu Yang, Xuanguang Pan, Jinrui Liu, Shihao Xing, Xiaohan Xu, Jie Liang, Shuai Ma

AI总结:

提出UniQL基准,通过跨16种SQL方言的对齐标注,评估模型在不同数据库系统间的泛化能力,揭示现有模型在方言通用性上的不足。

摘要:

现有的文本到SQL基准测试主要集中在SQLite上,这使得评估模型能否跨异构SQL方言泛化变得困难。然而,现实世界的数据库系统在语法、函数、类型系统和执行语义上存在显著差异,因此相同的自然语言意图通常需要特定方言的SQL实现。我们引入了UniQL,一个用于跨方言文本到SQL评估的人工验证基准。UniQL将1,534个自然语言问题与16种SQL方言的可执行SQL注释对齐,产生了24,544个方言特定的查询。所有方言共享相同的意图、对齐的模式和数据库内容,从而实现了对方言泛化的可控评估。UniQL通过一个混合流水线构建,结合了数据库迁移、SQL翻译、执行引导验证、迭代规则总结和人工验证。在开源和闭源LLM上的实验表明,当前模型远未达到方言通用,在不同数据库系统间性能差异显著,且从SQLite成功到其他方言的迁移有限。这些发现凸显了对齐的跨方言基准和更注重方言的文本到SQL方法的必要性。代码和数据可在https://github.com/JerryGao818/UniQL获取。

英文摘要:

Existing text-to-SQL benchmarks are largely centered on SQLite, making it difficult to evaluate whether models can generalize across heterogeneous SQL dialects. However, real-world database systems differ substantially in syntax, functions, type systems, and execution semantics, so the same natural language intent often requires dialect-specific SQL realizations. We introduce UniQL, a human-verified benchmark for cross-dialect text-to-SQL evaluation. UniQL aligns 1,534 natural language questions with executable SQL annotations across 16 SQL dialects, yielding 24,544 dialect-specific queries. All dialects share the same intents, aligned schemas and database contents, enabling controlled evaluation of dialect generalization. UniQL is constructed through a hybrid pipeline combining database migration, SQL translation, execution-guided verification, iterative rule summarization, and human validation. Experiments on both open-source and closed-source LLMs show that current models remain far from dialect-universal, with substantial performance variation across database systems and limited transfer from SQLite success to other dialects. These findings highlight the need for aligned cross-dialect benchmarks and more dialect-aware text-to-SQL methods. Code and data are available at https://github.com/JerryGao818/UniQL

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

↑