AI模型精选

DecoSearch: 复杂度感知路由与计划级修复提升Text-to-SQL

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

精选理由

DecoSearch不用训练就能把自然语言转SQL,在BIRD和Spider上准确率分别超70%和88%,比同类方法省十倍token。想提升SQL生成效率可以看看。

AI 摘要

DecoSearch是一个无需训练的Text-to-SQL框架,通过轻量级Schema Selector修剪数据库模式,LLM Judger判断查询是否需要分解为DAG子问题。在BIRD上达到70.53%执行准确率,在Spider上达88.31%,使用DeepSeek作为骨干模型,比训练无关基线消耗少一个数量级的token。该方法还可作为模型无关包装器,一致提升微调后的SQL生成骨干性能。

原文 · arXiv: DeepSeek

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

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.