[Paper Review] Making Language Models Better Tool Learners with Execution Feedback
TRICE is a two-stage framework that teaches language models when and how to use external tools through execution feedback, improving selective tool usage and reducing error propagation.
Tools serve as pivotal interfaces that enable humans to understand and reshape the environment. With the advent of foundation models, AI systems can utilize tools to expand their capabilities and interact with the real world. Existing tool learning methodologies, encompassing supervised fine-tuning and prompt engineering approaches, often induce large language models to utilize tools indiscriminately, as complex tasks often exceed their own competencies. However, introducing tools for simple tasks, which the models themselves can readily resolve, can inadvertently propagate errors rather than enhance performance. This leads to the research question: can we teach language models when and how to use tools? To meet this need, we propose Tool leaRning wIth exeCution fEedback (TRICE), a two-stage end-to-end framework that enables the model to continually learn through feedback derived from tool execution, thereby learning when and how to use tools effectively. Experimental results, backed by further analysis, show that TRICE can make the large language model selectively use tools by improving the accuracy of tool usage while enhancing insufficient tool learning and mitigating excessive reliance on tools. Code is available at https://github.com/zjunlp/TRICE.
Motivation & Objective
- Motivate the problem of when tools are truly needed for LLMs and when they are not.
- Propose a two-stage training framework to teach selective tool usage through execution feedback.
- Create a data preparation pipeline that uses an LLM to generate tool usage labels when needed.
- Demonstrate that execution feedback improves tool usage accuracy and reduces over-reliance across multiple tasks and backbones.
Proposed method
- Prepare datasets indicating when tool usage is necessary using ChatGPT-generated pseudo-labels.
- Stage I: Behavior Cloning to imitate tool-using behavior via instruct-tuning on tool usage data.
- Stage II: Reinforcement Learning with Execution Feedback (RLEF) to reinforce desirable tool usage with execution guidance.
- Use a ranking loss to align model outputs with desirable candidate responses and a supervised fine-tuning loss to constrain outputs.
- Employ a reward-based strategy that scores candidate responses by answer accuracy and tool usage consistency with a gold response.
- Evaluate across multiple backbone models and eight datasets spanning four task types with both single-tool and multi-tool setups.
Experimental results
Research questions
- RQ1Can LLMs learn when to invoke tools for different tasks without over-reliance on tools?
- RQ2Does execution feedback improve the accuracy of tool usage and help models learn to use tools selectively?
- RQ3To what extent does training with Trice generalize to unseen datasets and tools?
- RQ4How do the two training stages contribute to stable and effective tool learning?
Key findings
- Trice enables selective tool use and surpasses prompt-based baselines across tasks and backbones.
- Stage I (Behavior Cloning) provides the foundation for tool-use capability, while Stage II (RLEF) improves selectivity and mitigates over-reliance.
- Training with Trice-mix (multi-task) yields state-of-the-art performance over Trice-split (per-task) on multiple backbones.
- Trice improves unseen tool and dataset generalization, enabling better tool handling in new scenarios.
- Execution feedback helps reduce error propagation and addresses insufficient tool learning observed in stage I.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.