TLDR: PORTool is a new reinforcement learning method for training large language models (LLMs) to use external tools more effectively. Unlike traditional methods that rely on static datasets, PORTool encourages LLMs to explore various tool-call sequences by generating tree-like ‘rollouts’ and assigning rewards at each step. These rewards consider both the correctness of the final answer and the proper formatting of tool calls, leading to significant improvements in accuracy, efficiency, and error correction for LLMs interacting with diverse tools.
Large Language Models (LLMs) have become incredibly powerful, capable of understanding and generating human-like text. A significant area of development for these models is their ability to use external tools, allowing them to perform complex, multi-step tasks that go beyond their internal knowledge. Imagine an LLM not just answering a question, but actively searching the web, calculating a sum, or checking the weather to provide a precise response.
However, current methods for training LLMs to use tools often rely on static datasets. This means the models learn to imitate predefined sequences of tool calls, which can limit their ability to explore different solutions or adapt to dynamic, real-time situations. For example, if a model is trained on a fixed routine for checking the weather, it might struggle if the query is time-sensitive and the initial tool call fails because the requested time has already passed.
Introducing PORTool: A New Approach to LLM Tool Training
A recent research paper introduces PORTool, a novel reinforcement learning (RL) method designed to overcome these limitations. PORTool encourages LLMs to actively explore various tool-call sequences, or ‘trajectories,’ that lead to a correct answer. This approach is particularly effective in environments where tool calls can be dynamic and require adaptive reasoning.
The core idea behind PORTool involves generating multiple potential tool-use paths, which often share initial steps before branching out, forming a ‘tree-like structure.’ Each step within these branches is then assigned a reward. These rewards are not just about the final outcome; they also consider the quality of each individual step.
How PORTool’s Reward System Works
PORTool uses a sophisticated reward system that combines two key aspects:
-
Outcome Reward: This is the primary reward, determined by an ‘evaluation agent’ (often a more powerful LLM like GPT-4o). It assesses whether the final answer produced by the tool-use LLM is correct. Trajectories leading to correct answers receive positive rewards, incorrect ones negative, and ‘unable to answer’ scenarios receive a neutral reward.
-
Formatting Reward: This reward focuses on the technical quality of each tool-call step. It checks if the LLM’s reasoning is properly structured (e.g., within a <think> block) and if the tool calls themselves are correctly formatted (e.g., valid JSON, correct parameters). This ensures the model learns to interact with tools reliably.
Crucially, PORTool carefully balances these rewards. The system is designed so that achieving a correct final answer is always prioritized over perfect formatting. This prevents scenarios where a perfectly formatted but incorrect response is favored over a slightly imperfect but correct one. Shared steps across different trajectories receive the same reward, while divergent steps get distinct rewards, reflecting their unique contributions.
Optimizing for Better Tool Use
The rewards are then used to calculate ‘advantages’ at two levels: ‘trajectory-relative advantages’ (for the overall path) and ‘fork-relative advantages’ (for individual steps within a branching point). These advantages guide the LLM’s training, helping it learn to generate more effective and efficient tool calls. The paper even provides a theoretical framework for optimally combining these two types of advantages.
Also Read:
- TOOLRM: Enhancing Language Models’ Tool-Use with Efficient Reasoning and Generative Rewards
- Boosting AI Search Agent Performance with Entity-Aware Rewards
Experimental Validation and Results
To test PORTool, the researchers used a dataset of 2,701 complex queries, covering both time-sensitive and time-invariant topics, and a suite of 17 executable tools. These tools ranged from weather and flight searches to mathematical calculations and unit conversions. The experiments compared PORTool against several existing reinforcement learning algorithms, using LLMs like Qwen-2.5-7B-Instruct and Qwen-3-1.7B as the base models.
The results were compelling. PORTool significantly outperformed other methods across all evaluation metrics. It achieved higher accuracy, required fewer tool-call steps to resolve queries, had a lower ‘unanswerable rate,’ and demonstrated higher formatting rewards. This indicates that PORTool not only helps LLMs find correct answers more often but also guides them to do so more efficiently and with fewer errors in tool interaction.
The study also included detailed analyses of PORTool’s design, examining the impact of factors like the ‘decay factor’ in the reward function and the weighting of different advantage types. These studies confirmed the robustness and necessity of PORTool’s specific design choices.
In conclusion, PORTool represents a significant step forward in training LLMs for tool use. By enabling models to explore diverse solutions and providing nuanced, step-wise rewards, it helps them develop more robust, efficient, and adaptive tool-integrated reasoning capabilities. For more technical details, you can refer to the full research paper.


