Skip to content
Preprint

SPOC-SQL: Stage-wise Preference Optimization for Controllable Text-to-SQL

Aug 2026 · 0 citations · 22 references
Computer Science

TL;DR

SPOC-SQL is proposed, which decomposes Text-to-SQL into four sequential subtasks following standard SQL execution logic and designs stage-specific optimization strategies for the model to learn key decisions, with the objective of enhancing structured decision-making during query construction.

Abstract

Text-to-SQL aims to translate natural language questions into executable SQL queries over relational databases, requiring multi-stage structured reasoning over database schemas and query constraints. However, existing methods treat this task as single-step generation, where models optimize entire SQL sequences without targeted feedback at key decision points and lack support for interacting with and controlling the intermediate generation process. To address this issue, we propose SPOC-SQL, which decomposes Text-to-SQL into four sequential subtasks following standard SQL execution logic and designs stage-specific optimization strategies for the model to learn key decisions. Specifically, we propose the implementation of fine-grained preference optimisation at key decision points across SQL stages, with the objective of enhancing structured decision-making during query construction. Furthermore, a structured decomposition strategy is designed, facilitating stage-wise intervention and correction through explicit intermediate representations. This results in more controllable and reliable SQL generation. Experiments demonstrate that incorporating stage-wise human knowledge consistently improves performance, validating the effectiveness of stage perception controllable generation.

View source

Similar papers

Open access Jul 2026

Schema-Guided Prompt Strategies for Text-to-SQL over Relational Databases Using Local LLMs

It is suggested that structured prompt engineering provides a practical alternative to model fine-tuning for locally deployed LLMs, offering an effective balance between SQL generation accuracy, computational efficiency, and data privacy.

Nurjayanti Nurjayanti, A. Adiwijaya, A. Romadhony et al. · 0 citations
Open access Jul 2026

GradeSQL: Outcome reward models for intelligent Text-to-SQL generation from LLMs

As Large Language Models (LLMs) become foundational to next-generation Intelligent Information Systems, the bridge between natural language interfaces and structured database systems remains a critical bottleneck. While Text-to-SQL generation enables cooperative support for complex query formulation, ensuring the rel...

M. Tritto, G. Farano, Dario Di Palma et al. · 2 citations
Preprint Jul 2026

SQuaD-SQL: Efficient Text-to-SQL with Small Language Models via LLM-Guided Knowledge Distillation

SQuaD-SQL (Small-Qualified and Distilled for SQL), a novel approach that empowers small language models to approach the performance of LLMs on the Text-to-SQL task while significantly improving efficiency through knowledge distillation and synthetic data generation, is introduced.

Wangyu Wu, Xiaojian Lin, Rong Fu et al. · 0 citations
2026

Optimizing Large Language Models for Robust Domain-Specific Text-to-SQL: From Prompting to Preference Alignment

This work compares Proximal Policy Optimization (PPO), Direct Preference Optimization (DPO), and Odds Ratio Preference Optimization (ORPO) using a novel reward modeling approach based on execution and semantic principles, revealing that while standard PPO suffers from reward sparsity and catastrophic collapse on 7B mod...

Noah Hampp, Katya Mirylenka, Michael R. Glass · 1 citation
Preprint Aug 2026

ACTS-SQL: Agentic and Critic-Oriented Tree-Structured SQL Correctness with Large Language Models

This work presents a training-free framework that formulates SQL correction as a plan-guided, tree-structured debugging process that mitigates error accumulation during iterative refinement and demonstrates the effectiveness and stability of the approach in real-world deployments.

Xinmei Huang, Jie Song, Peng Li et al. · 0 citations
Jul 2026

Benchmarking Text-to-SQL under Role-Based Access Control

A comprehensive text-to-SQL benchmarking framework with realistic RBAC constraints is presented, which features an LLM-assisted workflow that augments existing text-to-SQL benchmarks with plausible user roles and access policies, and contains evaluation metrics that identify RBAC-specific failure modes, and disentangle...

Yang Fei, Yangfan Jiang, Yin Yang et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.