用反向翻译验证生成的SQL是否符合用户意图,提升文本转SQL准确率。
GBV-SQL: Guided Generation and SQL2Text Back-Translation Validation for Multi-Agent Text2SQL
- 引入多智能体框架,通过将SQL还原为自然语言来验证语义一致性。
- 在BIRD上提升至63.23%执行准确率,去除非标准数据后Spider达97.6%。
- 揭示基准数据普遍存在“金标错误”,强调数据清洗对评估的重要性。
尽管大语言模型显著推进了文本转SQL任务,但语法正确的查询常偏离用户意图,存在关键语义鸿沟。为此,我们提出GBV-SQL,一种新型多智能体框架,采用带SQL2Text反向翻译验证的引导生成机制。该机制由专用智能体将生成的SQL还原为自然语言,以检验其与原问题的逻辑一致性。研究发现,当前评估受系统性问题干扰:基准数据本身质量不佳。我们提出“金标错误”正式分类,揭示其普遍性并掩盖真实模型性能。在挑战性BIRD基准上,GBV-SQL实现63.23%执行准确率,绝对提升5.8%;去除有缺陷样本后,在Spider上开发集达96.5%,测试集达97.6%。本工作既提供稳健的语义验证框架,也提出对基准完整性的重要反思,呼吁更严格的语料库构建。
原文摘要 · Abstract (English)
While Large Language Models have significantly advanced Text2SQL generation, a critical semantic gap persists where syntactically valid queries often misinterpret user intent. To mitigate this challenge, we propose GBV-SQL, a novel multi-agent framework that introduces Guided Generation with SQL2Text Back-translation Validation. This mechanism uses a specialized agent to translate the generated SQL back into natural language, which verifies its logical alignment with the original question. Critically, our investigation reveals that current evaluation is undermined by a systemic issue: the poor quality of the benchmarks themselves. We introduce a formal typology for "Gold Errors", which are pervasive flaws in the ground-truth data, and demonstrate how they obscure true model performance. On the challenging BIRD benchmark, GBV-SQL achieves 63.23% execution accuracy, a 5.8% absolute improvement. After removing flawed examples, GBV-SQL achieves 96.5% (dev) and 97.6% (test) execution accuracy on the Spider benchmark. Our work offers both a robust framework for semantic validation and a critical perspective on benchmark integrity, highlighting the need for more rigorous dataset curation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。