SynSQL: 为文本到SQL系统的稳健评估合成关系数据库
SynSQL: Synthesizing Relational Databases for Robust Evaluation of Text-to-SQL Systems
AI总结:
SynSQL通过合成语义一致的关系数据库,揭示了文本到SQL系统在固定基准数据库外的性能下降,为研究LLM的结构化数据合成能力提供新视角。
摘要:
评估文本到SQL系统仍存在脆弱性:正确性通常通过在单一静态数据库上执行预测和黄金SQL查询来判断,尽管相同查询在不同数据库实例下可能表现不同。这引发了一个更广泛的语言建模问题:大型语言模型能否直接从自然语言问题生成语义有意义且模式一致的关系数据?如果可以,此类生成可作为应力测试文本到SQL系统的控制机制,超越固定基准数据库。我们介绍了SynSQL,一个基于问题-模式对齐合成测试数据库的框架,而非黄金SQL查询。SynSQL将任务分解为三个阶段:(1) 模式选择,(2) 问题引导的数据合成,(3) 带有约束的批判与迭代完善,将数据库构建视为在语义和关系约束下的结构化生成。在Spider、BIRD和Spider 2.0上的十种文本到SQL模型中,SynSQL生成的数据库显示出与静态评估相比性能下降3-14%,揭示了被基准艺术掩藏的错误。我们进一步分析了生成质量、约束遵守和失败模式,突显了LLM在结构化数据合成中的潜力和局限性。我们的发现将合成数据库生成定位为研究LLM推理、可控性和结构化环境鲁棒性的新视角。
英文摘要:
Evaluating text-to-SQL systems remains largely fragile: correctness is typically judged by executing predicted and gold SQL queries on a single static database, even though the same queries may behave differently under alternative database instances. This raises a broader language modeling question: Can large language models synthesize semantically meaningful, schema-consistent relational data directly from a natural language question? If so, such generation can serve as a controlled mechanism for stress-testing text-to-SQL systems beyond fixed benchmark databases. We introduce SynSQL, a framework that synthesizes test databases conditioned on question-schema alignment rather than gold SQL queries. SynSQL decomposes the task into three stages: (1) schema selection, (2) question-guided data synthesis, and (3) constraint-aware critique with iterative refinement, framing database construction as structured generation under semantic and relational constraints. Across ten text-to-SQL models on Spider, BIRD, and Spider 2.0, SynSQL-generated databases reveal performance drops of 3-14% compared to static evaluation, exposing errors masked by benchmark artifacts. We further analyze generation quality, constraint adherence, and failure modes, highlighting both the promise and limitations of LLMs in structured data synthesis. Our findings position synthetic database generation as a new lens for studying LLM reasoning, controllability, and robustness in structured environments.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。