ACON: Optimizing Context Compression for Long-horizon LLM Agents
This paper introduces ACON, a unified framework that optimizes context compression for long-horizon LLM agents by iteratively refining natural language guidelines based on failure analysis without fine-tuning, thereby significantly reducing token usage while improving task success rates and enabling smaller models to perform effectively.
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
The Problem: The "Infinite Backpack"
Imagine you hire a very smart but slightly forgetful assistant (an AI Agent) to help you plan a complex trip. You give them a task: "Book a flight, find a hotel, and reserve a dinner table."
As the assistant works, they start talking to airlines, checking hotel websites, and emailing restaurants. Every time they get a reply, they write it down in a notebook.
- Step 1: They ask the airline. The airline replies with a 5-page PDF of rules. The assistant writes it all down.
- Step 2: They ask the hotel. The hotel sends a 3-page list of amenities. The assistant writes it all down.
- Step 3: They ask about dinner. The restaurant sends a 10-page menu.
After 20 steps, the assistant's notebook is massive. It's now a 500-page encyclopedia.
Two things go wrong:
- The Cost: Reading a 500-page notebook takes a long time and costs a lot of money (in "tokens," which is how AI companies charge). It's like paying to read the entire encyclopedia just to find out what time the flight leaves.
- The Confusion: Because the notebook is so huge, the assistant gets distracted. They might forget that the flight requires a passport because they are staring at a 10-page menu for a restaurant they haven't visited yet. They lose the "big picture."
The Old Solutions: The "Scissors" and the "Summarizer"
Previously, people tried to fix this in two ways:
- The Scissors (Truncation): Just cut off the first 400 pages of the notebook so the assistant only sees the last 100. Problem: The assistant forgets the flight rules they read on page 50.
- The Generic Summarizer: Ask a human to read the whole notebook and write a one-page summary. Problem: The human might summarize it poorly, leaving out a tiny detail (like a specific password) that causes the whole trip to fail.
The New Solution: ACON (The "Smart Editor")
The authors introduce ACON (Agent Context Optimization). Think of ACON not as a person, but as a smart, adaptive editor who learns exactly how to shrink the notebook without losing the important stuff.
Here is how ACON works in three simple steps:
1. The "Failure Detective" (Optimization)
Instead of guessing what to keep, ACON acts like a detective.
- It runs the assistant on a task. Sometimes the assistant succeeds; sometimes it fails because the notebook was too long or missing info.
- ACON compares the "Success Notebook" with the "Failure Notebook."
- It asks a smart AI: "Why did the assistant fail here? What specific fact was missing from the summary?"
- Based on this, ACON rewrites the instructions for the editor. It says, "Next time, never summarize the login password, and always keep the flight departure time, even if it's buried in a long email."
- Key Point: It doesn't retrain the main AI agent. It just gets better at writing the rules for how to summarize.
2. The "Tiny Intern" (Distillation)
Once ACON has figured out the perfect rules for editing, it teaches a smaller, cheaper AI (a "student") how to do the job.
- Imagine the "Teacher" is a famous, expensive editor (like a senior consultant).
- The "Student" is a fast, cheap intern.
- ACON shows the Student thousands of examples of "Before" and "After" summaries.
- The Student learns to summarize just as well as the Teacher but costs a fraction of the price and works much faster.
3. The Result: A Lean, Mean Machine
Now, the assistant has a notebook that is:
- Shorter: It fits in a pocket instead of a backpack (saving money and time).
- Smarter: It contains only the critical facts needed for the next step (preventing confusion).
- Accessible: Even a smaller, cheaper AI agent can do the job effectively because it isn't overwhelmed by a giant notebook.
What the Paper Actually Found
The researchers tested this on three different "worlds":
- AppWorld: An agent managing apps like Spotify, Venmo, and Todoist.
- OfficeBench: An agent doing office work like Word, Excel, and Email.
- Multi-objective QA: An agent answering 8 different research questions at once.
The Results:
- Savings: They reduced the amount of text the AI had to read by 26% to 54%.
- Better Performance: The agents actually got more tasks done correctly because they weren't distracted by irrelevant information.
- Small Models Win: They showed that a smaller, cheaper AI model (like Qwen-14B) could perform almost as well as a giant, expensive model (like GPT-4) when using ACON. The compression acted like a "leveler," helping smaller brains focus better.
Summary Analogy
Imagine you are trying to solve a mystery in a house with 1,000 rooms.
- Without ACON: You carry a map of the entire house. It's so big you can't see the room you are currently in. You get lost.
- With ACON: You have a magical guide who looks at the map, realizes you only need to know about the current room and the next three rooms, and tears up the rest of the map. The guide also teaches a junior detective how to do this tearing perfectly. Now, the junior detective can solve the mystery just as fast as the senior one, without getting lost in the noise.
The paper claims this method works for long, complex tasks, saves money, and helps smaller AI models perform better, but it does not claim to solve medical diagnoses, legal advice, or other specific real-world applications beyond the benchmarks they tested.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.