Teaching LLMs to Learn Tool Trialing and Execution through Environment Interaction

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Gao, Xingjie, Huang, Pengcheng, Liu, Zhenghao, Yan, Yukun, Wang, Shuo, Chen, Zulong, Qian, Chen, Yu, Ge, Gu, Yu
Formato: Preprint
Publicado: 2026
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866915737965166592
author Gao, Xingjie
Huang, Pengcheng
Liu, Zhenghao
Yan, Yukun
Wang, Shuo
Chen, Zulong
Qian, Chen
Yu, Ge
Gu, Yu
author_facet Gao, Xingjie
Huang, Pengcheng
Liu, Zhenghao
Yan, Yukun
Wang, Shuo
Chen, Zulong
Qian, Chen
Yu, Ge
Gu, Yu
contents Equipping Large Language Models (LLMs) with external tools enables them to solve complex real-world problems. However, the robustness of existing methods remains a critical challenge when confronting novel or evolving tools. Existing trajectory-centric paradigms primarily rely on memorizing static solution paths during training, which limits the ability of LLMs to generalize tool usage to newly introduced or previously unseen tools. In this paper, we propose ToolMaster, a framework that shifts tool use from imitating golden tool-calling trajectories to actively learning tool usage through interaction with the environment. To optimize LLMs for tool planning and invocation, ToolMaster adopts a trial-and-execution paradigm, which trains LLMs to first imitate teacher-generated trajectories containing explicit tool trials and self-correction, followed by reinforcement learning to coordinate the trial and execution phases jointly. This process enables agents to autonomously explore correct tool usage by actively interacting with environments and forming experiential knowledge that benefits tool execution. Experimental results demonstrate that ToolMaster significantly outperforms existing baselines in terms of generalization and robustness across unseen or unfamiliar tools. All code and data are available at https://github.com/NEUIR/ToolMaster.
format Preprint
id arxiv_https___arxiv_org_abs_2601_12762
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Teaching LLMs to Learn Tool Trialing and Execution through Environment Interaction
Gao, Xingjie
Huang, Pengcheng
Liu, Zhenghao
Yan, Yukun
Wang, Shuo
Chen, Zulong
Qian, Chen
Yu, Ge
Gu, Yu
Software Engineering
Artificial Intelligence
Equipping Large Language Models (LLMs) with external tools enables them to solve complex real-world problems. However, the robustness of existing methods remains a critical challenge when confronting novel or evolving tools. Existing trajectory-centric paradigms primarily rely on memorizing static solution paths during training, which limits the ability of LLMs to generalize tool usage to newly introduced or previously unseen tools. In this paper, we propose ToolMaster, a framework that shifts tool use from imitating golden tool-calling trajectories to actively learning tool usage through interaction with the environment. To optimize LLMs for tool planning and invocation, ToolMaster adopts a trial-and-execution paradigm, which trains LLMs to first imitate teacher-generated trajectories containing explicit tool trials and self-correction, followed by reinforcement learning to coordinate the trial and execution phases jointly. This process enables agents to autonomously explore correct tool usage by actively interacting with environments and forming experiential knowledge that benefits tool execution. Experimental results demonstrate that ToolMaster significantly outperforms existing baselines in terms of generalization and robustness across unseen or unfamiliar tools. All code and data are available at https://github.com/NEUIR/ToolMaster.
title Teaching LLMs to Learn Tool Trialing and Execution through Environment Interaction
topic Software Engineering
Artificial Intelligence
url https://arxiv.org/abs/2601.12762