arXiv:2509.21459cs.CLcs.AI2025-09被引 3

用强化学习让AI更准地把自然语言转成SQL,无需额外数据。

A State-of-the-Art SQL Reasoning Model using RLVR

  • 基于可验证奖励的强化学习框架,分阶段训练模型。
  • 在BIRD基准上达75.68%准确率,优于现有方法且生成次数更少。
  • 适合企业级数据查询、业务分析等实际场景使用。

通过强化学习(RL)开发可融入企业专属知识的定制化推理模型具有巨大潜力,尤其在奖励函数可验证的场景下(称为RLVR)。本文将RLVR应用于衡量AI将自然语言查询转换为SQL执行能力的流行基准BIRD。采用包含精心设计提示与模型选择、基于离线强化学习方法TAO的预热阶段,以及严格的在线RLVR训练的通用训练流程。仅使用BIRD训练集,未引入额外数据或专有模型,首次提交即在私有测试集上达到73.56%的准确率(无自一致性),75.68%(含自一致性)。后者还比第二名方法所需生成次数更少。尽管BIRD仅为代理任务,但该框架简洁高效,可广泛应用于商业智能、数据科学和编码等企业领域。

原文摘要 · Abstract (English)

Developing custom reasoning models via Reinforcement Learning (RL) that can incorporate organization-specific knowledge has great potential to address problems faced by enterprise customers. In many of these problems, the reward function is verifiable, a setting termed RL with Verifiable Rewards (RLVR). We apply RLVR to a popular data science benchmark called BIRD that measures the ability of an AI agent to convert a natural language query for a database to SQL executions. We apply a simple and general-purpose training recipe involving careful prompt and model selection, a warm-up stage using our offline RL approach called TAO, followed by rigorous online RLVR training. With no additional training data beyond the BIRD training set and no use of proprietary models, our very first submission to the BIRD leaderboard reached state-of-the-art accuracy on the private test set: 73.56% without self-consistency and 75.68% with self-consistency. In the latter case, our model also required fewer generations than the second-best approach. While BIRD is only a proxy task, the simplicity of our framework makes it broadly applicable to enterprise domains such as business intelligence, data science, and coding.

SQL生成强化学习企业应用

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。