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

📅 2025-05-31
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Existing text-to-SQL self-correction methods face two key bottlenecks: excessive computational overhead from recursive LLM invocations and difficulty in performing fine-grained, interpretable error localization and correction on declarative SQL. This paper proposes a hierarchical action-based error correction framework powered by small language models (SLMs), which decomposes SQL generation into explicit, stepwise action trajectories and introduces a two-stage progressive correction mechanism. Innovatively, it employs a cascaded three-tier SLM pipeline coupled with a hierarchical self-evolutionary training strategy, enabling explicit modeling of reasoning paths without reliance on large-scale annotated data. Experiments demonstrate substantial improvements in SQL correction accuracy and robustness across diverse LLMs, particularly excelling in low-resource and privacy-sensitive settings where strong generalization capability is retained.

Technology Category

Application Category

📝 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.
Problem

Research questions and friction points this paper is trying to address.

Reduces computational overhead in text-to-SQL self-correction
Improves error detection and correction for declarative SQL queries
Enhances performance in low-resource and data privacy settings
Innovation

Methods, ideas, or system contributions that make the work stand out.

Uses SLM-based hierarchical action correction
Transforms SQL queries into stepwise actions
Implements data-efficient hierarchical self-evolution training
🔎 Similar Papers
No similar papers found.