CodeTool: Enhancing Programmatic Tool Invocation of LLMs via Process Supervision

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Lu, Yifei, Ye, Fanghua, Li, Jian, Gao, Qiang, Liu, Cheng, Luo, Haibo, Du, Nan, Li, Xiaolong, Ren, Feiliang
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866918115913236480
author Lu, Yifei
Ye, Fanghua
Li, Jian
Gao, Qiang
Liu, Cheng
Luo, Haibo
Du, Nan
Li, Xiaolong
Ren, Feiliang
author_facet Lu, Yifei
Ye, Fanghua
Li, Jian
Gao, Qiang
Liu, Cheng
Luo, Haibo
Du, Nan
Li, Xiaolong
Ren, Feiliang
contents Tool invocation significantly enhances the capabilities of Large Language Models (LLMs), yet challenges persist, particularly in complex task scenarios. Current methods, such as instruction-enhanced reasoning and supervised fine-tuning, often result in unnecessarily long reasoning paths and face difficulties in verifying the correctness of intermediate steps. In this paper, we propose CodeTool, a novel framework for stepwise code generation that improves LLM tool invocation by leveraging the concise and easily verifiable nature of code. CodeTool incorporates two distinct process rewards: the On-the-spot Reward, which provides immediate feedback on the accuracy of each tool invocation, and the Latent Reward, which assesses the contribution of each step toward overall task completion. By maximizing the cumulative reward of the On-the-spot and Latend Rewards at each step, LLMs are guided to follow efficient and accurate reasoning paths. Extensive experiments on StableToolBench and RestBench-TMDB demonstrate the superiority of CodeTool over existing approaches.
format Preprint
id arxiv_https___arxiv_org_abs_2503_20840
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle CodeTool: Enhancing Programmatic Tool Invocation of LLMs via Process Supervision
Lu, Yifei
Ye, Fanghua
Li, Jian
Gao, Qiang
Liu, Cheng
Luo, Haibo
Du, Nan
Li, Xiaolong
Ren, Feiliang
Artificial Intelligence
Computation and Language
Machine Learning
Software Engineering
Tool invocation significantly enhances the capabilities of Large Language Models (LLMs), yet challenges persist, particularly in complex task scenarios. Current methods, such as instruction-enhanced reasoning and supervised fine-tuning, often result in unnecessarily long reasoning paths and face difficulties in verifying the correctness of intermediate steps. In this paper, we propose CodeTool, a novel framework for stepwise code generation that improves LLM tool invocation by leveraging the concise and easily verifiable nature of code. CodeTool incorporates two distinct process rewards: the On-the-spot Reward, which provides immediate feedback on the accuracy of each tool invocation, and the Latent Reward, which assesses the contribution of each step toward overall task completion. By maximizing the cumulative reward of the On-the-spot and Latend Rewards at each step, LLMs are guided to follow efficient and accurate reasoning paths. Extensive experiments on StableToolBench and RestBench-TMDB demonstrate the superiority of CodeTool over existing approaches.
title CodeTool: Enhancing Programmatic Tool Invocation of LLMs via Process Supervision
topic Artificial Intelligence
Computation and Language
Machine Learning
Software Engineering
url https://arxiv.org/abs/2503.20840