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
Front. Comput. Sci. ›› 2026, Vol. 20 ›› Issue (7) : 2007323
Investigating effective LLM-based in-context tool use: what matters and how to improve
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.
large language model (LLM) / tool use / function calling / tool learning
| [1] |
|
| [2] |
|
| [3] |
|
| [4] |
|
| [5] |
|
| [6] |
|
| [7] |
|
| [8] |
|
| [9] |
|
| [10] |
RapidAPI. RapidAPI: a platform for discovering and connecting to APIs. Available at the website of rapidapi.com |
| [11] |
|
| [12] |
|
| [13] |
|
| [14] |
|
| [15] |
|
| [16] |
|
| [17] |
|
| [18] |
Fanjia Y, Huanzhi M, Charlie Cheng-Jie J, Tianjun Z, Shishir G P, Ion S, Joseph E G. Berkeley Function Calling Leaderboard. Available at the website of gorilla.cs.berkeley.edu/blogs/8_berkeley_function_calling_leaderboard.html |
| [19] |
|
| [20] |
|
| [21] |
|
| [22] |
|
| [23] |
|
| [24] |
|
| [25] |
|
| [26] |
|
| [27] |
|
| [28] |
|
| [29] |
|
| [30] |
|
| [31] |
|
Higher Education Press
/
| 〈 |
|
〉 |