Tool Zero: Training Tool-Augmented LLMs via Pure RL from Scratch

Yirong Zeng, Xiao Ding, Yutai Hou, Yuxian Wang, Li Du, Juyi Dai, Qiuyang Ding, Duyu Tang, Dandan Tu, Weiwen Liu, Bing Qin, Ting Liu

Abstract

Training tool-augmented LLMs has emerged as a promising approach to enhancing language models’ capabilities for complex tasks. The current supervised fine-tuning (SFT) paradigm relies on constructing extensive domain-specific datasets, which often struggles to generalize to unfamiliar or intricate tool-use scenarios. We address whether pure reinforcement learning (RL) can effectively elicit a model’s intrinsic reasoning capabilities and enhance tool-agnostic generalization. We propose a dynamic generalization-guided reward design for rule-based RL, which progressively shifts rewards from exploratory to exploitative tool-use patterns. Based on this design, we introduce the Tool-Zero series models, trained directly from base models. Experimental results demonstrate over 7% performance improvement compared to SFT and RL-with-SFT models, with consistent gains across cross-dataset and intra-dataset evaluations.

Introduction

Large Language Models (LLMs) are increasingly integrated with external tools such as APIs and calculators to solve complex problems. However, the prevailing training methodology, Supervised Fine-Tuning (SFT), often results in models that perform "surface-level pattern imitation" rather than genuine reasoning. This limitation becomes apparent when models encounter unseen tools or multi-turn interactions that deviate from their training data.

A common failure mode is the over-reliance on keyword matching. For instance, a model trained via SFT might correctly use a natural language translation tool but fail to recognize that a request to "translate Python to JavaScript" requires a code transpilation tool, simply because it has memorized the word "translate" in a specific context.

SFT models often struggle with generalization to unfamiliar tool-use contexts, such as mistaking code transpilation for natural language translation.

Methodology: GG-GRPO

To overcome these limitations, we introduce GG-GRPO (Generalization-Guided Group Relative Policy Optimization), a framework for training tool-augmented LLMs using pure RL from scratch. The approach centers on three core innovations:

Dynamic Generalization-Guided Reward

The core of our approach is a two-stage reward strategy that transitions from exploration to exploitation:

  1. Stage 1 (Exploratory): Rewards are based on semantic overlap (token matching) between the model's output and the ground truth. This allows the model to learn the general structure of tool calls without being penalized for minor syntax errors.
  2. Stage 2 (Exploitative): Rewards are strictly based on Abstract Syntax Tree (AST) parsing to ensure functional correctness, supplemented by rewards for multi-tool collaboration.

A sigmoid-based "Switching Trick" is employed to smoothly transition between these stages, maintaining training stability throughout the process.

Data Masking and Reasoning

To prevent the model from memorizing specific tool names, we implement tool and parameter masking (e.g., renaming calculate_sum to func_1). This forces the model to reason based on tool descriptions and argument semantics, fostering robust, tool-agnostic generalization.

Experimental Results

We evaluated the Tool-Zero models (7B and 32B) against several SFT-based baselines, including ToolACE-8B and xLAM-7b-r. The models were trained using filtered and augmented versions of the ToolACE and xLAM datasets.

Generalization Analysis

Our analysis confirms that while SFT significantly improves performance on "Live" data (similar to the training set), it often leads to regressions on "Non-Live" and "Multi-Turn" tasks compared to the base model's intrinsic potential. Tool-Zero avoids this pitfall by eliciting reasoning rather than imitation.

Performance comparison of SFT models (ToolACE-8B, xLAM-7b-r) against base models, showing the performance gap in non-live and multi-turn scenarios.

Benchmarking

Tool-Zero-7B achieved a 7.14% improvement over ToolACE-8B on the Berkeley Function Calling Leaderboard (BFCL). Notably, in multi-turn scenarios, Tool-Zero-7B outperformed Qwen2.5-7B-Instruct by 19.32%, demonstrating the effectiveness of the pure RL approach in complex conversational contexts. Tool-Zero-32B achieved an overall accuracy of 67.12% on BFCL-v3, rivaling many larger and closed-source models.

Conclusion

Tool-Zero demonstrates that pure reinforcement learning from scratch is not only feasible but superior to the traditional SFT paradigm for training tool-augmented LLMs. By focusing on reasoning through dynamic rewards and data masking, we achieve state-of-the-art performance and robust generalization across diverse tool-use environments.

Summary updated

BibTeX
@inproceedings{zeng2025tool,
  author = {Yirong Zeng and Xiao Ding and Yutai Hou and Yuxian Wang and Li Du and Juyi Dai and Qiuyang Ding and Duyu Tang and Dandan Tu and Weiwen Liu and Bing Qin and Ting Liu},
  title = {{Tool Zero: Training Tool-Augmented LLMs via Pure RL from Scratch}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2025},
  url = {https://openreview.net/forum?id=AigotJOzEN},
}
Figure