Lune

AAAI2026顶会

RetrySQL: Text-to-SQL Training with Retry Data for Self-Correcting Query Generation

Alicja Raczkowska, Riccardo Belluzzo, Piotr Zielinski, Joanna Baran, Pawel Olszewski

摘要

The text-to-SQL task is an active challenge in Natural Language Processing. Many existing solutions focus on using black-box language models extended with specialized components within customized end-to-end text-to-SQL pipelines. While these solutions use both closed-source proprietary language models and coding-oriented open-source models, there is a lack of research regarding SQL-specific small generative models. At the same time, recent advancements in self-correcting generation strategies show promise for improving the capabilities of existing architectures. The application of these concepts to the text-to-SQL task remains unexplored. In this paper, we introduce RetrySQL, a new approach to training text-to-SQL generation models. We prepare reasoning steps for reference SQL queries and then corrupt them to create retry data that contains both incorrect and corrected steps, divided with a special token. We continuously pre-train open-source coding models with this data and demonstrate that retry steps yield an improvements of up to 4 and 9 percentage points for overall and challenging execution metrics, respectively, as compared to pre-training without retry data. We showcase that the self-correcting behavior is learned by the model and the increase in downstream accuracy metrics is a result of this additional skill. Finally, we incorporate RetrySQL-trained models into the full text-to-SQL pipeline and showcase that they are competitive in terms of execution accuracy with proprietary models that contain orders of magnitude more parameters. RetrySQL demonstrates that self-correction can be learned in the text-to-SQL task and provides a novel way of improving generation accuracy for small SQL-oriented language models.

问 Lune

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

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

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction 引用了 SADGA: Structure-Aware Dual Graph Aggregation Network for Text-to-SQL
  • DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large 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
  • CodeS: Towards Building Open-source Language Models for Text-to-SQL 引用了 DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
  • CodeS: Towards Building Open-source Language Models for Text-to-SQL 引用了 Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation
  • CodeS: Towards Building Open-source Language Models for Text-to-SQL 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

它引用的 Paper16

  1. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
  2. DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-CorrectionMohammadreza Pourreza, Davood RafieiNeurIPS 2023 · 909 次引用
  3. Text-to-SQL Empowered by Large Language Models: A Benchmark EvaluationDawei Gao, Haibin Wang, Yaliang Li, Xiuyu Sun 等VLDB 2024 · 609 次引用
  4. CodeS: Towards Building Open-source Language Models for Text-to-SQLHaoyang Li, Jing Zhang, Hanbing Liu, Ju Fan 等SIGMOD 2024 · 124 次引用
  5. SADGA: Structure-Aware Dual Graph Aggregation Network for Text-to-SQLRuichu Cai, Jinjie Yuan, Boyan Xu, Zhifeng HaoNeurIPS 2021 · 90 次引用

相关 Paper

  1. ReSQL: Self-Improving Framework for Reasoning-Aware Text-to-SQL Dataset GenerationMinjun Park, Yongju Seong, Myoseop Sim, Kyungkoo Min 等ACL Findings 2026
  2. STaR-SQL: Self-Taught Reasoner for Text-to-SQLMingqian He, Yongliang Shen, Wenqi Zhang, Qiuying Peng 等ACL 2025
  3. ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQLYaxun Dai, Wenxuan Xie, Xialie Zhuang, Tianyu Yang 等ACL 2026 · 8 次引用
  4. SHARE: An SLM-based Hierarchical Action CorREction Assistant for Text-to-SQLGe Qu, Jinyang Li, Bowen Qin, Xiaolong Li 等ACL 2025 · 13 次引用
  5. MARS-SQL: A Multi-Agent Reinforcement Learning Framework For Text-To-SQLHaolin Yang, Jipeng Zhang, Zhitao He, Alexander Zhou 等ICML 2026 · 12 次引用
黄昏的海面,两侧是细线勾勒的悬崖