Saved in:
Bibliographic Details
Main Authors: Yu, Yuanqing, Wang, Zhefan, Ma, Weizhi, Wang, Shuai, Wu, Chuhan, Guo, Zhiqiang, Zhang, Min
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2410.07745
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913994315399168
author Yu, Yuanqing
Wang, Zhefan
Ma, Weizhi
Wang, Shuai
Wu, Chuhan
Guo, Zhiqiang
Zhang, Min
author_facet Yu, Yuanqing
Wang, Zhefan
Ma, Weizhi
Wang, Shuai
Wu, Chuhan
Guo, Zhiqiang
Zhang, Min
contents Despite their powerful text generation capabilities, large language models (LLMs) still struggle to effectively utilize external tools to solve complex tasks, a challenge known as tool learning. Existing methods primarily rely on supervised fine-tuning, treating tool learning as a text generation problem while overlooking the decision-making complexities inherent in multi-step contexts. In this work, we propose modeling tool learning as a dynamic decision-making process and introduce StepTool, a novel step-grained reinforcement learning framework that enhances LLMs' capabilities in multi-step tool use. StepTool comprises two key components: Step-grained Reward Shaping, which assigns rewards to each tool interaction based on its invocation success and contribution to task completion; and Step-grained Optimization, which applies policy gradient methods to optimize the model across multiple decision steps. Extensive experiments across diverse benchmarks show that StepTool consistently outperforms both SFT-based and RL-based baselines in terms of task Pass Rate and Recall of relevant tools. Furthermore, our analysis suggests that StepTool helps models discover new tool-use strategies rather than merely re-weighting prior knowledge. These results highlight the importance of fine-grained decision modeling in tool learning and establish StepTool as a general and robust solution for enhancing multi-step tool use in LLMs. Code and data are available at https://github.com/yuyq18/StepTool.
format Preprint
id arxiv_https___arxiv_org_abs_2410_07745
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle StepTool: Enhancing Multi-Step Tool Usage in LLMs via Step-Grained Reinforcement Learning
Yu, Yuanqing
Wang, Zhefan
Ma, Weizhi
Wang, Shuai
Wu, Chuhan
Guo, Zhiqiang
Zhang, Min
Computation and Language
Despite their powerful text generation capabilities, large language models (LLMs) still struggle to effectively utilize external tools to solve complex tasks, a challenge known as tool learning. Existing methods primarily rely on supervised fine-tuning, treating tool learning as a text generation problem while overlooking the decision-making complexities inherent in multi-step contexts. In this work, we propose modeling tool learning as a dynamic decision-making process and introduce StepTool, a novel step-grained reinforcement learning framework that enhances LLMs' capabilities in multi-step tool use. StepTool comprises two key components: Step-grained Reward Shaping, which assigns rewards to each tool interaction based on its invocation success and contribution to task completion; and Step-grained Optimization, which applies policy gradient methods to optimize the model across multiple decision steps. Extensive experiments across diverse benchmarks show that StepTool consistently outperforms both SFT-based and RL-based baselines in terms of task Pass Rate and Recall of relevant tools. Furthermore, our analysis suggests that StepTool helps models discover new tool-use strategies rather than merely re-weighting prior knowledge. These results highlight the importance of fine-grained decision modeling in tool learning and establish StepTool as a general and robust solution for enhancing multi-step tool use in LLMs. Code and data are available at https://github.com/yuyq18/StepTool.
title StepTool: Enhancing Multi-Step Tool Usage in LLMs via Step-Grained Reinforcement Learning
topic Computation and Language
url https://arxiv.org/abs/2410.07745