COAL-SQL: Coverage-Guided Augmentation and Failure-Driven Learning for Text-to-SQL Post-Training

Qifeng Cai, Xuanguang Pan, Hao Liang, Chang Xu, Wentao Zhang
8/4/2026
cs.CLcs.DB
rl

Official code: TechNomad-ds/COAL-SQL (1 star, Python, last commit 2026-10-04).

Abstract

Text-to-SQL translates natural-language questions into executable SQL queries, but open-source large language models still require task-specific post-training for complex, real-world SQL generation. Effective post-training requires both training data that cover the capabilities demanded by the target task and a learning strategy that enables the model to acquire them.

Show full abstract

Existing datasets provide valuable supervision but incompletely cover SQL structures, while augmentation methods typically expand data without identifying structural gaps. Moreover, supervised fine-tuning (SFT) or reinforcement learning (RL) alone cannot dynamically address weaknesses exposed during training. We propose COAL-SQL, a unified framework combining Coverage-Guided Augmentation (CGA) and Failure-Driven Learning (FDL). CGA uses greedy selection to identify SQL structures missing from the original dataset and constructs complementary examples, improving structural coverage. FDL retains GRPO as the main optimization objective while supplying targeted supervision for unsolved examples. At the step level, it applies SFT to verified reasoning traces generated by a strong LLM for accumulated failures. At the epoch level, it retrieves structurally related examples based on accumulated failures to create targeted practice, helping the model acquire the corresponding SQL capabilities. With only 12,600 distinct post-training examples, COAL-SQL achieves 64.9% execution accuracy on the BIRD development set and outperforms baselines trained at comparable scale. The code is available at https://github.com/TechNomad-ds/COAL-SQL.

View on arXivView PDF

Code Implementations(1)

COAL-SQL: Coverage-Guided Augmentation and Failure-Driven Learning for Text-to-SQL Post-Training

10Python, ShellAug 1, 20261 months ago

Similar Papers

Cite this paper

@article{cai2026coalsql,
  title  = {COAL-SQL: Coverage-Guided Augmentation and Failure-Driven Learning for Text-to-SQL Post-Training},
  author = {Qifeng Cai and Xuanguang Pan and Hao Liang and Chang Xu and Wentao Zhang},
  year   = {2026},
  eprint = {2609.20842},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.20842v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2609.20842.svg)](https://codeofpaper.com/paper/2609.20842)

Discussion