🤖 AI Summary
This study addresses the prevalent issues of frequent SQL generation errors and cumulative error propagation in large language model-based Text-to-SQL reasoning. We propose a training-free, plan-guided tree debugging framework that integrates multi-strategy backtracking, execution feedback verification, and clause-level diagnosis. Through collaborative agent mechanisms, this approach precisely localizes and rectifies errors while effectively mitigating single-path error propagation without requiring additional model training. Experimental evaluations demonstrate that the proposed framework achieves a 9.42% accuracy improvement on the BIRD-Critic benchmark. Furthermore, deployment in the Volcengine production environment yields a substantial increase in execution accuracy from 36.77% to 53.61%, validating its practical effectiveness and robustness in real-world industrial applications for enhancing Text-to-SQL reliability.
📝 Abstract
Large Language Models (LLMs) have been increasingly adopted in Text-to-SQL systems, yet SQL errors remain a major obstacle in real-world Text-to-SQL inference pipelines. Existing SQL correction approaches either rely on large-scale, high-quality training data with substantial overhead, or adopt single-path agentic workflows that are brittle to early mistakes and prone to error propagation.
To develop a practical SQL correctness system for industrial scenarios, we present a training-free framework that formulates SQL correction as a plan-guided, tree-structured debugging process. By maintaining multiple correction strategies and enabling backtracking, the framework mitigates error accumulation during iterative refinement. We further integrate execution-based verification and clause-level diagnostic tools to support strategy pruning and precise error localization.
We evaluate the system on the BIRD-Critic benchmark and observe consistent accuracy gains over strong LLM backbones and representative agent-based baselines, achieving a 9.42% improvement over the previous state-of-the-art method. The framework is also deployed in the Torch Log Service (TLS) of Volcano Engine to support an online Text-to-TLS API. In production, it improves execution accuracy from 36.77% to 53.61% on real user queries with a representative strong LLM backbone (GPT-5). These results demonstrate the effectiveness and stability of our approach in real-world deployments.