Toolken+: Improving LLM Tool Usage with Reranking and a Reject Option

Konstantin Yakovlev,Sergey Nikolenko,Andrey Bout
2024-10-16
Abstract:The recently proposed ToolkenGPT tool learning paradigm demonstrates promising performance but suffers from two major issues: first, it cannot benefit from tool documentation, and second, it often makes mistakes in whether to use a tool at all. We introduce Toolken+ that mitigates the first problem by reranking top $k$ tools selected by ToolkenGPT and the second problem with a special "Reject" option such that the model will generate a vocabulary token if "Reject" is ranked first. We demonstrate the effectiveness of Toolken+ on multistep numerical reasoning and tool selection tasks.
Computation and Language
What problem does this paper attempt to address?
This paper attempts to solve two main problems: 1. **Inability to utilize tool documents**: The existing ToolkenGPT method cannot benefit from tool documents, which are very useful for large - language models (LLMs). The author points out that ToolkenGPT is often uncertain when selecting tools, and documents can help make better decisions. 2. **Tool - use misjudgment**: ToolkenGPT often makes mistakes when judging whether to use a tool, resulting in excessive tool invocation. This not only wastes resources but may also lead to inaccurate results generated by the model. To solve these problems, the author proposes Toolken +, which improves ToolkenGPT through the following two mechanisms: 1. **Re - ranking mechanism**: A re - ranking mechanism is introduced. By adding tool documents to the prompt, the model re - evaluates and selects the most relevant tools. Specifically, the model will re - rank from the top k tools selected by ToolkenGPT to improve the accuracy of tool selection. 2. **Reject option**: A special "Reject" option is introduced. When the model believes that no tool needs to be used, it can select this option, thereby avoiding unnecessary tool invocations. This helps to reduce the misjudgment rate of tool use. Through these improvements, Toolken + aims to minimize false - positive errors in tool invocation and the tool classification error rate, thereby improving the robustness of the model, making AI agents based on modern LLMs more reliable and able to access a wider range of tools.