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

通过人类与大语言模型协同数据标注实现Text-to-SQL领域自适应

Text-to-SQL Domain Adaptation via Human-LLM Collaborative Data Annotation

Purdue University(普渡大学);Adobe Inc.(Adobe公司)

Yuan Tian, Daniel Lee, Fei Wu, Tung Mai, Kun Qian, Siddhartha Sahai, Tianyi Zhang, Yunyao Li

AI总结:

针对Text-to-SQL模型适配新数据库模式时领域标注数据稀缺、获取成本高的问题,提出人-LLM协同标注系统SQLsynth,可高效生成更高质量的标注数据集。

摘要:

可将自然语言问题解析为可执行SQL查询的Text-to-SQL模型,正越来越多地应用于真实场景中。但在实际部署这类模型时,往往需要让其适配特定应用所使用的高度专业化数据库模式。我们发现,现有Text-to-SQL模型应用于新模式时性能会出现显著下降,核心原因是缺少用于微调的领域特定数据,这种数据稀缺问题同时也限制了在新领域中有效评估模型性能的能力。在真实场景中,为持续演进的数据库模式持续获取高质量Text-to-SQL数据的成本高到难以承受。为填补这一缺口,我们提出了人在回路的Text-to-SQL数据标注系统SQLsynth,它通过结构化工作流中的人类与大语言模型协作,简化高质量Text-to-SQL数据集的构建流程。一项将SQLsynth与人工标注、ChatGPT进行对比的被试内用户研究显示,SQLsynth可显著加快Text-to-SQL数据标注速度、降低认知负荷,且生成的数据集准确性更高、更自然、多样性更强。我们的代码可在https://github.com/magic-YuanTian/SQLsynth获取。

英文摘要:

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.

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

↑