Seedlabs
Source research

ReTool: Reinforcement Learning for Strategic Tool Use in LLMs

Jiazhan Feng, Shijue Huang, Xingwei Qu, Ge ZHANG, Qin, Yujia, Zhong, Baoquan et al. · 2026 · 474 citationsRead the paper

While reasoning models (e.g., DeepSeek R1) trained with reinforcement learning (RL), excel in textual reasoning, they struggle in scenarios requiring structured problem-solving, such as geometric reasoning, concise computation, or complex equation solving-areas where computational tools like code interpreters (CI) demonstrate distinct advantages. To bridge this gap, we propose ReTool, which enhances long-form reasoning with tool-integrated learning, including two key features: (1) dynamic interleaving of real-time code execution within natural language reasoning processes, and (2) an automated RL paradigm that allows policy rollouts with multi-turn real-time code execution and teaches the model in learning when and how to invoke tools based on outcome feedback. ReTool employs a systematic training framework, beginning with synthetic cold-start data generation to produce code-augmented long-form reasoning traces for fine-tuning base models. Subsequent RL training leverages task outcomes as rewards to iteratively refine the model's tool use strategy, enabling autonomous discovery of optimal tool invocation patterns without human priors. Experiments on the challenging MATH Olympiad benchmark AIME demonstrate ReTool's superiority: Our 32B model achieves 67% accuracy with 400 training steps, outperforming text-based RL baseline (40% accuracy, 1080 steps) in efficiency and performance. Remarkably, ReTool-32B attains 72.5% accuracy in extended settings, surpassing OpenAI's o1-preview by 27.9%. Further analysis reveals emergent behaviors such as code self-correction, signaling an ''aha moment'' in which the model autonomously masters adaptive tool use. These findings highlight the promise of outcome-driven tool integration for advancing complex mathematical reasoning and offer new insights into hybrid neuro-symbolic systems.

What the full text shows

Working prototype
  • ReTool (DeepSeek-R1-Distill-Qwen-32B) achieved the highest accuracy on AIME benchmarks. — 72.5% accuracy on AIME2024 and 54.3% on AIME2025 (Extended settings using DeepSeek-R1-Distill-Qwen-32B backbone)
  • ReTool (Qwen2.5-32B-Instruct) outperformed the text-based RL baseline in both accuracy and training efficiency. — 67.0% accuracy (400 steps) vs 40.0% accuracy (1080 steps) on AIME2024 (Qwen2.5-32B-Instruct backbone)
  • ReTool (Qwen2.5-32B-Instruct) surpassed OpenAI o1-preview on AIME2025. — 11.4% gain (AIME2025 benchmark)
  • Cold-start SFT provided a significant performance boost over the base model. — 40.9% accuracy vs 26.7% accuracy on AIME2024 (Qwen2.5-32B-Instruct backbone)
Setup
Evaluated on AIME2024 and AIME2025 benchmarks; models used include Qwen2.5-32B-Instruct and DeepSeek-R1-Distill-Qwen-32B; evaluation repeated 32 times for pass@1 estimation.
How
The framework uses a two-stage process: synthetic cold-start SFT using code-augmented reasoning traces, followed by PPO-based reinforcement learning. The RL phase integrates a code sandbox for real-time, multi-turn execution with rule-based outcome rewards.
Limitations
Reliance on synthetic cold-start data for initial tool-use competency · Evaluation focused primarily on mathematical Olympiad benchmarks (AIME)

Summarized by Gemma 4 from the open-access full text · 25 Nov 2026. Read it