Exploring Superior Function Calls via Reinforcement Learning

Bingguang Hao, Maolin Wang, Zengzhuang Xu, Yicheng Chen, Cunyin Peng, Jinjie Gu, Chenyi Zhuang · OpenReview

Abstract

The effective training of Large Language Models (LLMs) for function calling faces a critical challenge: balancing exploration of complex reasoning paths with stable policy optimization. Standard methods like Supervised Fine-Tuning (SFT) fail to instill robust reasoning, and traditional Reinforcement Learning (RL) struggles with inefficient exploration. We propose EGPO, a new RL framework built upon Group Relative Policy Optimization (GRPO), designed to address this challenge directly. The core of EGPO is an entropy-enhanced advantage function that integrates the entropy of the model's Chain-of-Thought (CoT) into the policy gradient computation. This encourages the generation of diverse reasoning strategies. To maintain optimization direction, the entropy bonus is carefully constrained by a clipping mechanism. Complemented by a strict, binary reward signal, EGPO effectively guides the model towards discovering structured and accurate tool invocation patterns. On the challenging Berkeley Function Calling Leaderboard (BFCL), a 4B-parameter model trained with EGPO sets a new state-of-the-art among models of comparable size, surpassing a range of strong competitors, including GPT-4o and Gemini-2.5.

Introduction

Large Language Models (LLMs) are increasingly deployed as autonomous agents capable of invoking external tools such as APIs and databases. However, achieving reliable tool use remains a significant hurdle. Supervised Fine-Tuning (SFT) often leads to "superficial pattern matching," where models mimic training examples without developing the underlying logic necessary for novel or complex scenarios. Conversely, Reinforcement Learning (RL) approaches are hampered by "signal scarcity"—the difficulty of generating valid tool calls through random exploration—and "reward redundancy," where models find non-generalizable shortcuts to maximize rewards.

Methodology: Entropy-Guided Policy Optimization (EGPO)

To overcome these limitations, we introduce EGPO, which extends the Group Relative Policy Optimization (GRPO) framework. The primary innovation is the inclusion of an entropy-enhanced advantage function.

The EGPO training framework, highlighting the integration of CoT entropy into the advantage function.

Entropy-Enhanced Advantage

In standard RL, the advantage function measures how much better a specific action is compared to the baseline. EGPO modifies this by adding an entropy bonus derived from the model’s Chain-of-Thought (CoT). By rewarding higher entropy in reasoning steps, the model is incentivized to explore diverse thinking paths rather than converging prematurely on a single memorized pattern.

Stability via Clipping

To prevent excessive exploration from destabilizing training, EGPO employs a clipping mechanism. This threshold ensures that the entropy adjustment does not flip the sign of the original advantage, maintaining a consistent optimization direction while still encouraging diversity.

Binary Reward Signal

Rather than complex partial-credit systems, EGPO utilizes a strict binary reward (1.0 or 0.0). Correctness is determined via Abstract Syntax Tree (AST) evaluation, requiring both the format and the final answer to be perfectly accurate.

Experimental Setup

The EGPO-4B model was trained on a refined dataset of approximately 90,000 samples, including 60,000 single-turn samples from xlam-function-calling-60k and 30,000 multi-turn samples from Open-Agentic-tool-use. Evaluation was conducted using the Berkeley Function Calling Leaderboard (BFCLv3), ACEBench, and APIBank.

Key Results

The EGPO framework demonstrates significant performance gains, particularly in complex scenarios. On the BFCLv3 benchmark, EGPO-4B achieved a score of 56.25% in multi-turn tasks, substantially outperforming proprietary models like GPT-4o (42.50%) and Grok-4 (36.12%).

Performance comparison on ACEBench subsets, demonstrating EGPO-4B's superiority in both single-turn and multi-turn tasks.

As shown in the ACEBench results, EGPO-4B maintains high accuracy across both single-turn (80.0%) and multi-turn (74.0%) subsets, consistently exceeding the performance of larger models and specialized open-source alternatives like ToolACE-MT 8B.

Discussion and Conclusion

A key insight from this research is that rewarding reasoning diversity naturally fosters internal verification. EGPO-trained models self-generated structural parameter checks and verification actions in their CoT, accounting for over 20% of their reasoning tokens. This suggests that small models (4B parameters) can develop robust, generalizable logic that rivals or exceeds much larger models when trained with effective exploration strategies.

While EGPO currently relies on high-quality CoT data and a rigid binary reward system, future work will explore more nuanced reward structures and the application of this framework to broader agentic tasks.

Summary updated

BibTeX
@misc{hao2025exploring,
  author = {Bingguang Hao and Maolin Wang and Zengzhuang Xu and Yicheng Chen and Cunyin Peng and Jinjie Gu and Chenyi Zhuang},
  title = {{Exploring Superior Function Calls via Reinforcement Learning}},
  year = {2025},
  eprint = {2508.05118},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.05118},
}
Figure