[Paper Review] Tool Documentation Enables Zero-Shot Tool-Usage with Large Language Models
Tool documentation enables LLMs to use tools in a zero-shot setting, often matching or outperforming few-shot demos, and scales to large tool sets and unseen tools across vision and language tasks.
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.
Motivation & Objective
- Motivate reducing reliance on demonstrations for tool usage due to curation bias and scalability concerns.
- Propose tool documentation as an alternative prompting signal for LLMs in multi-tool settings.
- Empirically evaluate zero-shot documentation across six tasks spanning language and vision modalities.
- Demonstrate plug-and-play extension to unseen tools and tasks using only documentation.
Proposed method
- Compare prompting with/without tool documentation and varying numbers of demonstrations.
- Evaluate on six tasks: ScienceQA, TabMWP, NLVRv2, LLM Cloud CLI (unseen large tool set), image editing, and video tracking.
- Use GPT-based planners (e.g., gpt-3.5-turbo) to generate tool-use programs executed by an environment.
- For the large tool set, retrieve tool docs with TF-IDF and truncate to fit prompts.
- Show zero-shot tool usage with newly released tools by relying solely on their documentation (GroundingDino, SAM, XMem).
- Analyze how documentation length affects performance, including long-context considerations.
Experimental results
Research questions
- RQ1Can LLMs use tools zero-shot using only tool documentation without demonstrations?
- RQ2How does documentation-only prompting compare to demonstrations across vision and language benchmarks?
- RQ3Can tool docs scale to hundreds of tools without sacrificing performance?
- RQ4Can unseen tools for image editing and video tracking be used effectively with documentation alone?
- RQ5Do tool docs enable automatic knowledge discovery and re-invention of recent tooling pipelines?
Key findings
- Tool docs enable zero-shot tool usage that is competitive with or superior to few-shot prompts on several benchmarks.
- On a newly collected large-tool benchmark (LLM Cloud CLI with 200 tools), zero-shot with documentation outperforms few-shot without documentation and reduces dependence on careful demo curation.
- Tool documentation enables plug-and-play use of unseen tools for image editing and video tracking, reconstructing workflows similar to Grounded-SAM and Track Anything using only docs.
- Increasing documentation length up to around 600 words improves zero-shot performance in zero-shot doc scenarios; very long docs (>600 words) can degrade performance due to long-input challenges.
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.