Introduction
Large Language Model (LLM) agents have demonstrated remarkable potential in solving complex tasks by interacting with external tools and APIs. However, a significant bottleneck remains: the documentation for these tools is typically authored for human developers, often containing redundant metadata, inconsistent formats, and lacking clear usage examples. This "noisy" documentation consumes excessive context window space and leads to frequent agent failures. We present EASYTOOL, a framework designed to bridge the gap between real-world tool documentation and the instruction-following capabilities of LLMs.
The Challenge of Real-World Documentation
Documentation sourced from platforms like RapidAPI or HuggingFace often suffers from three primary deficiencies:
- Inconsistency: Varied formats across sources confuse the model's retrieval and selection logic.
- Redundancy: Bloated metadata (e.g., pricing, internal IDs) distracts the model and wastes tokens.
- Incompleteness: A lack of concrete usage scenarios and parameter formatting examples leads to hallucinations.
These issues frequently result in "Tool Name Errors" (calling non-existent APIs) and "Parameter Errors" (passing incorrect data types).
Methodology: The EASYTOOL Pipeline
EASYTOOL purifies raw documentation into a unified, instruction-oriented format through a two-stage process:
1. Tool Description Generation
An LLM ingests raw documentation and generates a streamlined summary. This stage discards irrelevant metadata, focusing strictly on the tool's core purpose and its available functions.
2. Tool Functionality Guidelines Construction
For each function, the framework constructs structured instructions that include:
- Scenario: A natural language description of the specific context in which the tool should be used.
- Parameters: A clear list of required and optional inputs.
- Examples: Concrete key-value pairs demonstrating successful API calls.
This transformation leverages the LLM's inherent strength in following task-oriented instructions rather than requiring complex reading comprehension over raw JSON.
Experimental Setup
The framework was evaluated across three benchmarks:
- ToolBench: Real-world REST APIs requiring multi-tool coordination.
- RestBench (TMDB): Sequential API call pathfinding for movie information.
- FuncQA: Numerical reasoning with sparse documentation.
Results and Discussion
EASYTOOL demonstrates that providing "less" information can lead to "more" performance by focusing the model's attention on high-signal content.
Efficiency Gains
EASYTOOL achieved massive reductions in token consumption: 70% in ToolBench and over 97% in RestBench. This efficiency allows agents to handle more tools within the same context window.
Performance and Error Reduction
On ToolBench, ChatGPT’s success rate improved from 15.0% to 52.8%. Crucially, as shown in Figure 6, EASYTOOL significantly reduces both Name and Parameter errors. By providing clear scenarios and examples, the framework guides the model toward correct tool selection and execution.
Impact on Smaller Models
The standardization provided by EASYTOOL acts as a force multiplier for smaller models. For instance, Llama-3.1-8B improved from a 0% success rate on difficult tasks to 48.5%, outperforming some larger models that used raw documentation.
Conclusion
EASYTOOL provides a scalable way to optimize tool documentation for LLM agents. By transforming noisy data into concise, scenario-driven instructions, it enhances both efficiency and accuracy. Future research will focus on incorporating tool dependencies and improving performance for models with weaker baseline instruction-following capabilities.
Summary updated