OpenSQL: Data-Efficient Text-to-SQL for Open-Source LLMs via Synthesized Intermediate Supervision

vldb26-1853 · Regular Research · Ruilin Hu, Yuyu Luo, Guoliang Li, Shuangqiao Wu, Yun Luo
Abstract

The Text-to-SQL task enables non-expert users to query structured data through natural language. While recent methods based on closed-source large language models (LLMs) achieve strong performance, their high inference cost, data privacy concerns, and limited transparency hinder real-world deployment. Open-source LLMs are a promising alternative; however, training them for Text-to-SQL remains challenging due to scarce task-specific annotations and the difficulty of learning reliable grounding and reasoning solely from sparse end-to-end supervision. To address these challenges, we present OpenSQL, a data-efficient framework that improves Text-to-SQL performance of open-source LLMs via synthesized intermediate supervision. OpenSQL converts limited (Question, SQL) pairs into rich, task-decomposed training signals that guide the model to learn critical intermediate decisions. Concretely, (1) we train a global–local schema linking module with schema-aware learning to identify and refine relevant tables and columns; (2) we introduce reasoning-enhanced SQL generation, which produces diverse candidates along complementary reasoning paths and selects the best one through stepwise clause-level and semantic-level reasoning; and (3) we design a task-aware data augmentation pipeline that provides the intermediate supervision signals to support the entire training process. With the same 32B LLM backbone, OpenSQL achieves 70.0% accuracy on BIRD-dev using only 14K training samples, outperforming the advanced open-source Text-to-SQL model, OmniSQL, which uses 2.5M training samples.

Assigned reviewers

No reviewers assigned yet.

Candidates from the panel ranked by taxonomy affinity

#ReviewerMatchLoadWhy