Text-to-SQL models, which parse natural language (NL) questions to executable SQL queries, are increasingly adopted in real-world applications. However, deploying such models in the real world often requires adapting them to the highly specialized database schemas used in specific applications. We find that existing text-to-SQL models experience significant performance drops when applied to new schemas, primarily due to the lack of domain-specific data for fine-tuning. This data scarcity also limits the ability to effectively evaluate model performance in new domains. Continuously obtaining high-quality text-to-SQL data for evolving schemas is prohibitively expensive in real-world scenarios. To bridge this gap, we propose SQLsynth, a human-in-the-loop text-to-SQL data annotation system. SQLsynth streamlines the creation of high-quality text-to-SQL datasets through human-LLM collaboration in a structured workflow. A within-subjects user study comparing SQLsynth with manual annotation and ChatGPT shows that SQLsynth significantly accelerates text-to-SQL data annotation, reduces cognitive load, and produces datasets that are more accurate, natural, and diverse. Our code is available at https://github.com/magic-YuanTian/SQLsynth.


翻译:文本到SQL模型能够将自然语言问题解析为可执行的SQL查询,在现实应用中的采用日益广泛。然而,在实际部署中,此类模型通常需要适配特定应用场景中高度专业化的数据库模式。我们发现,现有文本到SQL模型应用于新数据库模式时性能显著下降,主要原因是缺乏用于微调的领域特定数据。这种数据稀缺性也限制了在新领域有效评估模型性能的能力。在现实场景中,持续为动态演化的数据库模式获取高质量的文本到SQL数据成本极其高昂。为弥补这一差距,我们提出了SQLsynth——一种人机协同的文本到SQL数据标注系统。SQLsynth通过结构化工作流程中人类与大语言模型的协作,实现了高质量文本到SQL数据集的快速构建。通过对比SQLsynth与人工标注及ChatGPT的受试者内用户研究表明,SQLsynth能显著加速文本到SQL数据标注流程,降低认知负荷,并生成更准确、自然且多样化的数据集。我们的代码已发布于https://github.com/magic-YuanTian/SQLsynth。

0
下载
关闭预览

相关内容

SQL 全名是结构化查询语言,是用于数据库中的标准数据查询语言,IBM 公司最早使用在其开发的数据库系统中。
图增强生成(GraphRAG)
专知会员服务
34+阅读 · 2025年1月4日
【WWW2024】GraphPro:推荐系统中的图预训练与提示学习
专知会员服务
23+阅读 · 2024年1月26日
【AAAI2024】使用大型语言模型的生成式多模态知识检索
专知会员服务
58+阅读 · 2024年1月19日
Python分布式计算,171页pdf,Distributed Computing with Python
专知会员服务
108+阅读 · 2020年5月3日
使用 Keras Tuner 调节超参数
TensorFlow
15+阅读 · 2020年2月6日
谷歌推出新型数据增强算法:AutoAugment
论智
20+阅读 · 2018年6月6日
语义分割中的深度学习方法全解:从FCN、SegNet到DeepLab
炼数成金订阅号
26+阅读 · 2017年7月10日
MNIST入门:贝叶斯方法
Python程序员
23+阅读 · 2017年7月3日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2013年12月31日
国家自然科学基金
16+阅读 · 2013年12月31日
Arxiv
175+阅读 · 2023年4月20日
A Survey of Large Language Models
Arxiv
499+阅读 · 2023年3月31日
Arxiv
181+阅读 · 2023年3月24日
Arxiv
27+阅读 · 2023年3月17日
VIP会员
相关基金
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2013年12月31日
国家自然科学基金
16+阅读 · 2013年12月31日
Top
微信扫码咨询专知VIP会员