arXiv:2608.28447cs.AIAug 2026

Manuscript Offprint

arXiv:2608.28447

Learning to Use Tools: Reinforcement Learning for Tool-Integrated Mathematical Reasoning

Minghui Xu, Zi Wang

Abstract

Current large language models (LLMs) increasingly benefit from external tool integration, especially for tasks requiring reliable computation and verification. Motivated by this, we study calculator tool calling for improving mathematical reasoning on the Countdown task. We first analyze reasoning failures and find that calculation errors account for a substantial portion of incorrect responses. We then construct supervised fine-tuning datasets to teach the model useful tool-use patterns and how to interpret returned outputs. Building on this tool-formatted policy, we apply several on-policy reinforcement learning methods, including RLOO, RLOO++, GRPO, and DAPO, using automatically verifiable final-answer rewards. To enable a more reliable evaluation, we construct a fresh 1,024-problem held-out Countdown benchmark with no exact overlap with the training data. Our results show that calculator tool integration consistently improves both SFT and RL baselines, yielding roughly 10 percentage-point gains across pass@k. Among the RL methods, Tool-DAPO achieves the strongest performance, improving pass@1 from 35.8% for Tool-SFT to 66.0%. Further analysis shows that RL encourages more effective tool use even when only final-answer rewards are provided. These findings suggest that tool integration reduces arithmetic and verification errors, while RL increases the probability of correct reasoning traces.

1 Introduction

Large language models (LLMs) have become increasingly capable in coding and mathematical reasoning, especially when prompted or trained to generate intermediate reasoning steps. However, even reasoning-oriented LLMs can still make arithmetic and logical mistakes, particularly in multi-step problems that require exact numerical computation. This limitation arises partly from tokenization and autoregressive next-token prediction, which do not provide an explicit mechanism for reliable calculation or verification. As a result, integrating external tools has become an important direction for improving LLM reliability on tasks that require precise computation (Schick et al., 2023; Yao et al., 2023).

In this work, we study tool-integrated mathematical reasoning on the Countdown task, where the model must combine a set of given numbers using arithmetic operations to reach a target value, as shown in Fig. 1. Countdown is a useful testbed because success requires both combinatorial reasoning and exact arithmetic, and the final answer can be automatically verified. During the LLM math reasoning process, if it gives the correct answer, then it will be firstly validated by calculator and then output the final answer. If the math reasoning reaches a arithmetic error, it will use the calculator to correct it and continue the math reasoning based on the correct answer, preventing model deviating from correct solutions. We investigate this problem using a sequence of no-tool and tool-integrated training pipelines. We first construct supervised fine-tuning (SFT) baselines and then apply several on-policy reinforcement learning (RL) methods, including RLOO (Ahmadian et al., 2024), RLOO++ (Hu, 2025), GRPO (Shao et al., 2024), and DAPO (Yu et al., 2026), using automatically computed rewards from the Countdown verifier (Ahmadian et al., 2024; Shao et al., 2024; Yu et al., 2026). For tool-augmented models, rollouts may include calculator calls enclosed by <tool>... </tool> tags; the environment executes the expression and inserts the result as an <obs> observation before generation continues. We evaluate all methods on both the original 50-problem public test split and a larger fresh 1,024-problem held-out benchmark designed to remove exact training overlap.

Our main contributions are:

• We build a tool-integrated Countdown training and evaluation pipeline with live calculator execution during model rollouts.

• We show that tool integration consistently improves both SFT and RL models, and that Tool-DAPO achieves the strongest performance among the tested methods.

• We analyze error categories, tool-call dynamics, and correctness distributions to explain when RL and tool use improve mathematical reasoning and where they still fail.

Figure

Figure 1: Schematic of RL for tool-integrated LLM on math reasoning.