Lune

SIGMOD2025顶会

Automated Validating and Fixing of Text-to-SQL Translation with Execution Consistency

Yicun Yang, Zhaoguo Wang, Yu Xia, Zhuoran Wei, Haoran Ding, Ruzica Piskac, Haibo Chen, Jinyang Li

摘要

State-of-the-art Text-to-SQL models rely on fine-tuning or few-shot prompting to help LLMs learn from training datasets containing mappings from natural language (NL) queries to SQL statements. Consequently, the quality of the dataset can greatly affect the accuracy of these Text-to-SQL models. Unlike other NL tasks, Text-to-SQL datasets are prone to errors despite extensive manual efforts due to the subtle semantics of SQL. Our study has found a non-negligible (>30%) portion of incorrect NL to SQL mapping cases exists in popular datasets Spider and BIRD. This paper aims to improve the quality of Text-to-SQL training datasets and thereby increase the accuracy of the resulting models. To do so, we propose a necessary correctness condition called execution consistency. For a given database instance, an NL to SQL mapping satisfies execution consistency if the execution result of an NL query matches that of the corresponding SQL. We develop SQLDriller to detect incorrect NL to SQL mappings based on execution consistency in a best-effort manner by crafting database instances that likely result in violations of execution consistency. It generates multiple candidate SQL predictions that differ in their syntax structures. Using a SQL equivalence checker, SQLDriller obtains counterexample database instances that can distinguish non-equivalent candidate SQLs. It then checks the execution consistency of an NL to SQL mapping under this set of counterexamples. The evaluation shows SQLDriller effectively detects and fixes incorrect mappings in the Text-to-SQL dataset, and it improves the model accuracy by up to 13.6%.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 5 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • DIVER: A Robust Text-to-SQL System with Dynamic Interactive Value Linking and Evidence Reasoning 引用了 DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
  • DIVER: A Robust Text-to-SQL System with Dynamic Interactive Value Linking and Evidence Reasoning 引用了 Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation
  • Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation 引用了 Self-Consistency Improves Chain of Thought Reasoning in Language Models
  • Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation 引用了 DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
  • NL2SQLBench: A Modular Benchmarking Framework for LLM-Enabled NL2SQL Solutions 引用了 Self-Consistency Improves Chain of Thought Reasoning in Language Models
  • NL2SQLBench: A Modular Benchmarking Framework for LLM-Enabled NL2SQL Solutions 引用了 DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
  • NL2SQLBench: A Modular Benchmarking Framework for LLM-Enabled NL2SQL Solutions 引用了 A Survey on In-context Learning
  • NL2SQLBench: A Modular Benchmarking Framework for LLM-Enabled NL2SQL Solutions 引用了 Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper5

  1. Beyond Relational: Semantic-Aware Multi-Modal Analytics with LLM-Native Query OptimizationJunhao Zhu, Lu Chen, Xiangyu Ke, Ziquan Fang 等SIGMOD 2026 · 8 次引用
  2. DIVER: A Robust Text-to-SQL System with Dynamic Interactive Value Linking and Evidence ReasoningYafeng Nan, Haifeng Sun, Zirui Zhuang, Qi Qi 等SIGMOD 2026 · 3 次引用
  3. NL2SQLBench: A Modular Benchmarking Framework for LLM-Enabled NL2SQL SolutionsShizheng Hou, Wenqi Pei, Nuo Chen, Quang-Trung Ta 等VLDB 2026 · 1 次引用
  4. Automated Discovery of Test Oracles for Database Management Systems Using LLMsQiuyang Mang, Runyuan He, Suyang Zhong, Xiaoxuan Liu 等SIGMOD 2026 · 1 次引用
  5. jqBench: a benchmark for reading and editing JSON from natural language and/or examplesGust Verbruggen, Chris Parnin, Vu Le, Sumit GulwaniICLR 2026

它引用的 Paper21

  1. BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and ComprehensionMike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad 等ACL 2020 · 1,224 次引用
  2. DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-CorrectionMohammadreza Pourreza, Davood RafieiNeurIPS 2023 · 909 次引用
  3. Self-Consistency Improves Chain of Thought Reasoning in Language ModelsXuezhi Wang, Jason Wei, Dale Schuurmans, Quoc V. Le 等ICLR 2023 · 681 次引用
  4. Text-to-SQL Empowered by Large Language Models: A Benchmark EvaluationDawei Gao, Haibin Wang, Yaliang Li, Xiuyu Sun 等VLDB 2024 · 609 次引用
  5. A Survey on In-context LearningQingxiu Dong, Lei Li, Damai Dai, Ce Zheng 等EMNLP 2024 · 479 次引用

相关 Paper

  1. Developing and Benchmarking Verification Algorithms to Improve Text-to-SQL GenerationTarfah Alrashed, Madhup Sukoon, David R. Karger, Natasha F. NoyVLDB 2026
  2. SQLPrompt: In-Context Text-to-SQL with Minimal Labeled DataRuoxi Sun, Sercan Ö. Arik, Rajarishi Sinha, Hootan Nakhost 等EMNLP Findings 2023 · 18 次引用
  3. ToolSQL: A Tool-Assisted Agent for SQL Verification and RefinementZhongyuan Wang, Richong Zhang, Zhijie Nie, Jaein KimKDD 2025 · 2 次引用
  4. SPENCE: A Syntactic Probe for Detecting Contamination in NL2SQL BenchmarksMohammadtaher Safarzadeh, Hitesh Laxmichand Patel, Afshin Oroojlooy, Graham Horwood 等ACL 2026
  5. SQLens: An End-to-End Framework for Error Detection and Correction in Text-to-SQLYue Gong, Chuan Lei, Xiao Qin, Kapil Vaidya 等NeurIPS 2025 · 21 次引用
黄昏的海面,两侧是细线勾勒的悬崖