[Paper Review] On the Tool Manipulation Capability of Open-source Large Language Models
Open-source LLMs lag GPT-4 in tool manipulation, but alignment with programmatic data, in-context demonstration retrievers, and system prompts can boost them up to 90% in success and reach GPT-4 competitiveness on 4 of 8 ToolBench tasks with practical human supervision.
Recent studies on software tool manipulation with large language models (LLMs) mostly rely on closed model APIs. The industrial adoption of these models is substantially constrained due to the security and robustness risks in exposing information to closed LLM API services. In this paper, we ask can we enhance open-source LLMs to be competitive to leading closed LLM APIs in tool manipulation, with practical amount of human supervision. By analyzing common tool manipulation failures, we first demonstrate that open-source LLMs may require training with usage examples, in-context demonstration and generation style regulation to resolve failures. These insights motivate us to revisit classical methods in LLM literature, and demonstrate that we can adapt them as model alignment with programmatic data generation, system prompts and in-context demonstration retrievers to enhance open-source LLMs for tool manipulation. To evaluate these techniques, we create the ToolBench, a tool manipulation benchmark consisting of diverse software tools for real-world tasks. We demonstrate that our techniques can boost leading open-source LLMs by up to 90% success rate, showing capabilities competitive to OpenAI GPT-4 in 4 out of 8 ToolBench tasks. We show that such enhancement typically requires about one developer day to curate data for each tool, rendering a recipe with practical amount of human supervision.
Motivation & Objective
- Identify key challenges hindering open-source LLMs in tool manipulation (API selection, argument population, non-executable generation).
- Propose a practical, supervision-light recipe to boost open-source LLMs using model alignment, demonstration retrieval, and system prompts.
- Introduce ToolBench, a benchmark for evaluating tool manipulation in open-source LLMs against closed APIs.
- Quantify improvements and assess the practicality of human supervision requirements (data templates, demonstrations).
- Demonstrate conditions under which open-source LLMs can approach or match GPT-4 performance on real tools.
Proposed method
- Model alignment with programmatically generated usage data to internalize API usage knowledge.
- Demonstration retrieval to provide semantically similar in-context examples for unseen API combinations.
- System prompt design to constrain generation to executable API calls and specified formats.
- ToolBench as an open-source benchmark with test cases across diverse tools and goals for quantitative evaluation.
- Empirical comparison against GPT-4 APIs and ablation studies to assess contribution of each technique.
- Use of BM25-style retriever for selecting relevant demonstrations and templates to cover APIs.

Experimental results
Research questions
- RQ1Can open-source LLMs achieve competitive tool manipulation with a practical amount of human supervision?
- RQ2What are the main failure modes of open-source LLMs in API selection, argument population, and executable generation, and how can they be mitigated?
- RQ3How much do model alignment, demonstration retrieval, and system prompts individually contribute to performance gains?
- RQ4Does the ToolBench benchmark reveal a consistent gap between open-source LLMs and GPT-4, and can the gap be closed on a subset of tasks?
- RQ5What is the practical cost (human supervision) to achieve substantial improvements?
Key findings
- Open-source LLMs show a large capability gap to GPT-4 in tool manipulation in zero-shot settings.
- Model alignment, demonstration retrieval, and system prompts can boost open-source LLMs by up to 90% in success rate across ToolBench tasks.
- The enhanced open-source LLMs reach competitive or superior performance to GPT-4 on 4 of 8 ToolBench tasks.
- Demonstration retrieval can improve unseen API combination goals by up to 79% with a repository of O(n) demonstrations.
- On average, data alignment requires about one developer day per tool, indicating practical human supervision levels.
- ToolBench provides a publicly available benchmark with predefined test cases and diverse tasks, enabling reliable open-source vs. closed-model comparisons.

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.