DecoSearch Improves Text-to-SQL with Complexity-Aware Routing and Repair.

Esteban Schafir, Xu Zheng, Hojat Allah Salehi, Zhuomin Chen, Mo Sha, Wei Cheng, Dongsheng Luo· June 17, 2026 View original

Summary

DecoSearch is a training-free framework that enhances Large Language Model performance in translating natural language to SQL by routing queries based on complexity and repairing execution failures. It achieves high accuracy on benchmarks like BIRD and Spider while using fewer tokens than competing methods.

DecoSearch introduces a novel, training-free framework designed to significantly improve the accuracy and efficiency of text-to-SQL translation using Large Language Models (LLMs). This system intelligently routes natural language queries based on their complexity, ensuring that straightforward questions are processed directly while more intricate ones are decomposed into a Directed Acyclic Graph (DAG) of atomic sub-questions. Each sub-question is then solved through a targeted SQL generation step. A key innovation of DecoSearch is its multi-component architecture. It includes a lightweight Schema Selector to prune irrelevant database schema, an LLM Judger to determine query decomposition necessity, and a Retrieval-Augmented Generation (RAG) component to ground the decomposer with relevant examples. Furthermore, a Topology Refiner is integrated to restructure the reasoning plan when execution failures indicate a flawed decomposition rather than a simple SQL error. The framework has demonstrated state-of-the-art performance on challenging benchmarks such as BIRD and Spider, achieving high execution accuracy with significantly reduced token consumption compared to other methods. Its model-agnostic nature allows it to function as a wrapper, consistently enhancing existing fine-tuned SQL generation backbones without requiring any modifications to their internal pipelines.

Why it matters

This research offers a significant leap in making natural language interfaces to databases more robust and efficient, directly impacting data analysts, developers, and business users who rely on accurate SQL generation from natural language queries. Professionals can leverage this approach to build more reliable and user-friendly data interaction tools, reducing manual SQL writing and debugging.

How to implement this in your domain

  1. 1Integrate DecoSearch as a pre-processing and post-processing layer for existing text-to-SQL models to improve accuracy and efficiency.
  2. 2Apply the complexity-aware routing mechanism to optimize resource allocation for different query types in database interaction systems.
  3. 3Utilize the plan-level repair mechanism to enhance the robustness of natural language interfaces, reducing errors in complex data retrieval tasks.
  4. 4Develop custom schema selectors and LLM judgers tailored to specific enterprise database schemas and query patterns.

Who benefits

Data AnalyticsSoftware DevelopmentBusiness IntelligenceFinancial ServicesHealthcare

Key takeaways

  • DecoSearch improves text-to-SQL accuracy by routing queries based on complexity and repairing execution failures.
  • It uses a multi-component architecture including schema selection, LLM judging, RAG, and topology refinement.
  • The framework is training-free and model-agnostic, enhancing existing SQL generation backbones.
  • It achieves state-of-the-art performance on benchmarks with significantly fewer tokens.

Original post by Esteban Schafir, Xu Zheng, Hojat Allah Salehi, Zhuomin Chen, Mo Sha, Wei Cheng, Dongsheng Luo

"arXiv:2606.17821v1 Announce Type: new 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,…"

View on X

Originally posted by Esteban Schafir, Xu Zheng, Hojat Allah Salehi, Zhuomin Chen, Mo Sha, Wei Cheng, Dongsheng Luo on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses