DecoSearch: Complexity-Aware Routing and Plan-Level Repair for Text-to-SQL

📅 2026-06-16
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the poor performance of large language models (LLMs) on complex, multi-step, and data-dependent Text-to-SQL tasks by proposing a training-free inference framework. The approach employs a lightweight schema selector to prune the database schema and a complexity-aware routing mechanism based on an LLM judge: simple queries are directly translated into SQL, while complex ones are decomposed into atomic subproblems structured as a directed acyclic graph (DAG). These subproblems are then resolved through retrieval-augmented generation (RAG) and topologically optimized for plan-level refinement. Evaluated on the BIRD and Spider benchmarks, the framework achieves execution accuracies of 70.53% and 88.31%, respectively—substantially outperforming existing training-free methods—while reducing inference token consumption by an order of magnitude. Moreover, it functions as a plug-and-play module that enhances the performance of existing SQL generation models.
📝 Abstract
Large Language Models (LLMs) have demonstrated remarkable capabilities in translating natural language to SQL, yet existing methods still falter on complex queries requiring multi-step, data-aware reasoning. We introduce DecoSearch, a training-free framework that addresses this by routing each query to the appropriate level of reasoning effort. A lightweight Schema Selector first prunes the full database schema to the relevant tables and columns. An LLM Judger then decides whether the question requires decomposition: straightforward questions follow a direct generation path and complex ones are escalated to a Directed Acyclic Graph (DAG) of atomic sub-questions, each solved by a targeted SQL generation step. A RAG component grounds the decomposer with semantically similar training examples, and a Topology Refiner restructures the reasoning plan when execution failures signal a flawed decomposition rather than a fixable SQL error. DecoSearch achieves 70.53% execution accuracy on BIRD and 88.31% on Spider with a DeepSeek backbone, surpassing all training-free baselines while consuming an order of magnitude fewer tokens than competing methods. It also functions as a model-agnostic wrapper, consistently improving fine-tuned SQL generation backbones without any modification to the pipeline.
Problem

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

Text-to-SQL
complex queries
multi-step reasoning
data-aware reasoning
SQL generation
Innovation

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

Complexity-Aware Routing
Plan-Level Repair
Decomposition DAG
RAG-Guided Decomposition
Training-Free Framework