DexterSQL: Deep Schema Exploration and Rule-based Correction for Text-to-SQL Generation

📅 2026-08-12
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses key challenges in prompt-driven Text-to-SQL methods—such as ambiguous column identification, repetitive generation, and frequent omissions, hallucinations, or misalignments in complex queries—by introducing a novel paradigm that requires no fine-tuning of large language models (LLMs). The approach employs a deep schema explorer to resolve ambiguous column relationships, applies database-agnostic rules to correct typical LLM errors, and leverages dependency-tree-guided intermediate representations to decompose complex questions. Furthermore, it integrates data distribution analysis, rule mining, and syntactic structure to construct robust SQL skeletons. Evaluated on BIRD-Dev, the method achieves 67.6% accuracy with GPT-OSS-120B, surpassing the previous state of the art by 2.7%, while GPT-4o and GPT-5.2 attain 71.6% and 72.2% accuracy, respectively, significantly outperforming existing approaches.
📝 Abstract
Prompting-based (\textit{i}.\textit{e}., non-fine-tuning) Text-to-SQL methods, where underlying large language model parameters are not changed for the task, face three problems: (\textit{i})~relying on coarse-grained schema information that may not reveal the fine-grained relationships needed to distinguish ambiguous columns, (\textit{ii})~not capturing recurring SQL-generation failures, and (\textit{iii})~suffering from omission, hallucination, or misplacement of conditions in complex questions. This paper develops \textsc{DexterSQL}, a prompting/non-fine-tuning-based Text-to-SQL system that improves SQL generation with three novel components: (\textit{i})~\emph{deep schema explorator} that identifies ambiguous columns, analyzes their individual and joint data distributions to uncover their relationships and the distinct role of each, (\textit{ii})~\emph{database-agnostic rule creator} that mines mismatches between generated and gold SQL only on the training database and converts them into database-agnostic corrective rules that capture recurring LLM failure patterns; and (\textit{iii})~\emph{multi-path SQL generation} that introduces a dependency-tree-based intermediate representation that uses the question's sentence structure to guide its decomposition into an SQL skeleton for final SQL generation. \textsc{DexterSQL} achieves a higher accuracy compared to the state-of-the-art using both open-source/weight and closed-source/weight models. Particularly, \textsc{DexterSQL}'s shows a high improvement of at least 2.7\% using an open-weight model (GPT-OSS-120B) on BIRD-Dev, with total accuracy 67.6\%. \textsc{DexterSQL} also shows better improvement of at least 0.9\% using closed-weight models, with total accuracy 71.6\% and 72.2\% on BIRD-Dev with GPT-4o and GPT-5.2.
Problem

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

Text-to-SQL
schema ambiguity
SQL generation errors
prompting-based methods
condition hallucination
Innovation

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

deep schema exploration
rule-based correction
multi-path SQL generation
database-agnostic rules
prompting-based Text-to-SQL
🔎 Similar Papers
2024-06-20North American Chapter of the Association for Computational LinguisticsCitations: 1
💼 Related Jobs
No related jobs found.