Beyond Static Pipelines: Learning Dynamic Workflows for Text-to-SQL
Yihan Wang, Peiyu Liu, Runyu Chen, Wei Xu

TL;DR
This paper introduces SquRL, a reinforcement learning framework that enables text-to-SQL systems to adaptively construct dynamic workflows at inference time, significantly improving performance over static methods especially on complex and out-of-distribution queries.
Contribution
The paper proposes a novel RL-based approach for dynamic workflow construction in text-to-SQL, with theoretical analysis and new training mechanisms that outperform static workflows.
Findings
Dynamic workflows outperform static ones on benchmarks.
Significant gains on complex and out-of-distribution queries.
Effective training mechanisms improve RL-based workflow adaptation.
Abstract
Text-to-SQL has recently achieved impressive progress, yet remains difficult to apply effectively in real-world scenarios. This gap stems from the reliance on single static workflows, fundamentally limiting scalability to out-of-distribution and long-tail scenarios. Instead of requiring users to select suitable methods through extensive experimentation, we attempt to enable systems to adaptively construct workflows at inference time. Through theoretical and empirical analysis, we demonstrate that optimal dynamic policies consistently outperform the best static workflow, with performance gains fundamentally driven by heterogeneity across candidate workflows. Motivated by this, we propose SquRL, a reinforcement learning framework that enhances LLMs' reasoning capability in adaptive workflow construction. We design a rule-based reward function and introduce two effective training…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Database Systems and Queries · Business Process Modeling and Analysis · Scientific Computing and Data Management
