SDE-SQL: Enhancing Text-to-SQL Generation in Large Language Models via Self-Driven Exploration with SQL Probes

ACL ARR 2025 July Submission968 Authors

29 Jul 2025 (modified: 01 Sept 2025)ACL ARR 2025 July SubmissionEveryoneRevisionsBibTeXCC BY 4.0
Abstract: Recent advances in large language models (LLMs) have led to substantial progress on the Text-to-SQL task. However, existing approaches typically depend on static, pre-processed database information supplied at inference time, which restricts the model’s capacity to deeply comprehend the underlying database content. In the absence of dynamic interaction, LLMs are limited to fixed, human-curated context and lack the ability to autonomously query or explore the data. To overcome this limitation, we introduce $\textbf{SDE-SQL}$, a novel framework that empowers LLMs to perform $\textbf{Self-Driven Exploration}$ of databases during inference. This is achieved through the generation and execution of $\textbf{SQL probes}$, enabling the model to actively retrieve information and iteratively refine its understanding of the database. Unlike prior methods, $\textbf{SDE-SQL}$ operates in a $\textbf{zero-shot}$ setting, requiring no in-context demonstrations or question-SQL pairs. Evaluated on the BIRD benchmark with $\texttt{Qwen2.5-72B-Instruct}$, $\textbf{SDE-SQL}$ achieves an $\textbf{8.02}$ % relative improvement in execution accuracy over the vanilla $\texttt{Qwen2.5-72B-Instruct}$ baseline, establishing a new state-of-the-art among open-source methods without supervised fine-tuning (SFT) or model ensembling. Furthermore, when combined with SFT, $\textbf{SDE-SQL}$ delivers an additional $\textbf{0.52}$ % performance gain.
Paper Type: Long
Research Area: NLP Applications
Research Area Keywords: NLP Applications, Generation, Language Modeling
Contribution Types: NLP engineering experiment
Languages Studied: English
Submission Number: 968
Loading