RSI-SQL: Recursive Self-Improvement for Text-to-SQL
Abstract
Text-to-SQL agents can repair a query while retaining the grounding error that produced it. We introduce Recursive Self-Improvement for Text-to-SQL, a training-free framework that uses execution feedback to recursively update its own reasoning state. A Graph Grounding Agent revises intent and schema hypotheses, an Actor generates and tests SQL candidates, and a Critic assigns credit to the interactions supporting each trajectory. A typed Action Graph carries the revised hypotheses, observations, and credit into the next round of reasoning. This recursion connects candidate refinement to updates in the evidence used for subsequent decisions. A local analysis characterizes grounding discrepancy and the propagation of intermediate and terminal errors during lookahead. On all 1,534 BIRD development queries, a shared backbone across the three roles achieves 63.50% execution accuracy with Qwen2.5-14B-Instruct and 64.41% with Qwen2.5-Coder-14B-Instruct. Component comparisons reveal interference between retrieval and credit assignment, making their coordination central to the recursive improvement loop. Code is available at https://anonymous.4open.science/r/RSI-SQL-425F.
Then back it, or bet against it.
Related papers
Open the market on this paper to see 7 more related papers.