Paper 2603.16448
TRUST-SQL: Tool-Integrated Multi-Turn Reinforcement Learning for Text-to-SQL over Unknown Schemas
- Published
- Mar 2026
- Research lab
- Independent
- Citations
- 3
- GitHub
- Not linked
01 In brief
Summary
TRUST-SQL addresses Text-to-SQL parsing under the Unknown Schema setting, where databases have hundreds of tables and noisy metadata, making full schema prefilling impractical.
The task is formulated as a Partially Observable Markov Decision Process, and the agent follows a four-phase protocol (Explore, Propose, Generate, Confirm) to ground reasoning in verified metadata.
A key contribution is Dual-Track GRPO, a training strategy using token-level masked advantages to separate exploration and execution rewards, yielding a 9.9% relative improvement over standard GRPO on BIRD-Dev.
Experiments across five benchmarks show average absolute improvements of 30.6% for the 4B variant and 16.6% for the 8B variant over base models.
Despite operating without pre-loaded metadata, TRUST-SQL matches or surpasses baselines that rely on schema prefilling.
Ablations show that the Propose checkpoint reduces hallucination by 9.4x, and that coupling schema rewards with execution rewards is critical.
The framework also demonstrates efficient inference, with TRUST-SQL-4B achieving 64.9% accuracy on BIRD-Dev with only 2.83K tokens and 0.6 seconds latency.
02 From the paper
Abstract
Text-to-SQL parsing has achieved remarkable progress under the Full Schema Assumption. However, this premise fails in real-world enterprise environments where databases contain hundreds of tables with massive noisy metadata. Rather than injecting the full schema upfront, an agent must actively identify and verify only the relevant subset, giving rise to the Unknown Schema scenario we study in this work. To address this, we propose TRUST-SQL (Truthful Reasoning with Unknown Schema via Tools). We formulate the task as a Partially Observable Markov Decision Process where our autonomous agent employs a structured four-phase protocol to ground reasoning in verified metadata. Crucially, this protocol provides a structural boundary for our novel Dual-Track GRPO strategy. By applying token-level masked advantages, this strategy isolates exploration rewards from execution outcomes to resolve credit assignment, yielding a 9.9% relative improvement over standard GRPO. Extensive experiments across five benchmarks demonstrate that TRUST-SQL achieves an average absolute improvement of 30.6% and 16.6% for the 4B and 8B variants respectively over their base models. Remarkably, despite operating entirely without pre-loaded metadata, our framework consistently matches or surpasses strong baselines that rely on schema prefilling.