Tool-Augmented Policy Optimization: Synergizing Reasoning and Adaptive Tool Use with Reinforcement Learning

Wenxun Wu, Yuanyang Li, Guhan Chen, Linyue Wang, Hongyang ChenarXiv 2025 · DOI

Introduction

Large Language Models (LLMs) have demonstrated impressive capabilities in Chain-of-Thought reasoning. However, they remain constrained by two primary limitations: knowledge cutoffs and limited computational precision for complex mathematics. While Retrieval-Augmented Generation (RAG) and function calling offer pathways to external information, they often bypass the intermediate reasoning necessary for multi-hop problems. Furthermore, training models to use tools via Reinforcement Learning (RL) frequently results in "reward hacking," where models generate redundant tool calls to exploit reward signals.

Tool-Augmented Policy Optimization (TAPO) is introduced as a novel RL framework designed to train LLMs to seamlessly interleave multi-step reasoning with external tools like search engines and Python interpreters. By optimizing both reasoning ("thinking") and tool use ("acting") simultaneously, TAPO achieves state-of-the-art performance while significantly improving tool-use efficiency.

Methods: Structured Interleaving and Policy Optimization

TAPO is built upon a modified version of Dynamic Sampling Policy Optimization (DAPO). The framework emphasizes a structured interaction between the model and its environment using specialized XML-like tags.

Structured Interleaving

The model utilizes a specific vocabulary of tags—<think>, <search>, <code>, <response>, and <answer>—to delineate internal reasoning from external interactions. This structure allows the model to "think" before deciding whether a tool call is necessary.

Example of TAPO's structured interleaving of internal reasoning and external tool calls to solve a multi-step factual and mathematical query.

Training Objectives

To prevent the model from being penalized for external data it did not generate, TAPO employs Response Masking, applying a binary mask to the loss function during RL training. The reward function is multi-faceted, balancing three key objectives:

  1. Accuracy: Evaluated via semantic similarity for factual queries and exact matches for mathematical tasks.
  2. Format Compliance: Penalties are applied for failing to adhere to the XML tagging structure.
  3. Length Penalty: A soft penalty discourages verbosity and redundant tool calls, training the model to be concise.

Datasets

The researchers developed two comprehensive datasets to evaluate tool-augmented reasoning:

  • TAPO-easy-60K: Comprising 27,000 math problems and 33,000 factual questions, including the Calculator-6K subset designed for high-precision arithmetic.
  • TAPO-hard-18K: Featuring Complex-8K, which requires multi-hop web searches followed by mathematical computation.

Key Results and Performance Analysis

TAPO-trained models (Qwen2.5-3B and 7B) demonstrate significant improvements over base instruct models across various benchmarks.

Efficiency and Accuracy

A critical finding is that explicit reasoning acts as a "governor" for tool use. By thinking first, the model makes higher-quality, more deliberate tool calls. As shown in the performance metrics, TAPO-trained models often achieve higher accuracy with fewer or more targeted tool calls compared to standard methods.

Comparison of tool-use frequency (Search and Code) and accuracy across various benchmarks, showing TAPO's ability to increase accuracy while often reducing redundant tool calls.

On the Calculator-6K benchmark, the TAPO-trained Qwen2.5-7B reached 98.6% accuracy. Most notably, on the difficult Complex-8K dataset, accuracy jumped from 9.6% (base model) to 68.7%. In comparison to other RL-based search models, TAPO maintains high accuracy on the Natural Questions (NQ) dataset while utilizing significantly fewer search calls, effectively curbing "over-searching" behavior.

Limitations and Future Directions

Despite its success, TAPO faces several challenges:

  • Computational Efficiency: Training is currently hindered by "GPU idleness" while waiting for external API or code execution responses. Future work will explore overlapping I/O with inference.
  • Model Scaling: Smaller models (e.g., 3B) struggle to learn reasoning and tool-calling simultaneously from scratch, suggesting a need for specialized Supervised Fine-Tuning (SFT) "cold-start" phases.
  • Entropy Collapse: A decline in model entropy during training suggests a potential reduction in output diversity, which may impact performance on creative tasks.

Conclusion

TAPO represents a significant step forward in teaching LLMs to use tools adaptively. By integrating reasoning directly into the tool-calling loop and optimizing for efficiency through RL, the framework enables models to solve complex, multi-step problems that were previously out of reach for standard instruct models.

Summary updated

BibTeX
@misc{wu2025tool,
  author = {Wenxun Wu and Yuanyang Li and Guhan Chen and Linyue Wang and Hongyang Chen},
  title = {{Tool-Augmented Policy Optimization: Synergizing Reasoning and Adaptive Tool Use with Reinforcement Learning}},
  year = {2025},
  eprint = {2510.07038},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.07038},
}
Figure