ACL 2025long0 citations

CodeTool: Enhancing Programmatic Tool Invocation of LLMs via Process Supervision

YifeiLu YifeiLu, Fanghua Ye, Jian Li, Qiang Gao, Cheng Liu, Haibo Luo, Nan Du, Xiaolong Li

Abstract

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.

BibTeX
@inproceedings{yifeilu-etal-2025-codetool,
    title = "{C}ode{T}ool: Enhancing Programmatic Tool Invocation of {LLM}s via Process Supervision",
    author = "YifeiLu, YifeiLu  and
      Ye, Fanghua  and
      Li, Jian  and
      Gao, Qiang  and
      Liu, Cheng  and
      Luo, Haibo  and
      Du, Nan  and
      Li, Xiaolong  and
      Ren, Feiliang",
    editor = "Che, Wanxiang  and
      Nabende, Joyce  and
      Shutova, Ekaterina  and
      Pilehvar, Mohammad Taher",
    booktitle = "Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
    month = jul,
    year = "2025",
    address = "Vienna, Austria",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2025.acl-long.895/",
    doi = "10.18653/v1/2025.acl-long.895",
    pages = "18287--18304",
    ISBN = "979-8-89176-251-0"
}