Apply to my task
arXiv:2610.21893 ★ 88 Oct 15, 2026

Goal-Adaptive Compression: compress context for a specific goal, not “in general”

Key result

Under a tight limit of 5–10% of the source, compressing with a named goal yields roughly twice as many correct answers as compressing “in general.” The method lets you shrink a long chat, document, or agent log so you can pick up the work tomorrow without losing the details you need. The trick: don't show the model the future questions, just tell it what you'll do with the text next. The goal works as a filter: the model decides on its own what to keep in detail and what to toss.

01

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.

02

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.

03

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.

04

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.

05

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.

06

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.

07

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%.

08

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.

Research digest

Key result

Under a tight limit of 5–10% of the source, compressing with a named goal yields roughly twice as many correct answers as compressing “in general.” The method lets you shrink a long chat, document, or agent log so you can pick up the work tomorrow without losing the details you need. The trick: don't show the model the future questions, just tell it what you'll do with the text next. The goal works as a filter: the model decides on its own what to keep in detail and what to toss.

Principle

The compression prompt gets three things: the source text, the goal, and a length limit. That's it. The model never sees the questions. The goal is a future task, not a topic. “About webhooks” is a label; it gives the model almost nothing. “Tomorrow I'm fixing the webhooks, I need the errors, the files, and what I've already tried” is a working goal. It's like packing a backpack for a hike. Know the trail? You pack the tent and water. Don't know it? You throw in a little of everything and end up short on all of it. A good test for the goal: “what will I be able to do with this information?”

Why it works

Goal-free compression is a guessing game. The model doesn't know what matters and keeps “a bit of everything on average.” At a 5–10% limit, the needed details fall out. And here's the weird part: without a goal, the model actually spent more tokens on compression, while accuracy came out lower. With a goal, the model sorts information by usefulness quite well. The goal decides what to keep in detail, what to squeeze into one line, and what to throw out. The kicker: a wrong goal is worse than none at all. Compress for one task, ask about another, and accuracy dropped in 42 out of 44 cases. Now, to be fair. Even the best models rarely keep everything they need in full. They remember individual facts, but the summary usually isn't enough to answer all the goal's questions. This is a benchmark, not a ready-made recipe: the authors didn't test which goal phrasings work best.

When to apply

Long sessions with an agent or in a chat → moving to a new conversation when tomorrow's task is clear, but you can't write out the questions in advance. Especially when the context is stuffed with logs and you only need a small slice of it. Good for: chat threads, long documents, agent work logs, Claude Code sessions. NOT a fit when you need to remember everything word for word: IDs, amounts, contract wording. Keep that in the source or a file.

Mini recipe

1. Name the goal: 1–2 sentences about what you'll do next. Not a topic, a task. 2. Set a limit: 5–10% of the source length. These are exactly the budgets where the goal made a difference. 3. List what to keep: errors, decisions made, rejected hypotheses, current settings, “what belongs to what” relationships. 4. Allow it to toss the rest: anything the goal doesn't need gets one line. 5. Forbid making things up: not in the source, don't write it. If versions conflict, keep both and cite the source. 6. Test the summary: open a new chat, give it only the compressed version and 3–5 questions you'll ask tomorrow. Missed some? Add those details to the goal and re-compress from the source. 7. Task changed: compress again from the source, not from the old summary.

Examples

[BAD]: `/compact` or `Write a short summary of our conversation` [GOOD]: `/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 settings, and test status. For the Amazon export, keep one line: “not touched, status is X.” Limit: about 1500 tokens.` Result: a short summary tuned for the webhooks. Amazon gets one line. Without a goal you'd get a flat “a little bit of everything” summary where the webhook details are blurred. [BAD]: `Compress this report by 10%, we'll see later` (and then suddenly you need a different question answered from the same summary) [GOOD]: `Goal: I'll be comparing quarterly revenue for an investor presentation. Keep the numbers, the periods, and which division each value belongs to. Everything else gets one line. Limit: 400 words.`

In plain words

When you ask a model to shorten a long document without specifics, it turns into a blindfolded editor. Models can't read minds, so without a clear target, context compression becomes spreading mush around the plate. The GACC-Bench benchmark confirmed the obvious: the model desperately needs a vector toward the future goal, not a pointless command like “cut this text down 5x”.

It's like sending a friend to the grocery store with “grab some food” and then getting mad when he comes back with chips instead of a real dinner. But tell him “get stuff for a backyard barbecue”, and he'll skip the junk on his own, no itemized list needed. Without a clear task, the model tries to keep “a little bit of everything” and predictably dumps the critical details in the trash.

What actually works: goal-adaptive compression aimed at the next step of the work. Under a tight limit of 5–10% of the original size, a generic summary turns to mush, while a goal holds on to the facts you need. The big paradox from the tests: without a task, the model spends more tokens on reasoning and still delivers total garbage.

It was tested on agent logs and chat threads, but the principle is universal. It works for multi-agent systems, complex knowledge bases, and RAG pipelines, where giant context windows cost a fortune. If you don't need to remember the source word for word, just tell the model why you need this summary further down the chain.

Bottom line: stop asking the model to “write a quick summary” — always explain what you're compressing the text for. Otherwise you're just burning tokens and getting sterile filler. Goal-targeted data compression saves money and keeps focus, while blind guessing guarantees the task falls flat.

AI lab assistant

Apply this study to your task

Describe what you're working on. AI takes the method and the measured results from this paper and adapts them to your case, or writes a ready prompt built on them.

Based on Goal-Adaptive Compression: compress context for a specific goal, not “in general” arXiv:2610.21893

Sign in to apply this study New accounts get 50 free credits.