AutoTIR: Autonomous Tools Integrated Reasoning via Reinforcement Learning

Yifan Wei, Xiaoyan Yu, Yixuan Weng, Tengfei Pan, Angsheng Li, Li DuarXiv 2025

Abstract

Large Language Models (LLMs), when enhanced through reasoning-oriented post-training, evolve into powerful Large Reasoning Models (LRMs). Tool-Integrated Reasoning (TIR) further extends their capabilities by incorporating external tools, but existing methods often rely on rigid, predefined tool-use patterns that risk degrading core language competence. Inspired by the human ability to adaptively select tools, we introduce AutoTIR, a reinforcement learning framework that enables LLMs to autonomously decide whether and which tool to invoke during the reasoning process, rather than following static tool-use strategies. AutoTIR leverages a hybrid reward mechanism that jointly optimizes for task-specific answer correctness, structured output adherence, and penalization of incorrect tool usage, thereby encouraging both precise reasoning and efficient tool integration. Extensive evaluations across diverse knowledge-intensive, mathematical, and general language modeling tasks demonstrate that AutoTIR achieves superior overall performance, significantly outperforming baselines and exhibits superior generalization in tool-use behavior. These results highlight the promise of reinforcement learning in building truly generalizable and scalable TIR capabilities in LLMs. The code and data are available at https://github.com/weiyifan1023/AutoTIR.

Introduction

While Large Language Models (LLMs) have demonstrated remarkable capabilities, they face significant challenges in factual accuracy and complex symbolic reasoning, often leading to hallucinations or mathematical errors. Tool-Integrated Reasoning (TIR) addresses these gaps by providing models with access to external resources like search engines and code interpreters. However, conventional TIR approaches are frequently "brittle," relying on rigid templates that force tool usage even when unnecessary, or supervised fine-tuning that fails to generalize. A critical side effect is the "instruction-following tax," where specialized tool-use training degrades the model's general conversational competence.

Overview of AutoTIR's task domains and performance across language modeling, knowledge-intensive, and mathematical reasoning tasks.

AutoTIR introduces an autonomous framework that mimics human-like tool selection. Instead of following a fixed pipeline, the model learns to evaluate the difficulty of a task and decide if and which tool is required. This approach aims to maintain high performance across diverse domains—including knowledge-intensive reasoning and mathematics—without sacrificing core language modeling abilities.

Methodology

The core of AutoTIR is an autonomous decision-making loop optimized through Reinforcement Learning (RL). The framework moves away from static "Search then Answer" sequences, allowing the model to enter a <think> phase where it can choose to invoke a <code> tag for a code interpreter, a <search> tag for a search engine, or proceed directly to an <answer>.

The AutoTIR framework architecture, illustrating the autonomous decision-making loop and the RL-based training process using GRPO.

Training with GRPO

AutoTIR utilizes Group Relative Policy Optimization (GRPO), an efficient RL algorithm that eliminates the need for a separate large critic model. By comparing a group of outputs for the same prompt, the model identifies the most effective reasoning paths.

Hybrid Reward Mechanism

To guide the learning process, AutoTIR employs a multi-faceted reward system:

  • Action Reward: This component rewards the selection of the appropriate tool for a given task (e.g., using code for math) while penalizing redundant or incorrect tool calls.
  • Output Reward: A verifiable reward based on the final answer's correctness (using metrics like F1 for QA and exact match for math) and adherence to formatting constraints.

This combination encourages the model to explore tool use autonomously, learning through experience when a tool provides a genuine advantage versus when it adds unnecessary complexity.

Evaluation and Results

AutoTIR was evaluated using a Qwen2.5-7B-Instruct backbone across ten benchmarks spanning knowledge-intensive (e.g., HotpotQA, MuSiQue), mathematical (e.g., GSM8K, MATH500), and general instruction-following (IFEval) domains.

Performance Highlights

  • Superior Accuracy: AutoTIR achieved an average score of 46.01 across all benchmarks, significantly outperforming the base model (21.84) and specialized baselines like Search-R1 (29.26).
  • Mathematical Reasoning: On the GSM8K benchmark, performance surged from 18.57% (base model) to 88.48%.
  • Mitigating the Tool Tax: Unlike other TIR methods that see instruction-following scores drop to 13-19%, AutoTIR maintained a robust IFEval score of 51.02%.
  • Tool Productivity: The model demonstrated higher "Tool Productivity," generating more correct answers per tool call compared to baselines, indicating a more efficient and strategic use of external resources.

Conclusion

AutoTIR demonstrates that reinforcement learning can effectively bridge the gap between specialized tool usage and general-purpose language reasoning. By empowering models to autonomously decide when to reach for a tool, AutoTIR avoids the pitfalls of rigid pipelines and preserves core instruction-following capabilities. Future work will focus on expanding the tool library to include more diverse APIs and scaling the framework to larger model architectures to further enhance reasoning depth and efficiency.

Summary updated

BibTeX
@misc{wei2025autotir,
  author = {Yifan Wei and Xiaoyan Yu and Yixuan Weng and Tengfei Pan and Angsheng Li and Li Du},
  title = {{AutoTIR: Autonomous Tools Integrated Reasoning via Reinforcement Learning}},
  year = {2025},
  eprint = {2507.21836},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.21836},
}
Figure