<p>Large Language Models (LLMs) have demonstrated the capability to utilize tools after training. However, there remains limited understanding of how to optimally enhance this ability. In this paper, we focus on the in-context tool use of LLMs and investigate effective methods to enable and improve this capability. Through preliminary analysis, 3 key factors influencing in-context tool use are identified: (1) <b>the number of tools</b>, (2) <b>the number of instances per tool</b>, and (3) <b>model parameter size</b>. Moreover, RapidTools, a large and high-quality tool-use dataset, is constructed to investigate these factors through two experimental series by varying the number of tools and instances per tool in the training data. Experimental results show that increasing the model parameter size and the number of tools in the training data consistently enhances performance, whereas increasing the number of instances per tool produces mixed effects. In this work, we deliver insightful and critical direction in order to establish a future foundation on tool use in LLMs.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Investigating effective LLM-based in-context tool use: what matters and how to improve

  • Yining Zheng,
  • Haiyang Wei,
  • Jiahao Lu,
  • Linqi Yin,
  • Yunke Zhang,
  • Chengguo Xu,
  • Hetao Cui,
  • Tianxiang Sun,
  • Shuang Chen,
  • Xipeng Qiu

摘要

Large Language Models (LLMs) have demonstrated the capability to utilize tools after training. However, there remains limited understanding of how to optimally enhance this ability. In this paper, we focus on the in-context tool use of LLMs and investigate effective methods to enable and improve this capability. Through preliminary analysis, 3 key factors influencing in-context tool use are identified: (1) the number of tools, (2) the number of instances per tool, and (3) model parameter size. Moreover, RapidTools, a large and high-quality tool-use dataset, is constructed to investigate these factors through two experimental series by varying the number of tools and instances per tool in the training data. Experimental results show that increasing the model parameter size and the number of tools in the training data consistently enhances performance, whereas increasing the number of instances per tool produces mixed effects. In this work, we deliver insightful and critical direction in order to establish a future foundation on tool use in LLMs.