AI Agents 相关度: 9/10

TRUST-SQL: Tool-Integrated Multi-Turn Reinforcement Learning for Text-to-SQL over Unknown Schemas

Ai Jian, Xiaoyun Zhang, Wanrou Du, Jingqing Ruan, Jiangbo Pei, Weipeng Zhang, Ke Zeng, Xunliang Cai
arXiv: 2603.16448v1 发布: 2026-03-17 更新: 2026-03-17

AI 摘要

TRUST-SQL利用工具集成强化学习解决未知模式下的Text-to-SQL问题,显著提升了查询准确率。

主要贡献

  • 提出TRUST-SQL框架,处理未知模式下的Text-to-SQL
  • 引入四阶段协议和Dual-Track GRPO策略
  • token-level masked advantages解决信用分配问题

方法论

将Text-to-SQL任务建模为POMDP,使用强化学习训练agent,通过结构化协议和新型GRPO策略进行schema探索。

原文摘要

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.

标签

Text-to-SQL 强化学习 数据库 未知模式 工具集成

arXiv 分类

cs.AI