AI Briefing
KO

LG AI Research Unveils ReSQL, a Self-Improving Text-to-SQL System That Surpasses GPT-4

·2026.08.27 17:33

Key point

LG AI Research has released ReSQL, which recycles SQL errors from lightweight models for training to outperform GPT-4.

1 / 2

Details

LG AI Research proposed the ReSQL (Retrieval-augmented error reasoning for Text-to-SQL) framework to overcome the limitations of small-to-medium model-based Text-to-SQL systems, considering security and cost efficiency in enterprise environments. This research was presented at ACL 2026, a conference in the field of natural language processing.

Existing self-correction techniques relied on prompting at inference time, but lightweight models could not handle this, limiting their effectiveness. ReSQL established a 3-stage closed loop that recycles errors generated by the model as drivers for learning.

  • Automatic generation of error reasoning data: Based on failed SQL and ground truth, the model generates structured data where it diagnoses the cause of errors and suggests correction directions.
  • Self-improvement learning: The model is fine-tuned (LoRA) using the generated error reasoning data to internalize the thought process of error analysis.
  • Retrieval-based reasoning (RAG): When errors occur during inference, similar past cases are retrieved and used as Few-Shot examples.

Models of 7–9B parameters applying ReSQL achieved 81.29% accuracy on the SPIDER benchmark and 53.78% on BIRD, surpassing GPT-4 (SPIDER 79.98%, BIRD 49.87%) with advanced correction techniques. In particular, a dramatic improvement was confirmed in the BIRD execution accuracy of the Llama-3.2 1B model, which increased from 3.78% to 24.84%, approximately 7 times.

Analysis by error type showed that fine-tuning was effective in resolving frequent errors, but RAG's effectiveness was prominent in Rare Errors (Long-Tail Errors) that appear infrequently in training data. Practical improvements were proven, such as a 36.5% reduction in column name ambiguity errors and a 73.1% reduction in ORDER BY errors before UNION.

LG AI Research has open-sourced the ReSQL data generation framework code and the entire reasoning dataset generated by 1B–9B models on GitHub. In the future, they plan to expand research to proactive error prevention before errors occur, complete unsupervised self-improvement without ground truth, and robustness verification in unknown schema environments.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.