Skip to main content
QUICK REVIEW

[论文解读] What Are Tools Anyway? A Survey from the Language Model Perspective

Zhiruo Wang, Zhoujun Cheng|arXiv (Cornell University)|Mar 18, 2024
Natural Language Processing Techniques被引用 4
一句话总结

本综述提出了一种统一的工具定义,即语言模型可调用的外部程序接口,用于扩展其能力,系统性地回顾了工具使用场景与方法,并在基准测试中实证评估了计算效率与性能提升。研究识别出ToolFormer在数学推理任务中效率最高,TroVE是最高效的工具构建方法,为何时以及如何有效使用工具提供了实用指导。

ABSTRACT

Language models (LMs) are powerful yet mostly for text generation tasks. Tools have substantially enhanced their performance for tasks that require complex skills. However, many works adopt the term "tool" in different ways, raising the question: What is a tool anyway? Subsequently, where and how do tools help LMs? In this survey, we provide a unified definition of tools as external programs used by LMs, and perform a systematic review of LM tooling scenarios and approaches. Grounded on this review, we empirically study the efficiency of various tooling methods by measuring their required compute and performance gains on various benchmarks, and highlight some challenges and potential future research in the field.

研究动机与目标

  • 建立一种统一且广泛的工具定义,即语言模型可调用的外部程序接口。
  • 系统性地对现有工具使用场景进行分类与回顾,包括感知、动作和计算类工具。
  • 在基准测试中实证评估不同工具使用方法的计算-性能权衡。
  • 识别出哪些任务最受益于工具集成,以及哪些方法提供了最高的效率。
  • 提出改进的评估指标,并指出现有基准在工具使用与工具构建方面的不足之处。

提出的方法

  • 将语言模型使用的工具正式定义为外部程序的函数接口,可通过输入参数被语言模型调用。
  • 将工具划分为三类功能:感知(如 get_time())、动作(如 make_post())和计算(如 calculator)。
  • 回顾工具使用范式,包括提示工程、微调和工具构建,重点关注上下文学习与检索增强生成。
  • 通过推理与训练计算资源,在5个基准上实证评估10种工具使用方法,测量性能提升与成本。
  • 提出一种成本效率分析框架,通过计算(token/参数)与性能(准确率提升)对比不同方法。
  • 提出改进的评估指标与基准,包含自然使用场景与可执行工具,以提升真实感与可复现性。
Figure 1: Illustration of tools extending and facilitating LM task-solving.
Figure 1: Illustration of tools extending and facilitating LM task-solving.

实验结果

研究问题

  • RQ1从语言模型的视角出发,什么构成了一个工具?如何在多样化使用场景中对其进行正式定义?
  • RQ2哪些任务最受益于工具集成?为何某些任务在使用工具后仍出现性能下降?
  • RQ3不同工具使用方法(如提示工程、微调、工具构建)在计算效率与性能提升方面如何比较?
  • RQ4工具使用方法中,训练阶段与推理阶段成本之间的关键权衡是什么?
  • RQ5如何改进评估基准与指标,以更真实地反映现实世界中的工具使用与工具创建?

主要发现

  • ToolFormer在MATH基准上效率最高,仅使用0.17 MB计算资源即实现30.4%的性能提升。
  • TroVE是最高效的工具构建方法,在仅1.2–1.4K tokens计算资源下,准确率提升达12.0–21.0分。
  • 多语言翻译任务尽管计算成本相似,但准确率出现轻微下降(-0.2分),表明在本征语言原生任务中工具化收益有限。
  • API-Bank与ToolAlpaca在推理阶段效率更高,表明其更适合低延迟部署场景。
  • CREATOR与CRAFT显著低于TroVE的效率,需多出3.8–6.0倍的计算资源,仅实现0.0–5.0%的准确率提升。
  • 需要多领域推理或外部知识的任务(如工具使用、工具构建)表现出最高性能增益,尤其在API-Bank与ToolAlpaca等合成基准上。
Figure 2: The basic tool use paradigm. LM calls check_weather tool by generating text tokens. This call triggers the server to execute the call and return the output sunny , using which the LM replaces the API call tokens in the response to the user.
Figure 2: The basic tool use paradigm. LM calls check_weather tool by generating text tokens. This call triggers the server to execute the call and return the output sunny , using which the LM replaces the API call tokens in the response to the user.

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。