Keywords: Text-to-SQL, Databases, LLMs
TL;DR: We propose an experience-guided, divide-and-conquer Text-to-SQL framework, which achieves 67.5% execution accuracy on the BIRD dev benchmark, reduces token generation by 87%, and decreases inference latency by 96%.
Abstract: Large language models have advanced Text-to-SQL, yet enterprise deployment remains challenging due to complex, evolving schemas, domain shift, privacy constraints, and latency/cost budgets. We introduce \textbf{ExpeSQL}, a zero-shot, open-source–compatible framework that enables self-evolving SQL generation through experience-guided refinement. ExpeSQL decomposes questions using schema-aware reasoning, generates verifiable sub-SQLs, and aggregates candidates via result-based filtering and majority voting. When errors occur, a self-critique module performs diagnostic backtracking, storing structured remedies in a persistent memory. These experiences are replayed in future rounds to prevent repeated mistakes—enabling continuous improvement without parameter updates. On BIRD-dev, ExpeSQL achieves 67.5\% execution accuracy with open-source models, reducing token generation by up to 87\% and inference latency by 96\% compared to Alpha-SQL at similar accuracy. This superior accuracy-efficiency trade-off establishes ExpeSQL as a new paradigm for deployable, self-improving Text-to-SQL systems in dynamic real-world environments.
Primary Area: foundation or frontier models, including LLMs
Submission Number: 10737
Loading