Lune

ACL2025Top-tier venue

SHARE: An SLM-based Hierarchical Action CorREction Assistant for Text-to-SQL

Ge Qu, Jinyang Li, Bowen Qin, Xiaolong Li, Nan Huo, Chenhao Ma, Reynold Cheng

Abstract

Current self-correction approaches in text-to-SQL face two critical limitations: 1) Conventional self-correction methods rely on recursive self-calls of LLMs, resulting in multiplicative computational overhead, and 2) LLMs struggle to implement effective error detection and correction for declarative SQL queries, as they fail to demonstrate the underlying reasoning path. In this work, we propose SHARE, an SLM-based Hierarchical Action corREction assistant that enables LLMs to perform more precise error localization and efficient correction. SHARE orchestrates three specialized Small Language Models (SLMs) in a sequential pipeline, where it first transforms declarative SQL queries into stepwise action trajectories that reveal underlying reasoning, followed by a two-phase granular refinement. We further propose a novel hierarchical self-evolution strategy for data-efficient training. Experimental results demonstrate that SHARE effectively enhances self-correction capabilities while proving robust across various LLMs. Furthermore, our comprehensive analysis shows that SHARE maintains strong performance even in low-resource training settings, which is particularly valuable for text-to-SQL applications with data privacy constraints. For reproducibility, we release our code at https: //github.com/quge2023/SHARE .

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

7 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • SWE-SQL: Illuminating LLM Pathways to Solve User SQL Issues in Real-World Applications cites LoRA: Low-Rank Adaptation of Large Language Models
  • SWE-SQL: Illuminating LLM Pathways to Solve User SQL Issues in Real-World Applications cites DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
  • SWE-SQL: Illuminating LLM Pathways to Solve User SQL Issues in Real-World Applications cites Teaching Large Language Models to Self-Debug
  • Large Language Models Cannot Self-Correct Reasoning Yet cites Teaching Large Language Models to Self-Debug
  • ErrorLLM: Modeling SQL Errors for Text-to-SQL Refinement cites LoRA: Low-Rank Adaptation of Large Language Models
  • ErrorLLM: Modeling SQL Errors for Text-to-SQL Refinement cites Large Language Models Cannot Self-Correct Reasoning Yet
  • ErrorLLM: Modeling SQL Errors for Text-to-SQL Refinement cites DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
  • ErrorLLM: Modeling SQL Errors for Text-to-SQL Refinement cites Teaching Large Language Models to Self-Debug
  • ErrorLLM: Modeling SQL Errors for Text-to-SQL Refinement cites DeepEye-SQL: A Software-Engineering-Inspired Text-to-SQL Framework
  • MARS-SQL: A Multi-Agent Reinforcement Learning Framework For Text-To-SQL cites DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
  • DeepEye-SQL: A Software-Engineering-Inspired Text-to-SQL Framework cites DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
  • BIRD-INTERACT: Re-imagining Text-to-SQL Evaluation via Lens of Dynamic Interactions cites SWE-SQL: Illuminating LLM Pathways to Solve User SQL Issues in Real-World Applications
  • BIRD-INTERACT: Re-imagining Text-to-SQL Evaluation via Lens of Dynamic Interactions cites DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers7

  1. DeepEye-SQL: A Software-Engineering-Inspired Text-to-SQL FrameworkBoyan Li, Chong Chen, Zhujun Xue, Yinan Mei et al.SIGMOD 2026 · 40 citations
  2. SWE-SQL: Illuminating LLM Pathways to Solve User SQL Issues in Real-World ApplicationsJinyang Li, Xiaolong Li, Ge Qu, Per Jacobsson et al.NeurIPS 2025 · 15 citations
  3. MARS-SQL: A Multi-Agent Reinforcement Learning Framework For Text-To-SQLHaolin Yang, Jipeng Zhang, Zhitao He, Alexander Zhou et al.ICML 2026 · 12 citations
  4. BIRD-INTERACT: Re-imagining Text-to-SQL Evaluation via Lens of Dynamic InteractionsNan Huo, Xiaohan Xu, Jinyang Li, Per Jacobsson et al.ICLR 2026 · 10 citations
  5. ErrorLLM: Modeling SQL Errors for Text-to-SQL RefinementZijin Hong, Hao Chen, Zheng Yuan, Qinggang Zhang et al.KDD 2026 · 3 citations

Builds on22

  1. LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
  2. Direct Preference Optimization: Your Language Model is Secretly a Reward ModelRafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D. Manning et al.NeurIPS 2023 · 10,924 citations
  3. Teaching Large Language Models to Self-DebugXinyun Chen, Maxwell Lin, Nathanael Schärli, Denny ZhouICLR 2024 · 1,085 citations
  4. DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-CorrectionMohammadreza Pourreza, Davood RafieiNeurIPS 2023 · 909 citations
  5. Large Language Models Cannot Self-Correct Reasoning YetJie Huang, Xinyun Chen, Swaroop Mishra, Huaixiu Steven Zheng et al.ICLR 2024 · 858 citations

Related papers

  1. RetrySQL: Text-to-SQL Training with Retry Data for Self-Correcting Query GenerationAlicja Raczkowska, Riccardo Belluzzo, Piotr Zielinski, Joanna Baran et al.AAAI 2026
  2. ReSQL: Self-Improving Framework for Reasoning-Aware Text-to-SQL Dataset GenerationMinjun Park, Yongju Seong, Myoseop Sim, Kyungkoo Min et al.ACL Findings 2026
  3. MAGIC: Generating Self-Correction Guideline for In-Context Text-to-SQLArian Askari, Christian Pölitz, Xinye TangAAAI 2025 · 44 citations
  4. SQLens: An End-to-End Framework for Error Detection and Correction in Text-to-SQLYue Gong, Chuan Lei, Xiao Qin, Kapil Vaidya et al.NeurIPS 2025 · 21 citations
  5. Boosting Small Language Models for Text-to-SQL with Fine-Grained Execution Feedback and Cost-Efficient RewardsThanh Dat Hoang, Thanh Trung Huynh, Matthias Weidlich, Thanh Tam Nguyen et al.ICDE 2026 · 3 citations
Dusk over the sea between two cliffs drawn in fine vertical lines