构建了迄今最真实的大规模文本转SQL数据集,提升模型泛化能力。
SQaLe: A Large Text-to-SQL Corpus Grounded in Real Schemas
- 基于真实数据库模式扩展生成半合成数据,保持语义真实性。
- 覆盖13.6万数据库模式,生成51.8万高质量问答-模式-查询三元组。
- 适合研究文本转SQL的模型训练与评估,尤其关注真实场景泛化。
大型语言模型的发展推动了文本转SQL技术的进步,即把自然语言查询转换为有效SQL语句。当前通用文本转SQL模型发展的主要瓶颈在于缺乏大规模、具备足够模式复杂度、查询多样性及领域覆盖的数据集。我们提出SQaLe:一个基于135,875个真实数据库模式(源自SchemaPile)扩展的大规模半合成文本转SQL数据集。通过设计系统化的生成流程——包括模式采样、问题合成与SQL构造——我们生成了517,676个高质量的(问题,模式,查询)三元组。该数据集捕捉了真实的模式大小变化、多样的查询模式和自然语言歧义,同时保证查询执行有效性。我们对数据集内容与特性进行了分析,发现相比现有基准,SQaLe是目前最接近真实场景的大规模文本转SQL数据集。本文讨论了其在推动文本转SQL研究中数据规模化与模型泛化方面的潜力。数据集可访问:https://huggingface.co/datasets/trl-lab/SQaLe-text-to-SQL-dataset。
原文摘要 · Abstract (English)
Advances in large language models have accelerated progress in text-to-SQL, methods for converting natural language queries into valid SQL queries. A key bottleneck for developing generalizable text-to-SQL models is the lack of large-scale datasets with sufficient schema and query complexity, domain coverage, and task diversity. We introduce SQaLe: a large-scale semi-synthetic text-to-SQL dataset built on 135,875 relational database schemas expanded from a collection of real-world schemas, SchemaPile. We establish a principled generation pipeline which combines schema sampling, question synthesis, and SQL construction, and produce 517,676 high-quality (question, schema, query) triples. The SQaLe dataset captures realistic schema size variability, diverse query patterns, and natural language ambiguity while maintaining execution validity. We provide an analysis of its contents and characteristics, and find that SQaLe introduces the most realistic large-scale text-to-SQL dataset to date in comparison with existing benchmarks and datasets. We discuss how SQaLe enables our vision for data scaling and model generalization in text-to-SQL research. The dataset is accessible at: https://huggingface.co/datasets/trl-lab/SQaLe-text-to-SQL-dataset.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。