GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
arXiv preprint

ReTool: Reinforcement Learning for Strategic Tool Use in LLMs

ReTool trains reasoning models to interleave code execution and reasoning. Examine its outcome rewards, tool-feedback masking and the difference between steps and cost.

Breakdown by FDE Interviews · 10 min read · Updated

About the original · 2025
AUTHORS
Feng, Huang, Qu, Zhang, et al.
FROM
ByteDance Seed
PUBLISHED
Apr 2025 · arXiv preprint
IN THIS BREAKDOWN · 10 SECTIONS

You can read 17% of this breakdown.

01

The paper in one minute

ReTool trains a language model to use a code interpreter while solving mathematical problems. The model writes reasoning, emits a program, receives the actual execution result and continues. Reinforcement learning rewards the final answer, allowing useful tool-use strategies to become more likely over training.

The process starts with supervised demonstrations so the model can already produce the required interaction format. During the later RL stage, the interpreter is part of the rollout environment. A failed program can return an error that the model uses to revise its approach; a successful program can provide a calculation that supports the next reasoning step.

The primary experiment uses Qwen2.5-32B-Instruct. It reports 67.0% on AIME 2024 after 400 optimizer steps, compared with 40.0% for a text-only RL baseline after 1,080 steps. Those are accuracy and update-count comparisons. They do not establish an equivalent reduction in wall-clock time or total compute, because tool execution changes the work performed during each rollout.

The official project provides the authors' release links. This breakdown examines the April 2025 report as evidence about learning an interaction policy, with particular attention to what the outcome reward does and does not verify.

THE IDEA, VISUALLY
RUNNING CODE IS ONLY ONE CHECK Our toy task: choose items from 6, 4 and 3 to fill a budget of 7 as closely as possible. Propose and execute Greedy selection returns 6 Inspect the result Valid program; suboptimal answer Revise the method Enumerate: 4 + 3 = 7 Execution check: passed No exception, result within the budget Outcome check: failed → passed Compare against an independent optimum ReTool trains from final outcomes while exposing real tool feedback. This example is ours, not a paper benchmark.
Our executed packing example separates successful code execution from a correct task outcome. The feedback can motivate a revised method, but the example does not reproduce ReTool training.
Research notes: the problem, approach and results
67.0%

AIME24, Qwen2.5-32B ReTool, Table 1

40.0%

text-only RL comparison, Table 1

400

ReTool optimizer steps, Figure 1

THE PROBLEM

Text reasoning can struggle with exact calculation, and imitation alone does not teach an effective tool-use policy.

THE IDEA

Start with tool-augmented demonstrations, then train with real code execution inside rollouts and rewards for final answers.

THE RESULT

The primary Qwen2.5-32B experiment improves AIME scores, with fewer optimizer steps but additional interpreter work that must be counted.

02

Why it matters to an FDE

An enterprise assistant often needs to move between prose and deterministic operations. A calculator, query engine or constrained analysis tool can produce evidence that a model cannot reliably invent. The engineering problem is deciding when to call it, how to use the result and when the result is insufficient.

ReTool makes those decisions part of training. That is relevant when a team already has repeated, measurable failures in a bounded workflow and can build trustworthy outcome checks. It cannot repair a broken integration or define success on the customer's behalf. Fix those problems before funding a training run.

The paper also helps explain a common demonstration trap: code can run without solving the right problem. The tool-calling contract checks an action's shape; the task verifier checks its meaning. Both belong beside the model, along with sandboxing appropriate to the execution environment.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 199 more papers.

Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.

6 months · One payment · No auto-renewal

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>2 runnable code blocks
  • ▦3 results tables
  1. 03Key takeaways

    Six distinctions for evaluating tool-trained reasoning without confusing execution and correctness

    Free account
  2. 04How it works

    Follow cold-start demonstrations, live interpreter rollouts and final-answer rewards

    Premium
  3. 05The numbers that matter

    Read benchmark scores with their backbone, attempt protocol and resource exclusions

    Premium
  4. 06Try it yourself

    Recompute the headline comparisons and distinguish executable code from an optimal answer

    Premium
  5. 07Where it breaks

    Recognize reward shortcuts, environment mismatch and hidden tool costs

    Premium
  6. 08Using it on a deployment

    Build the verifier and execution contract before considering tool-use reinforcement learning

    Premium
  7. 09Interview angles

    Explain feedback masking, verifier design and a misleading training-efficiency claim

    Premium
Back to the paper library →