MetaTool: Facilitating Large Language Models to Master Tools with Meta-task Augmentation

Xiaohan Wang,Dian Li,Yilin Zhao,Sinbadliu,Hui Wang
2024-10-08
Abstract:Utilizing tools with Large Language Models (LLMs) is essential for grounding AI agents in real-world applications. The prevailing approach involves few-shot prompting with demonstrations or fine-tuning with expert annotations. However, mere in-context demonstrations may fail to cover sufficient knowledge for complex tools and tasks. Training on solution paths is also hindered by the high cost of expert annotations and generalizing to new tools. A core challenge of generalizable tool use lies in understanding the "meta", or fundamental natures of tools that are transferable across tasks, such as causality and constraints. In this paper, we present MetaTool, a novel tool learning methodology designed to generalize across any reusable toolset. Our approach incorporates a self-supervised augmentation technique derived from a series of meta-tasks. This involves predicting masked elements in the tool execution process. The self-supervised procedure enables scalable generation of high-quality QA data, which is handy for supervising tool understanding. By incorporating meta-task data into task-oriented training, our method significantly enhances the performance of open-source LLMs, achieving results comparable to ChatGPT in both tool-based planning and chatting scenarios. Through large-scale instruction tuning, the MetaTool model demonstrates impressive zero-shot generalizability on new tasks.
Computation and Language,Artificial Intelligence,Machine Learning
What problem does this paper attempt to address?
### Problems the paper attempts to solve This paper aims to solve a series of challenges faced by large language models (LLMs) when using tools, especially the problem of insufficient generalization ability when dealing with complex tasks and new tools. Specifically, the paper focuses on the following aspects: 1. **Limitations of existing methods**: - **Relying solely on context examples**: Existing methods usually train models with a small number of examples or expert annotations, but this method often fails to cover sufficient knowledge when dealing with complex tools and tasks. - **High - cost expert annotations**: Training based on solution paths is limited by the high cost of expert annotations and is difficult to generalize to new tools. - **Lack of understanding of the essence of tools**: Existing methods often overlook the "meta" properties of tools, that is, the basic properties and causal relationships of tools, which are transferable in different tasks. 2. **Proposed methods**: - **MetaTool**: The paper proposes a new tool - learning method - MetaTool. It generates high - quality question - and - answer data through self - supervised augmentation techniques, thereby improving the model's understanding and generalization ability of tools. - **Meta - task design**: MetaTool designs a series of meta - tasks, which involve predicting masked elements during the tool execution process, including effects, decisions, reversals, input boundaries, output boundaries, and counterfactual reasoning, etc. - **Multi - stage learning**: The paper explores several methods to enhance tool learning, including in - context learning, two - stage learning, and data augmentation, to achieve the task objectives. 3. **Experimental verification**: - **Tool - oriented tasks**: The paper conducts experiments on multiple tool - oriented tasks, including spelling words, stacking blocks, and logistics problems, demonstrating the superior performance of MetaTool in zero - shot and few - shot scenarios. - **Tool - enhanced tasks**: The paper also conducts experiments in benchmark tests such as ToolBench and BFCL, verifying the generalization ability of MetaTool when dealing with diverse user requests and new tools. ### Summary The paper "METATOOL: FACILITATING LARGE LANGUAGE MODELS TO MASTER TOOLS WITH META - TASK AUGMENTATION" attempts to solve the problems of insufficient generalization and understanding abilities of large language models when using tools by introducing the MetaTool method. Through designing a series of meta - tasks and multi - stage learning methods, MetaTool can significantly improve the model's performance on complex tasks and new tools, narrowing the gap between open - source models and state - of - the - art models.