arXiv:2605.03720cs.CL2026-05ACL

用角色状态演进提升多轮文本转SQL准确率,无需训练

Rose-SQL: Role-State Evolution Guided Structured Reasoning for Multi-Turn Text-to-SQL

论文配图:Rose-SQL: Role-State Evolution Guided Structured Reasoning for Multi-Turn Text-to-SQL
图 1 · 摘自论文原文
  • 引入角色状态作为结构蓝图,统一模式关联与SQL生成
  • 通过历史对话追踪状态演化,在SParC/CoSQL上超越8B/14B微调模型
  • 适配多种大模型,零训练即可实现稳定高精度多轮查询

大型推理模型(LRMs)在长链思维推理方面展现出强大能力,但在多轮文本转SQL任务中的潜力仍待挖掘。现有方法依赖不稳定的API推理或需昂贵的小规模模型微调。本文提出Rose-SQL,一种无需训练的框架,利用小规模LRMs通过上下文学习实现精准上下文依赖解析。提出角色状态(Role-State),作为连接模式关联与SQL生成的细粒度结构蓝图。为处理对话依赖,通过结构同构性检查追踪角色状态的历史演化,引导模型基于验证的交互轨迹推断当前问题的可能SQL结构。在SParC和CoSQL基准测试中,Qwen3系列模型下,Rose-SQL在4B规模上超越上下文学习基线,在8B和14B规模上显著优于现有微调模型,并在其他推理骨干上保持一致优势。

原文摘要 · Abstract (English)

Recent advances in Large Reasoning Models (LRMs) trained with Long Chain-of-Thought have demonstrated remarkable capabilities in code generation and mathematical reasoning. However, their potential in multi-turn Text-to-SQL tasks remains largely underexplored. Existing approaches typically rely on unstable API-based inference or require expensive fine-tuning on small-scale models. In this work, we present Rose-SQL, a training-free framework that leverages small-scale LRMs through in-context learning to enable accurate context-dependent parsing. We introduce the Role-State, a fine-grained representation that bridges the structural gap between schema linking and SQL generation by serving as a structural blueprint. To handle conversational dependencies, Rose-SQL traces the evolution of Role-State through historical context via structural isomorphism checks, guiding the model to infer the possible SQL composition for the current question through verified interaction trajectories. Experiments on the SParC and CoSQL benchmarks show that, within the Qwen3 series, Rose-SQL outperforms in-context learning baselines at the 4B scale and substantially surpasses state-of-the-art fine-tuned models at the 8B and 14B scales, while showing consistent gains on additional reasoning backbones.

文本转SQL多轮对话推理模型结构推理

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