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

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Ye, Yaoqi, Zhao, Yiran, Duan, Keyu, Zheng, Zeyu, Kawaguchi, Kenji, Xie, Cihang, Shieh, Michael Qizhe
Format: Preprint
Veröffentlicht: 2026
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866914379764596736
author Ye, Yaoqi
Zhao, Yiran
Duan, Keyu
Zheng, Zeyu
Kawaguchi, Kenji
Xie, Cihang
Shieh, Michael Qizhe
author_facet Ye, Yaoqi
Zhao, Yiran
Duan, Keyu
Zheng, Zeyu
Kawaguchi, Kenji
Xie, Cihang
Shieh, Michael Qizhe
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2603_08068
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle In-Context Reinforcement Learning for Tool Use in Large Language Models
Ye, Yaoqi
Zhao, Yiran
Duan, Keyu
Zheng, Zeyu
Kawaguchi, Kenji
Xie, Cihang
Shieh, Michael Qizhe
Artificial Intelligence
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.
title In-Context Reinforcement Learning for Tool Use in Large Language Models
topic Artificial Intelligence
url https://arxiv.org/abs/2603.08068