GOAT: A Training Framework for Goal-Oriented Agent with Tools
The paper introduces GOAT, a novel training framework that enables fine-tuning of open-source LLM agents for complex tool use without human annotation by automatically synthesizing goal-oriented API execution data from documentation, achieving state-of-the-art performance on existing benchmarks and a newly proposed GOATBench.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you have a very smart, well-read librarian (the AI) who knows how to read books and write stories. However, if you ask this librarian to go to the library's back room, find a specific box of old maps, pull out a specific page, and then use that page to find a specific recipe in a cookbook, the librarian often gets lost. They might guess the wrong box, open the wrong book, or forget to bring the map page to the kitchen.
This is the problem with current AI agents when they try to use "tools" (like APIs, which are digital connections to databases, weather services, or movie lists). They are great at chatting, but terrible at planning a multi-step mission where one step depends entirely on the result of the previous one.
The paper introduces GOAT (Goal-Oriented Agent with Tools), a new training method designed to turn that confused librarian into a master detective. Here is how it works, using simple analogies:
The Problem: The "Guessing Game"
Usually, to teach an AI to use tools, researchers have to hire humans to write out thousands of examples like: "First, ask the weather API for rain. Then, take that 'rain' answer and ask the clothing API for a raincoat."
This is expensive and slow. Without these human-written examples, AI models just guess. They often fail at complex tasks that require chaining multiple steps together.
The Solution: The "Reverse Engineering" Kitchen
The authors of GOAT realized they didn't need humans to write the instructions. They had the "cookbook" (the API documentation) already. Instead of asking the AI to guess the recipe from a finished dish, they decided to build the dish first, then describe the recipe.
They use a "Call-First" strategy:
- Map the Kitchen: First, the system reads all the API manuals and draws a map of how the tools connect. (e.g., "The output of the 'Weather' tool fits perfectly into the input of the 'Umbrella' tool").
- Cook the Meal (The Call-First Step): The system picks a path on this map and actually runs the tools. It asks the weather tool for data, gets the result, and then immediately uses that result to ask the umbrella tool. It doesn't guess; it executes real steps and gets real answers.
- Write the Recipe (The Abstraction Step): After the tools have done the work, the AI looks at the finished chain of events and writes a user query that matches it. It essentially says, "Oh, I just did all these steps to find a raincoat. So, a user asking 'What should I wear if it's raining?' is what I just solved."
By doing this in reverse (Action Question), the AI learns the correct logic of how tools connect without needing a human to write the instructions. It learns by doing the work first, then explaining what it did.
The Result: A Super-Helper
The paper tested this new "GOAT" trained agents on several challenges:
- RestBench & API-Bank: These are like exams where the AI has to find movie reviews or music recommendations using a chain of tools.
- GOAT-Bench: The authors created a brand new, larger exam specifically for these types of complex, multi-step tasks.
The findings were clear:
- Open-Source Models: Before GOAT, smaller, open-source AI models (which are free and available to everyone) were almost useless at these complex tasks. They failed nearly 100% of the time.
- After GOAT: Once trained with this new method, these same open-source models became incredibly good at the tasks. In some cases, they performed better than expensive, closed-source models (like GPT-4) that usually dominate these tests.
- No Human Needed: The entire training dataset was built automatically by the system using the API manuals. No humans had to sit down and write out the step-by-step instructions.
The Bottom Line
GOAT is a way to teach AI agents how to plan and use tools by letting them practice the actual work first, then teaching them to describe the goal. It turns open-source AI models from "clueless guessers" into "reliable planners" without requiring expensive human teachers. The authors have made their code and their new test suite (GOAT-Bench) available for others to use.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.