Skip to main content
QUICK REVIEW

[Paper Review] Track-SQL: Enhancing Generative Language Models with Dual-Extractive Modules for Schema and Context Tracking in Multi-turn Text-to-SQL

Bingfeng Chen, Shaobin Shi|arXiv (Cornell University)|Mar 6, 2026
Topic ModelingComputer Science0 citations
TL;DR

Track-SQL introduces dual-extractive modules to dynamically link schemas and extract context in multi-turn Text-to-SQL, achieving state-of-the-art results on SparC and CoSQL datasets. It shows notable improvements in multi-turn execution accuracy and provides ablations confirming the contribution of each component.

ABSTRACT

Generative language models have shown significant potential in single-turn Text-to-SQL. However, their performance does not extend equivalently to multi-turn Text-to-SQL. This is primarily due to generative language models' inadequacy in handling the complexities of context information and dynamic schema linking in multi-turn interactions. In this paper, we propose a framework named Track-SQL, which enhances generative language models with dual-extractive modules designed to track schema and contextual changes in multi-turn Text-to-SQL. Specifically, Track-SQL incorporates a \emph{Semantic-enhanced Schema Extractor} and a \emph{Schema-aware Context Extractor}. Experimental results demonstrate that Track-SQL achieves state-of-the-art performance on the SparC and CoSQL datasets. Furthermore, detailed ablation studies reveal that Track-SQL significantly improves execution accuracy in multi-turn interactions by 7.1\% and 9.55\% on these datasets, respectively. Our implementation will be open-sourced at https://github.com/DMIRLAB-Group/Track-SQL.

Motivation & Objective

  • Address the decline of single-turn Text-to-SQL performance when moving to multi-turn dialogues.
  • Develop a dynamic schema linking mechanism to handle evolving dialogue contexts.
  • Design a context extraction module to select relevant historical queries for current SQL generation.
  • Improve explainability by making extractor outputs transparent to the SQL generator.
  • Demonstrate state-of-the-art performance on SparC and CoSQL with ablation studies.

Proposed method

  • Propose Track-SQL framework with two extractors: Semantic-enhanced Schema Extractor (SESE) and Schema-aware Context Extractor (SACE).
  • SESE enriches schema semantics with open-domain knowledge and a gating mechanism to produce enhanced table and column embeddings.
  • SACE retrieves and scores relevant past SQL queries using semantic similarity (SentenceBERT) and Jensen-Shannon divergence on schema usage, to select a base prompt for generation.
  • Combine extracted schemas and base SQL with past questions to form prompt information for supervised fine-tuning of a SQL generator.
  • Transform multi-turn data into a single-turn-like training instance by concatenating questions and supplying E(S) and SQL_base as prompt context.
  • Fine-tune 7B-scale models (CodeLlama, DeepSeek, Mistral) with LoRA, evaluating on SparC and CoSQL datasets.
Figure 1: The overall framework of Dual-Extractive Modules for Schema and Context Tracking. The framework trains a schema item classification model and an SQL generator. Based on the former, we construct a Semantic-enhanced Schema Extractor and a Schema-aware Context Extractor . The extraction resul
Figure 1: The overall framework of Dual-Extractive Modules for Schema and Context Tracking. The framework trains a schema item classification model and an SQL generator. Based on the former, we construct a Semantic-enhanced Schema Extractor and a Schema-aware Context Extractor . The extraction resul

Experimental results

Research questions

  • RQ1How can dynamic schema linking be effectively updated across turns to reduce redundancy and mis-linking?
  • RQ2Can a context-aware retrieval mechanism improve multi-turn SQL generation by leveraging relevant past queries?
  • RQ3What is the impact of semantic enhancement of schema items on schema-item extraction and downstream SQL accuracy?
  • RQ4Does the Track-SQL approach achieve state-of-the-art results on SparC and CoSQL benchmarks in both single-turn and multi-turn settings?

Key findings

  • Track-SQL achieves leading results on SparC and CoSQL validation sets compared to prior in-context learning and fine-tuning methods.
  • Ablation studies show that removing SESE or SACE degrades QM/IM and EX/TS metrics, confirming their individual contributions.
  • SESE substantially reduces redundancy in schema extraction, especially on CoSQL, improving localization accuracy.
  • SACE provides robust historical-context usage with syntactic error checks to prevent propagation, improving multi-turn SQL generation stability.
  • Overall, Track-SQL improves multi-turn execution accuracy by around 7% on SparC and 9.6% on CoSQL in ablations, and yields end-to-end latency suitable for real-time systems.
Figure 2: The results of the ablation study on the Codellama 7B+Track-SQL model on the SparC and CoSQL dev sets (calculated using the multi-turn TS metrics).
Figure 2: The results of the ablation study on the Codellama 7B+Track-SQL model on the SparC and CoSQL dev sets (calculated using the multi-turn TS metrics).

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.