Year: 2026
Type: conference-paper
Abstract: Recent advances in Text-to-SQL have greatly benefited from large language models, yet small and medium-sized models still suffer from frequent execution errors and limited self-correction ability.We present ReSQL (Retrieval-augmented error reasoning for Textto-SQL), a self-improving framework that generates and learns from its own error-reasoning dataset, enabling models to autonomously refine their SQL generation and correction capabilities.ReSQL combines feedback-driven fine-tuning with retrieval-based inference: it gathers model-generated errors, analyzes them through structured feedback prompts, and retrieves relevant correction examples during inference.This unified approach allows models to internalize robust error-reasoning patterns and dynamically apply them to unseen queries.Experimental results on the SPIDER and BIRD benchmarks show that ReSQL substantially improves execution accuracy and self-correction ability over strong baselines, achieving competitive performance with much larger proprietary models such as GPT-4.Our findings highlight ReSQL as a promising step toward self-improving, reasoning-aware Text-to-SQL systems that can continually enhance their reliability and interpretability without external supervision.All code and generated reasoning datasets are available to facilitate application to open-source LLMs and reproducible baseline training.Model SPIDER (%) BIRD (%) Llama-3.2 1B 49.60 70.85 Llama-3.2 3B 20.91 45.16 Llama-3.1 8B 7.07 28.69 Qwen-2.5 1.5B 28.31 58.15 Qwen-2.5 3B 17.73 43.63 Qwen-2.5 7B 5.14 28.59 Gemma-2 2B 37.60 67.04 Gemma-2 9B 8.41 27.49Mistral-v0.3 7B 18.03 45.85
Institution: LG AI Research (South Korea)
Language: English
Topic: Topic Modeling
Subfield: Artificial Intelligence
Field: Computer Science
Domain: Physical Sciences
Open Access status: hybrid
OpenAlex ID: W7166814043
