TL;DR
GACC-Bench is a benchmark that tests a simple idea. When you ask a model to compress a long context (a document, a chat thread, an agent's work log), you should name the goal: what the compressed text will be used for next. Compressing toward a goal keeps exactly the information you'll need later. And you don't have to know the specific future questions to do it.
The headline finding has two halves. First: the goal genuinely helps. Under a tight budget (5–10% of the original), answer accuracy on the compressed text roughly doubled across models compared to “goal-free” compression. Second: a wrong goal is worse than no goal at all. Compress for one task, then ask about another, and accuracy dropped almost everywhere. Out of 44 such “mismatched” pairs in the motivating experiment, 42 showed losses. There's bad news too: even the best models rarely keep everything the goal needs in full. They recall individual facts reasonably well. But to answer all the goal's questions correctly, the compressed version usually falls short.
The method is simple: the compression prompt gets three things — the source text, the goal (a sentence or two about future use), and a length limit. That's what Claude Code does with /compact when you give it a focus.
Want this for your own case? Apply this study to your task: AI adapts its method to what you are working on and writes the prompt.
Method Blueprint
INPUT: source context + GOAL (what you'll do with it next) + length LIMIT
(future questions are NOT shown to the model)
STEP 1: The model compresses the context toward the goal within the limit → compressed text
STEP 2: The compressed text is used going forward (new chat / continued session)
STEP 3: Check: ask 3–5 test questions about the goal → does the compressed version answer them?
Steps 1–2 are one request, then a fresh context. Step 3 is optional, as a separate request.
Example in Practice
Where the method shines: a long context, followed by work that's clear in scope but not mapped out question by question in advance. Not a fit for “I need to remember everything word for word.”
Task: You're three hours deep in Claude Code on an online store. You hooked up Stripe, debugged failing payment webhooks, and poked at the order export to Amazon. The context is stuffed with logs. Tomorrow you only need to finish the payment webhooks.
Prompt (in Claude Code):
/compact Goal: tomorrow I'll keep fixing the failing Stripe webhooks. Keep everything I need for that: which errors and in which files, what we already tried and why it didn't work, decisions made, current config values, and test status. For the Amazon export, keep just one line: “not touched, status is X.” Limit: about 1500 tokens.
Result: The model produces a short summary tuned for the webhooks: errors, files, rejected hypotheses, agreed decisions. Amazon gets one line. Without a goal you'd get an even-handed “a little bit of everything” summary where the webhook details are blurred.
Why It Works
The weakness. Goal-free compression is a guessing game. The model doesn't know what matters, so it keeps “a bit of everything on average.” At a 5–10% limit, the details you'll need later fall out. In the study, goal-free compression even burned more tokens, while accuracy came out lower.
The strength. Models are good at ranking information by usefulness once you tell them what it's for. The goal is a filter. The model decides what to keep in detail, what to squeeze into one line, and what to toss.
Control levers: - Goal = a future task, not a topic. When building the benchmark, the authors rejected label-style goals (“about webhooks”) and goals that just restated the questions. A good goal answers “what will I be able to do with this information?” - A wrong goal hurts. Task changed? Re-compress from the source for the new goal, not from the old summary. - Budget. A bigger limit gives better results, but the gap with the full context remains even at large limits. - Information types. The authors tested facts, calculation chains, “what belongs to what” comparisons, rules with exceptions, and conflicting versions with source attribution. State in the prompt which types you need.
Prompt Template
The authors' original prompt lives in the appendix; it's not in the paper itself. Below is a template built from the method description: source, goal, limit, questions hidden.
You are compressing context for further work.
<Goal>
{goal: what I'll do with this information next, 1–2 sentences}
</Goal>
<Limit>
No more than {number} tokens (roughly {number_of_words} words).
</Limit>
<Rules>
- Keep what the goal needs: facts, numbers, decisions, conditions, exceptions.
- Keep relationships: which value belongs to which object, period, or case.
- If the source has conflicting versions, keep both and note where each came from and which is newer.
- Calculations: keep the inputs and the result so they can be recomputed.
- Anything the goal doesn't need: one line, or drop it.
- Make nothing up. If it's not in the source, don't write it.
</Rules>
<Context>
{text, chat thread, or log}
</Context>
Output only the compressed version.
What to fill in: {goal} — a future task, not a topic. {number} — 5–10% of the source length (per the paper, these are exactly the budgets where the difference showed up). {text} — the context itself.
🚀 Quick start — paste into the chat:
Here's a template for goal-based context compression. Adapt it to my task: [my task].
Ask me questions to fill in the fields.
[paste the template above]
The LLM will ask what you'll do with the compressed version, what limit you need, and which types of information are critical. The goal is the method's key field; without it, compression collapses into a plain “write me a summary.”
Check (step 3): in a separate request, give the model only the compressed version and 3–5 questions you'd ask tomorrow. If it can't answer some of them, add those details to the goal and re-compress from the source.
Limitations
⚠️ A tight limit loses a lot: even for the best models, full goal coverage (every question about it answered correctly) was low at a 5–10% limit. Compression is information loss. Keep critical details (IDs, amounts, contract wording) in the source or a file.
⚠️ A wrong goal hurts: once the task changes, the old summary is already tuned for something else. Re-compress from the source, not from the summary.
⚠️ One reader and one judge: all evaluations used a single reader model and a single judge. The absolute numbers depend on them. The direction of the effect was confirmed across six models.
⚠️ The prompts aren't in the paper text: the authors' wording lives in the appendix. The template above is a reconstruction from the description, not a copy.
⚠️ This is a benchmark, not a recipe: it compared “with a goal,” “without a goal,” and “with someone else's goal.” Which goal phrasings work best, the authors didn't test.
How It Was Studied
The authors assembled 500 goals and 2571 questions over 281 contexts: documents, code, meeting transcripts, agent logs. All data was verified by experts. The compressor model received the text, the goal, and the limit, but not the questions. Then a fixed model answered the questions from the compressed text. At a 5% limit: no goal gave 12–15% correct answers, the matching goal 20–41%, a mismatched goal 4–10%. At 10%: no goal 13–27%, with the goal 36–57%.
Resources
GACC-Bench: Benchmarking Goal-Adaptive Context Compression Ability across Large Language Models. Code and data: https://github.com/weiting24/GACC-Bench. Authors: Weiting Liu, Zhiyu Pan, Shuhong Wang, Zhenquan Yao, et al. Institutions: Fudan University, Huazhong University of Science and Technology, JD.com, Harbin Institute of Technology, HKUST (Guangzhou), Chinese Academy of Sciences.