The demand for high-fidelity test data is paramount in industrial settings where access to production data is largely restricted. Traditional data generation methods often fall short, struggling with low-fidelity and the ability to model complex data structures and semantic relationships that are critical for testing complex SQL code generation services like Natural Language to SQL (NL2SQL). In this paper, we address the critical need for generating syntactically correct and semantically relevant high-fidelity mock data for complex data structures that includes columns with nested structures that we frequently encounter in Google workloads. We highlight the limitations of existing approaches used in production, particularly their inability to handle large and complex data structures, as well as the lack of semantically coherent test data that lead to limited test coverage. We demonstrate that by leveraging Large Language Models (LLMs) and incorporating strategic pre- and post-processing steps, we can generate syntactically correct and semantically relevant high-fidelity test data that adheres to complex structural constraints and maintains semantic integrity to the SQL test targets (queries/functions). This approach supports comprehensive testing of complex SQL queries involving joins, aggregations, and even deeply nested subqueries, ensuring robust evaluation of SQL code generation services, like NL2SQL and SQL Code Assistant. Our results demonstrate the practical utility of an LLM (\textit{Gemini}) based test data generation for industrial SQL code generation services where generating high-fidelity test data is essential due to the frequent unavailability and inaccessibility of production datasets for testing.


翻译:在工业环境中,由于生产数据的访问受到严格限制,对高保真测试数据的需求至关重要。传统的数据生成方法往往存在不足,难以实现高保真度,且无法有效建模复杂数据结构和语义关系,而这些对于测试诸如自然语言转SQL(NL2SQL)等复杂SQL代码生成服务至关重要。本文针对为复杂数据结构生成语法正确且语义相关的高保真模拟数据这一关键需求展开研究,这些复杂数据结构包含我们在谷歌工作负载中经常遇到的具有嵌套结构的列。我们重点指出了生产环境中现有方法的局限性,特别是其处理大型复杂数据结构的能力不足,以及缺乏语义连贯的测试数据,从而导致测试覆盖率有限。我们证明,通过利用大型语言模型(LLMs)并结合策略性的预处理和后处理步骤,我们能够生成语法正确且语义相关的高保真测试数据,这些数据遵循复杂的结构约束,并保持与SQL测试目标(查询/函数)的语义完整性。该方法支持对涉及连接、聚合甚至深度嵌套子查询的复杂SQL查询进行全面测试,从而确保对NL2SQL和SQL代码助手等SQL代码生成服务进行稳健评估。我们的结果证明了基于LLM(\textit{Gemini})的测试数据生成对于工业SQL代码生成服务的实际效用,在这些服务中,由于生产数据集经常无法用于测试或难以获取,生成高保真测试数据至关重要。

0
下载
关闭预览

相关内容

SQL 全名是结构化查询语言,是用于数据库中的标准数据查询语言,IBM 公司最早使用在其开发的数据库系统中。
谷歌最新《大语言模型合成数据的最佳实践和经验教训》
「基于深度学习的 SQL 生成」2022研究综述
专知会员服务
28+阅读 · 2022年8月12日
高效的文本生成方法 — LaserTagger 现已开源
TensorFlow
30+阅读 · 2020年2月27日
【大数据】海量数据分析能力形成和大数据关键技术
产业智能官
17+阅读 · 2018年10月29日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
VIP会员
最新内容
超越网格:作战环境对炮兵的影响
专知会员服务
1+阅读 · 今天15:35
KDD 2026 | MixRAGRec:面向LLM推荐的混合专家KG-RAG框架
BES:让语言模型通过双向进化搜索自我改进
专知会员服务
4+阅读 · 5月30日
以色列-美国-伊朗战争中的无人机:关键要点
专知会员服务
4+阅读 · 5月30日
《Palantir任务保障性软件安全标准(MA-S2)》
专知会员服务
14+阅读 · 5月30日
基于声学的无人机检测技术综述
专知会员服务
8+阅读 · 5月30日
《当代混合战争分析框架:俄乌战争经验教训》
相关VIP内容
谷歌最新《大语言模型合成数据的最佳实践和经验教训》
「基于深度学习的 SQL 生成」2022研究综述
专知会员服务
28+阅读 · 2022年8月12日
相关基金
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员