Skip to main content
QUICK REVIEW

[论文解读] Tool Documentation Enables Zero-Shot Tool-Usage with Large Language Models

Cheng-Yu Hsieh, Sian Chen|arXiv (Cornell University)|Aug 1, 2023
Topic ModelingComputer Science被引用 9
一句话总结

Tool 文档使大语言模型能够在零-shot 设置下使用工具,通常与少量示例相当甚至超过,且可扩展到大型工具集和跨视觉与语言任务的未见工具。

ABSTRACT

Today, large language models (LLMs) are taught to use new tools by providing a few demonstrations of the tool's usage. Unfortunately, demonstrations are hard to acquire, and can result in undesirable biased usage if the wrong demonstration is chosen. Even in the rare scenario that demonstrations are readily available, there is no principled selection protocol to determine how many and which ones to provide. As tasks grow more complex, the selection search grows combinatorially and invariably becomes intractable. Our work provides an alternative to demonstrations: tool documentation. We advocate the use of tool documentation, descriptions for the individual tool usage, over demonstrations. We substantiate our claim through three main empirical findings on 6 tasks across both vision and language modalities. First, on existing benchmarks, zero-shot prompts with only tool documentation are sufficient for eliciting proper tool usage, achieving performance on par with few-shot prompts. Second, on a newly collected realistic tool-use dataset with hundreds of available tool APIs, we show that tool documentation is significantly more valuable than demonstrations, with zero-shot documentation significantly outperforming few-shot without documentation. Third, we highlight the benefits of tool documentations by tackling image generation and video tracking using just-released unseen state-of-the-art models as tools. Finally, we highlight the possibility of using tool documentation to automatically enable new applications: by using nothing more than the documentation of GroundingDino, Stable Diffusion, XMem, and SAM, LLMs can re-invent the functionalities of the just-released Grounded-SAM and Track Anything models.

研究动机与目标

  • 出于对培养偏差和可扩展性担忧,激励减少对演示的依赖以用于工具使用。
  • 提出将工具文档作为多工具设置中对LLMs的替代提示信号。
  • 在跨语言和视觉模态的六个任务上进行零-shot 文档的经验评估。
  • 仅通过文档实现对未见工具和任务的即插即用扩展的演示。

提出的方法

  • 比较有无工具文档的提示以及不同数量演示的影响。
  • 在六个任务上进行评估:ScienceQA、TabMWP、NLVRv2、LLM Cloud CLI(未见的大型工具集)、图像编辑和视频跟踪。
  • 使用基于 GPT 的规划器(如 gpt-3.5-turbo)生成由环境执行的工具使用程序。
  • 对于大型工具集,使用 TF-IDF 检索工具文档并截断以适应提示。
  • 通过仅依赖其文档(GroundingDino、SAM、XMem)对新发布的工具实现零-shot 工具使用。
  • 分析文档长度如何影响性能,包括长上下文的考虑。

实验结果

研究问题

  • RQ1LLMs 是否可以仅使用工具文档而不依赖演示实现零-shot 使用工具?
  • RQ2文档仅提示在视觉和语言基准上与演示相比有何差异?
  • RQ3工具文档是否可以扩展到数百个工具而不牺牲性能?
  • RQ4仅凭文档能否有效使用图像编辑和视频跟踪的未见工具?
  • RQ5工具文档是否促进自动知识发现和对近期工具化流程的再创新?

主要发现

  • 工具文档实现的零-shot 工具使用在若干基准上与少量示例提示相当甚至优越。
  • 在新收集的大型工具基准(LLM Cloud CLI,包含200个工具)上,带文档的零-shot 优于无文档的少样本提示,降低对精心挑选演示的依赖。
  • 工具文档使对未见工具在图像编辑与视频跟踪中的即插即用使用成为可能,使用仅文档即可重构类似 Grounded-SAM 和 Track Anything 的工作流。
  • 将文档长度增加到大约600字左右可在零-shot 文档场景中提高性能;非常长的文档(>600字)可能因长输入挑战而降低性能。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。