arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.08068cs.AI
收藏

上下文强化学习用于大型语言模型中的工具使用

In-Context Reinforcement Learning for Tool Use in Large Language Models

National University of Singapore(新加坡国立大学);Salesforce AI Research(Salesforce AI研究);University of California Berkeley(加州大学伯克利分校);University of California, Santa Cruz(加州大学圣克ruz分校)

Yaoqi Ye, Yiran Zhao, Keyu Duan, Zeyu Zheng, Kenji Kawaguchi, Cihang Xie, Michael Qizhe Shieh

AI总结:

本文提出ICRL框架,通过强化学习无需微调即可实现大型语言模型的工具使用能力,实验显示其在推理和工具任务中表现优异。

摘要:

尽管大型语言模型(LLMs)表现出强大的推理能力,但它们在复杂任务上的表现往往受到内部知识限制的制约。一种克服这一挑战的有吸引力的方法是通过外部工具增强这些模型——例如用于数学计算的Python解释器或用于检索事实信息的搜索引擎。然而,使模型有效使用这些工具仍然是一个重大挑战。现有方法通常依赖于冷启动流程,从监督微调(SFT)开始,随后是强化学习(RL)。这些方法通常需要大量标记数据进行SFT,这注释或合成成本很高。在本工作中,我们提出了上下文强化学习(ICRL),一种仅基于强化学习的框架,通过在强化学习的 rollout 阶段利用少样本提示来消除 SFT 的需求。具体来说,ICRL 在 rollout 提示中引入上下文示例,以教导模型如何调用外部工具。此外,随着训练的进行,上下文示例的数量逐渐减少,最终达到零样本设置,其中模型学会独立调用工具。我们在一系列推理和工具使用基准上进行了广泛实验。结果表明,ICRL 实现了最先进的性能,证明了其作为传统 SFT 基础流程的可扩展、数据高效的替代方案的有效性。

英文摘要:

While large language models (LLMs) exhibit strong reasoning abilities, their performance on complex tasks is often constrained by the limitations of their internal knowledge. A compelling approach to overcome this challenge is to augment these models with external tools -- such as Python interpreters for mathematical computations or search engines for retrieving factual information. However, enabling models to use these tools effectively remains a significant challenge. Existing methods typically rely on cold-start pipelines that begin with supervised fine-tuning (SFT), followed by reinforcement learning (RL). These approaches often require substantial amounts of labeled data for SFT, which is expensive to annotate or synthesize. In this work, we propose In-Context Reinforcement Learning (ICRL), an RL-only framework that eliminates the need for SFT by leveraging few-shot prompting during the rollout stage of RL. Specifically, ICRL introduces in-context examples within the rollout prompts to teach the model how to invoke external tools. Furthermore, as training progresses, the number of in-context examples is gradually reduced, eventually reaching a zero-shot setting where the model learns to call tools independently. We conduct extensive experiments across a range of reasoning and tool-use benchmarks. Results show that ICRL achieves state-of-the-art performance, demonstrating its effectiveness as a scalable, data-efficient alternative to traditional SFT-based pipelines.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑