arXiv:2606.23537cs.DBcs.AI2026-06被引 1

让AI一步步动态选操作,精准执行复杂自然语言查库请求

SQLConductor: Search-to-Policy Learning for Step-wise Text-to-SQL Orchestration

论文配图:SQLConductor: Search-to-Policy Learning for Step-wise Text-to-SQL Orchestration
图 1 · 摘自论文原文
  • 将查库任务拆解为可组合动作,基于中间结果动态选择下一步
  • 在BIRD-Dev上达到73.2%执行准确率,优于现有大模型方法
  • 适合需要灵活应对复杂查询的数据库智能交互场景

自然语言转SQL能帮助用户通过口语化提问访问关系型数据库,但真实场景中复杂的数据库环境仍具挑战性。现有系统多采用固定阶段流程或专用模型,难以适应查询需求与中间结果的变化。近期的编排方法虽提升灵活性,但仍需预先确定完整流程,无法根据执行过程中的反馈调整。本文提出SQLConductor,一种面向文本到SQL的分步编排学习框架。该框架将子任务视为可组合的动作,训练策略模型根据中间产物和反馈选择下一步操作。为训练该策略,引入搜索-策略学习:利用蒙特卡洛树搜索探索候选流程,并通过稳定性估计获取可靠监督信号。策略模型通过稳定性加权有监督微调进行训练,并进一步通过课程强化学习优化。这使离线流程搜索转化为可部署的推理时分步编排策略。在BIRD-Dev及分布外数据集上的实验表明,SQLConductor在保持紧凑编排策略的同时,达到73.2%的执行准确率,显著优于直接训练同等规模或更大模型的方法。分析显示,所学策略能有效适配多样化的查询需求。

原文摘要 · Abstract (English)

Text-to-SQL enables users to access relational databases via natural language, but real-world settings remain challenging due to coordinated reasoning over complex database environments. Existing systems often use multi-stage pipelines or reasoning models specialized for individual stages. However, fixed pipelines rely on predefined stage orders, limiting their adaptivity to query demands and intermediate evidence. Recent orchestration-based methods provide flexibility by composing specialized modules for each query, but typical plan-then-execute approaches still commit to a complete workflow before execution and cannot adapt to intermediate artifacts and feedback. In this paper, we propose SQLConductor, a step-wise orchestration learning framework for Text-to-SQL. SQLConductor formulates Text-to-SQL subtasks as specialized actions for workflow composition and trains a policy model to select the next action based on intermediate artifacts and feedback. To learn this policy, SQLConductor introduces Search-to-Policy Learning, which uses Monte Carlo Tree Search to explore candidate workflows and stability estimation to identify robust supervision. The policy model is trained with Stability-weighted Supervised Fine-tuning to prioritize high-quality orchestration patterns and further enhanced through Curriculum Reinforcement Learning. This transforms offline workflow search into a deployable policy for step-wise orchestration at inference time. Experiments on BIRD-Dev and out-of-distribution datasets show that SQLConductor achieves superior execution accuracy and strong generalization, reaching 73.2% EX on BIRD-Dev with a compact orchestration policy coordinating frozen larger action models, outperforming prior methods that directly train comparable or larger Text-to-SQL backbones. Further analyses show that the learned policy adapts orchestration to diverse query demands.

文本转SQL动态编排强化学习

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。