Rose-SQL: Role-State Evolution Guided Structured Reasoning for Multi-Turn Text-to-SQL
Le Zhou, Feng Yao, Fengcai Qiao, Bo Xu, Fangyuan Wang, Boyan Xu · 2026
Read Rose-SQL: Role-State Evolution Guided Structured Reasoning for Multi-Turn Text-to-SQL by Le Zhou, Feng Yao, Fengcai Qiao, Bo Xu, Fangyuan Wang, Boyan Xu (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2605-03720.txt.
Introduction
Zhou and five colleagues turn multi-turn database questions into SQL without retraining a model. Text-to-SQL translates plain-language questions into database queries, but real users ask follow-ups that refine earlier questions, so each new question depends on conversation history. Existing routes lean on unstable API calls or costly fine-tuning. Rose-SQL is training-free: it uses small reasoning models with in-context examples, plus a Role-State representation that acts as a structural blueprint between linking the database schema and writing the query.
Tracking how Role-State evolves through the dialogue, checked by structural isomorphism, guides the model toward the right query composition for each turn. On the SParC and CoSQL benchmarks, Rose-SQL beat in-context baselines at the four-billion-parameter scale and clearly surpassed fine-tuned rivals at eight and fourteen billion parameters. Gains held across other reasoning backbones too.
Catalog record
| CREATOR | Le Zhou, Feng Yao, Fengcai Qiao, Bo Xu, Fangyuan Wang, Boyan Xu |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 61 KB |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2605.03720
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Rose-SQL: Role-State Evolution Guided Structured Reasoning for Multi-Turn Text-to-SQL Le Zhou, Feng Yao, Fengcai Qiao, Bo Xu, Fangyuan Wang, Boyan Xu Abstract 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. 1 Introduction Text-to-SQL 30 ; 21 is a fundamental semantic parsing task that translates natural language utterances into executable SQL queries over a given database schema, enabling users to access structured information without SQL expertise. While early research mainly focused on single-turn queries 25 ; 10 , real-world applications often involve multi-turn interactions 26 ; 24 , where users iteratively refine or build upon previous questions through dialogue. This setting requires the model to incorporate both the current utterance and relevant history to generate context-aware queries. The rapid advancement of large language models (LLMs) has spurred new approaches to this task. In particular, LLMs enable strong in-context reasoning without explicit task-specific training, offering a flexible alternative to traditional supervised models. This has led to two dominant paradigms in multi-turn Text-to-SQL tasks: in-context learning (ICL) with large LLMs, and fine-tuned smaller models with customized architectures. In-context learning approaches leverage proprietary LLMs such as GPT-3.5 to generate SQL queries from dialogue histories directly. Representative methods include ACT-SQL 27 , which rewrites dependent questions and applies chain-of-thought (CoT) prompting 19 , and CoE-SQL 28 , which models SQL transitions to maintain consistency across turns. While flexible, these methods are highly sensitive to prompt quality and struggle with noisy or ambiguous historical context. On the other hand, fine-tuned approaches use smaller open-source models with task-specific modules for schema linking, intent tracking, or SQL history modeling. For example, HIE-SQL 29 , RASAT 16 , and Track-SQL 2 encode context using pretraining objectives or graph structures. While effective, these methods are training-intensive and costly to adapt. Given these trade-offs, a natural question arises: Can small-scale open-source models perform effective multi-turn reasoning purely through in-context learning, without fine-tuning? We find that recent small-scale reasoning models—such as the Qwen3 22 and DeepSeek 3 series—have made notable progress in in-context tasks, thanks to improved instruction tuning and long-chain-of-thought capabilities. These models now show strong reasoning ability, even without fine-tuning. Yet, their application to multi-turn Text-to-SQL remains underexplored. The main bottleneck is not model capacity, but the lack of mechanisms to manage evolving dialogue context and align schema linking with SQL structure. In the absence of strong inductive biases, small models often misinterpret context dependencies or fail to capture compositional query semantics. Figure 1: Rose-SQL: A plug-in framework boosting small open-source LLMs. Our method significantly improves Qwen3’s performance by 14.77%-20.62% across different model sizes (4B-14B) without fine-tuning, surpassing even fine-tune based multi-turn Text-to-SQL SOTA (Track-SQL) on the SparC (Dev) dataset. To bridge this gap, we propose Rose-SQL , a reasoning framework designed to adapt small-scale LRMs for context-dependent parsing without task-specific fine-tuning. As illustrated in Figure 1 , Rose-SQL facilitates the efficient utilization of historical context while achieving performance comparable to, or even surpassing, state-of-the-art fine-tuned methods. The cornerstone of our approach is the introduction of Role-State , a fine-grained schema linking representation that explicitly maps natural language entities to their specific functional roles within a SQL query. Serving as a structural blueprint, Role-State achieves the decoupling of semantic intent from syntactic execution, imposing rigid constraints that guide the model through a stabilized reasoning path. To manage complex dialogue dynamics, Rose-SQL operates through three synergistic phases. First, the Gain Dependency Analysis phase quantifies the contextual influence of historical utterances, enabling the framework to distinguish substantive information gain from irrelevant conversational noise. Subsequently, the Evolutionary Trajectory Searching mechanism identifies historical interaction patterns and verifies them via structural isomorphism checks on Role-State transitions, providing a validated reference to infer the possible SQL composition for the current question. Finally, the Augmented Hierarchical Reasoning stage integrates verified trajectories with contextual anchors, guiding the model to sequentially infer the intermediate thought process and Role-State before generating the final SQL code. Experimental results on the SParC and CoSQL benchmarks demonstrate that Rose-SQL significantly enhances SQL generation accuracy across various parameter scales. Our contributions are summarized as follows: • We propose the Rose-SQL framework, which leverages the Role-State mechanism to decouple semantic mapping from syntactic generation, providing a structured intermediate target for small-scale LRMs. • We devise an evolutionary guidance strategy that integrates Gain Dependency Analysis with structural isomorphism checks, effectively mitigating contextual noise by verifying the logical consistency of dialogue evolution to infer the possible SQL composition for the current question. • We introduce an augmented hierarchical reasoning paradigm that stabilizes the deduction process via verified trajectories and contextual anchors, achieving state-of-the-art performance on the validation sets of two benchmarks SparC and CoSQL. 2 Methodology In the context of multi-turn Text-to-SQL parsing, the task is formulated as mapping a sequence of conversational utterances \mathcal{Q}_{\leq i} and the corresponding database schema \mathcal{S}=(t_{m},c_{m,n_{m}}) to a target SQL query s_{m} . Here, t_{m} denotes the m^{\text{th}} table in the database, while c_{m,n_{m}} represents the n_{m}^{\text{th}} column within table t_{m} . In this section, we will provide an overview of the framework designed to solve this problem and delve into its design details. Figure 2: The Role-State mechanism: A structural blueprint bridging schema linking and SQL generation. Figure 3: An overview of our framework. Rose-SQL first performs a context-aware dependency quantification via Gain Dependency Analysis to distinguish substantive information gain from conversational noise. It then conducts an isomorphism-guided evolutionary search to verify historical patterns through digitized Role-State transitions, ensuring retrieved trajectories are logically analogous to the current dialogue. Finally, an augmented hierarchical reasoning stage utilizes these verified trajectories to infer the possible SQL composition for the current question, guiding the model to sequentially produce the Role-State blueprint and final executable query. 2.1 Overview of Rose-SQL To address structural misalignment and contextual noise in multi-turn Text-to-SQL parsing, we propose Rose-SQL, a training-free framework built upon hierarchical structural guidance. At the core of Rose-SQL is the Role-State, an intermediate structural blueprint that decouples semantic intent from syntactic realization by mapping relevant entities to their functional roles in SQL composition. These role assignments are further encoded as a ten-dimensional indicator vector, enabling explicit structural comparison across dialogue turns and providing a computable foundation for subsequent structural verification. Building upon this representation, Rose-SQL verifies evolutionary trajectories from historical interactions to identify logically analogous transitions, so