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

Esteban Schafir, Xu Zheng, Hojat Allah Salehi, Zhuomin Chen, Mo Sha +2 more
6/16/2026
cs.AI

No confident code implementation found for this paper.

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{schafir2026decosearch,
  title  = {DecoSearch: Complexity-Aware Routing and Plan-Level Repair for Text-to-SQL},
  author = {Esteban Schafir and Xu Zheng and Hojat Allah Salehi and Zhuomin Chen and Mo Sha and Wei Cheng and Dongsheng Luo},
  year   = {2026},
  eprint = {2606.17821},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2606.17821v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2606.17821.svg)](https://codeofpaper.com/paper/2606.17821)

Discussion