Skip to main content
Back

NUS Researchers' ICRL Teaches AI Tool Use Without Thousands of Labeled Examples

ICRL trains LLMs to use tools like search engines and code interpreters using only RL and a handful of examples, no labeled data required

Pro

  • ICRL is a new RL-only training framework that teaches LLMs to use external tools (search, code execution) without any supervised fine-tuning or labeled data.
  • It works by embedding a few tool-use examples directly into RL rollout prompts, then gradually removing them across a 3-stage curriculum (3-shot → 2-shot → 0-shot).
  • On Qwen2.5-3B, ICRL hits 40.16 average exact match across 5 QA benchmarks, beating the prior best (Search-R1 at 31.10) by +8.94 points.
  • ICRL outperforms O2-Searcher -- which uses a full cold-start SFT phase -- despite requiring zero labeled trajectories.
  • The method generalizes to math reasoning: on AIME 2025, ICRL surpasses ReTool (an SFT+RL baseline) 51.7 vs. 49.3 using Qwen3-8B.
  • Code is open-source and built on VeRL; only 3 hand-crafted examples are needed to bootstrap training.

Teaching a language model to reliably call external tools -- a search engine, a Python interpreter, an API -- has always required a painful bootstrapping step: collect thousands of labeled examples of correct tool use, fine-tune the model on them, and only then start reinforcement learning. A new paper from researchers at NUS, Salesforce AI Research, UC Berkeley, and UC Santa Cruz proposes skipping that entire first step entirely.

The method is called In-Context Reinforcement Learning (ICRL), and the core idea is disarmingly simple: instead of pre-training the model on labeled tool-use trajectories, just show it a few examples inside the RL rollout prompt itself, then gradually take those examples away as training progresses. The model learns to call tools on its own, driven entirely by reward signals.

Why the old pipeline was expensive

LLMs exhibit strong reasoning abilities, but their performance on complex tasks is often constrained by the limitations of their internal knowledge -- a natural fix is to augment them with external tools such as Python interpreters for mathematical computations or search engines for retrieving factual information. The problem is getting them to use those tools reliably.

Existing methods typically rely on cold-start pipelines that begin with supervised fine-tuning (SFT) followed by reinforcement learning. These approaches often require substantial amounts of labeled data for SFT, which is expensive to annotate or synthesize. Generating high-quality tool-use traces at scale -- showing the model exactly when to search, what to search for, and how to interpret results -- is a significant bottleneck for anyone trying to build a tool-augmented model without a large annotation budget.

The curriculum trick

ICRL replaces the SFT stage with a curriculum baked directly into the RL training loop. ICRL introduces in-context examples within the rollout prompts to teach the model how to invoke external tools. 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.

ICRL training workflow showing 3-shot, 2-shot, and 0-shot rollout template progression

Concretely, the training runs in three stages: 3-shot, then 2-shot, then 0-shot. At each stage the model generates rollouts, receives rewards, and updates its weights via GRPO (Group Relative Policy Optimization -- an RL algorithm that scores each response relative to a batch of other responses to the same question). The few-shot examples in the prompt act as soft supervision during the early stages, steering exploration without requiring any labeled trajectories. By the final stage, those examples are gone and the model has internalized the behavior.

The rollout format uses structured XML tags to separate reasoning from tool calls:

<think> I need to find who set the two-term precedent. </think>
<search> president who set two term limit precedent </search>
<information> ... top-3 retrieved docs ... </information>
<think> George Washington. Now I need his inauguration date. </think>
<search> when did George Washington enter office </search>
<information> ... </information>
<answer> April 30, 1789 </answer>

The reward function combines two signals: exact-match accuracy against the ground-truth answer (weighted at 0.8) and a format correctness score (0.2) that penalizes missing or malformed XML tags. This dual reward is important -- without the format component, the model can get lazy about actually invoking the tool.

What the numbers look like

ICRL achieves state-of-the-art performance across QA benchmarks. On Qwen2.5-3B, ICRL achieves an average exact match (EM) score of 40.16, surpassing the best competing method, Search-R1 (31.10), by +8.94. The gains are especially large on multi-hop questions -- the kind that require chaining multiple searches together:

  • TriviaQA: 72.6 EM (vs. 57.4 for ZeroSearch, the prior best on 3B)
  • 2Wiki: 39.2 EM (+7.3 over Search-R1)
  • Musique: 20.0 EM (+9.7 over Search-R1)
  • Bamboogle: 33.6 EM
  • HotpotQA: 35.4 EM

On Qwen2.5-7B the story is similar: ICRL achieves an average EM score of 49.12, outperforming the strongest baseline, ParallelSearch (41.78), by +7.34, and achieves the best results on four out of five datasets. Scaling to 14B pushes the average EM to 51.84, a +20.7 point improvement over chain-of-thought prompting alone.

Reward mean across training steps for 3-shot, 2-shot, and 0-shot curriculum stages

The most striking comparison is against O2-Searcher, a method that uses a full cold-start SFT phase before RL. Despite using no labeled tool traces or task-specific supervision, ICRL achieves a higher average EM score of 40.16 compared to 37.26 from O2-Searcher, and outperforms it on four out of five datasets, including substantial gains on TriviaQA (+12.9) and Musique (+4.0).

ICRL also generalizes beyond web search. On AIME 2024 and AIME 2025 math benchmarks -- where the tool is a Python code executor rather than a search engine -- ICRL trained on Qwen3-8B matches ReTool (a strong SFT+RL baseline) on AIME 2024 (64.1 vs. 67.0) and surpasses it on AIME 2025 (51.7 vs. 49.3), again without any supervised pretraining.

What to watch out for

The curriculum schedule matters a lot. The paper compares a 3-stage schedule (3→2→0 shots) against a 4-stage schedule (3→2→1→0). The four-stage curriculum leads to faster decisions, with over 80% of queries finishing within two search turns, but this comes at the cost of answer quality -- on TriviaQA and 2Wiki, the three-stage model reaches 75.4 and 53.6 compared to 20.8 and 26.8 with the four-stage version. Removing examples too aggressively pushes the model toward shallow, single-turn reasoning.

A few other practical constraints worth noting:

  • Training requires 4x A100 80GB GPUs -- not a laptop experiment
  • The few-shot examples in the paper were generated using GPT-5.2, so you need a capable model to bootstrap the demonstrations
  • Evaluation uses live Google Search via the Serper API, so results are tied to retrieval quality at inference time
  • The model is trained on Natural Questions (NQ) only -- the strong out-of-domain results are encouraging, but the training distribution is narrow

The real unlock

The key hypothesis is that in-context demonstrations during RL rollouts can guide exploration and facilitate a curriculum-based transition to autonomous tool use -- and the results validate it. What this means in practice is that the SFT bottleneck for tool-augmented LLMs may be largely avoidable. You need only a handful of hand-crafted examples (the paper uses three), not thousands of annotated trajectories.

The code is publicly available on GitHub, and the framework is built on top of the VeRL reinforcement learning library. The backbone models tested are all from the Qwen2.5 and Qwen3 families, so the setup is reproducible without proprietary infrastructure. For teams looking to add reliable tool use to a mid-sized open model without a large annotation budget, ICRL is now the clearest starting point in the literature.