
Long-running AI agents generate more history than a model's context window can hold, so teams compress earlier turns into summaries before the session breaks. The hard question is not how small the summary gets, but whether the agent can still work afterward. Standard quality metrics such as ROUGE and embedding similarity compare the compressed text to the original, yet an agent can fail even when those scores look strong. This article explains the gap between text similarity and functional capability, and presents a probe-based evaluation framework that asks the compressed agent questions its task actually depends on. It covers the four probe types, a six-dimension grading rubric applied by an LLM judge, the design of a fair benchmark over production sessions, and the calibration controls that make the judge trustworthy. It is written for engineers building or adopting context compression who need real QA evidence rather than similarity scores.

ROUGE is a recall‑oriented n‑gram metric that scores a summary by counting how many reference word sequences it reproduces 【source】(https://nexla.com/ai-readiness/llm-evaluation/). Because it works on exact token overlap, a summary that copies the phrasing of the original— even if it discards a crucial detail such as a file path—can receive a perfect ROUGE‑1 or ROUGE‑L score while rendering the downstream agent unable to locate the required artifact.
Embedding similarity replaces word‑level matches with cosine similarity between dense vector embeddings of two texts 【source】(https://nexla.com/ai-readiness/llm-evaluation/). This captures semantic closeness, so paraphrases receive high scores. Yet it still evaluates only the compressed text; it cannot detect whether the compressed representation preserves the exact information the agent must act on (e.g., a specific API key, command line flag, or JSON schema).
The gap becomes concrete when an agent stalls or hallucinates after a compression step that scored well on both ROUGE and embedding similarity. The metrics describe a relation between two texts, not the continuation capability of the agent plus its task—the property that actually matters to users.
A common but misleading proxy is the compression ratio (e.g., “99.3 % compression”). High ratios can increase hidden costs: agents may need to re‑fetch files, repeat searches, or lose cache discounts, resulting in more total tokens per completed task than the per‑request savings 【source】(https://www.zenml.io/llmops-database/evaluating-context-compression-strategies-for-long-running-ai-agent-sessions). Similarly, a recent analysis of prompt‑caching showed that rewriting the conversation history invalidates cheap repeat‑token discounts, so the net bill can rise despite fewer tokens per turn 【source】(https://tokenade.net/en/articles/headroom-vs-rtk).
Response‑equivalence evaluations (e.g., Headroom’s built‑in suite that compares answers from original vs. compressed contexts) report high preservation rates—≈95 %+ accuracy on HotpotQA‑style QA, with GSM8K unchanged at 0.870 and TruthfulQA improving from 0.530 to 0.560 【source】(https://github.com/headroomlabs-ai/headroom). Those numbers are version‑sensitive and self‑reported, but they illustrate that token reduction alone does not guarantee functional fidelity.
Thesis: similarity metrics are useful sanity checks, but they measure textual overlap. The real success criterion is whether the compressed context still enables the agent to continue its task correctly. Probe‑based evaluation, which asks the agent task‑specific questions after compression, directly assesses that continuation property.

Production‑level analyses of summarisation‑based context compression consistently reveal five families of information that are silently lost once a compressor runs — typically when the prompt reaches 50 %–70 % of the model’s context window【https://mem0.ai/blog/context-compression-vs-memory-in-ai-agents】.
| Lost category | Typical example | Why it disappears |
|---|---|---|
| Exact numeric values | “The retry limit is 3” → “retries were configured” | Summaries tend to abstract numbers into vague statements to stay short. |
| Hard constraints | “Don’t touch test files” / “No Redis in this environment” | Rules are treated as background knowledge and are dropped after a few cycles. |
| Decision reasoning | The what of a choice is kept, but the why vanishes | Summarisers keep outcomes but omit the chain‑of‑thought that justifies them. |
| Cross‑turn dependencies | A file edited at turn 12 is later used by a tool at turn 47 | Compression processes eviction spans independently, so links across distant turns are missed. |
| Implicit preferences | User’s preferred coding style, naming conventions, or tone | Unstated patterns are not explicitly mentioned in the dialogue, so they are omitted. |
Because compressors fire after 20 + turns of accumulated constraints, many of these items have already been introduced before the first summarisation takes place【https://mem0.ai/blog/context-compression-vs-memory-in-ai-agents】. The practical impact appears as a set of silent, lossy degradation failure modes that do not raise exceptions; the agent continues to run, often with misplaced confidence【https://www.zenml.io/llmops-database/evaluating-context-compression-strategies-for-long-running-ai-agent-sessions】:
These symptoms are structurally silent: no error is thrown, and token‑level similarity metrics such as ROUGE or embedding cosine similarity can still be high because the summary looks faithful to the original text. The real test, therefore, must be functional—probing whether the compressed agent can still answer the same questions it could before compression.

After a compression point the evaluation framework inserts a probe—a targeted question that can only be answered correctly if the essential information survived the summarisation. By converting the unobservable property “did the information persist?” into the observable behaviour “can the agent retrieve and use it now?” the probe approach sidesteps the shortcomings of lexical metrics such as ROUGE, which can report high similarity while the agent has actually lost the ability to act on the content【0†content】.
The framework defines four probe types, each targeting a distinct preservation property:
| Probe type | Purpose | Example question |
|---|---|---|
| Recall | Checks factual retention of concrete details. | “What was the original error message?” |
| Artifact | Verifies that the agent still tracks files or objects it has created/modified. | “Which files have we modified? Describe what changed in each.” |
| Continuation | Tests whether the agent can resume the next logical step in a multi‑step workflow. | “What should we do next?” |
| Decision | probes the reasoning chain that led to a policy or choice. | “What did we decide regarding the Redis issue?” |
If the compression kept the relevant snippet, the agent answers accurately; otherwise it guesses or hallucinates, and the hallucination is graded. The signal is symmetric and observable: correct answers confirm preservation, incorrect ones expose loss【0†content】.
Both modes output a structured verdict that includes:
The machine‑readable format makes the results CI‑actionable, enabling automated alerts when a particular probe consistently falls below a threshold.
By directly measuring whether the compressed agent can still answer the four functional questions, the probe approach provides concrete, task‑relevant evidence that text‑similarity scores simply cannot deliver【0†content】.

In the probe‑based framework each answer produced by a compressed‑context agent is handed to an LLM judge (GPT‑5.2 in the published experiments) that rates it on six orthogonal dimensions. The judge is blind to the compression technique that generated the answer, and it returns a structured JSON object containing a 0‑5 score and a short justification for every criterion. This design supplies both a quantitative signal and a debugging narrative that pinpoints which part of the compression pipeline lost information.
| Dimension | What is evaluated | Scoring anchor points (0 – 5) |
|---|---|---|
| Accuracy | Correctness of file paths, function names, error messages, and other technical facts. | 0 = completely incorrect or fabricated, 3 = mostly accurate with minor errors, 5 = perfectly accurate【1†url】 |
| Context Awareness | Alignment with the current conversation state and the up‑to‑date artifact state. | Same three‑point anchors apply. |
| Artifact Trail | Ability to enumerate which files were read, created, or modified, and how they were used. | 0 = no traceable references, 5 = full, precise trail. |
| Completeness | Coverage of all sub‑questions and depth of explanation. | 0 = only a fragment answered, 5 = thoroughly addressed every aspect. |
| Continuity | Whether the agent can keep working without having to re‑fetch earlier context. | 0 = requires full context reload, 5 = self‑contained continuation. |
| Instruction Following | Conformity to the probe’s prescribed format, length limits, and any explicit constraints. | 0 = ignores format, 5 = exactly respects it. |
Each dimension aggregates several fine‑grained criteria (e.g., accuracy_factual, context_conversation_state). The judge follows a system prompt that treats it as an expert evaluator and applies the anchored rubric to assign scores, then writes a brief rationale that becomes actionable debugging information – for instance, “Missing utils.py path indicates the compression stage dropped the import‑log snippet.”【3†url】
To keep the judge’s judgments stable across runs, the rubrics are anchored at three calibrated points (0, 3, 5). Calibration probes with known correct and incorrect answers are interleaved with the real test set; the judge’s outputs on these control items are monitored, and the prompt is tweaked until the expected distribution (e.g., a 0 on an obviously fabricated answer) is achieved. This practice mirrors the MT‑Bench methodology that reports >80 % agreement with human judges【5†url】.
Benchmark results show that Completeness and Instruction Following consistently receive high scores (average > 4.3) across every compression method evaluated. Because these dimensions do not separate the methods, they add cost without providing signal. In contrast, Accuracy, Context Awareness, and Artifact Trail exhibit a broader spread and correlate strongly with downstream task success. Practitioners are therefore advised to prioritize these three content‑focused dimensions when designing custom rubrics, and to treat the other two as sanity checks rather than primary discriminators.
When building your own probe‑based evaluation pipeline:

The evaluation harness guarantees that every probe score reflects only the quality of the compressor. For each of the hundreds of compression points drawn from 36,611 production messages—spanning PR review, testing, bug fixes, feature implementation, refactoring, CI troubleshooting, data‑science, and ML‑research tasks—the harness supplies the exact same conversation prefix to every method under test. After compression, the harness generates the four probe questions (recall, artifact, continuation, and decision) and lets each method answer them. The resulting four responses are then judged against the six‑dimension rubric (accuracy, completeness, relevance, logical consistency, preservation of low‑entropy details, and usability) by an LLM judge, ensuring a uniform scoring surface across methods【source:https://factory.com/news/evaluating-compression】.
Using real production traces is essential because synthetic QA pairs cannot mimic the dense, low‑entropy tokens that agents actually lose—file paths, error codes, endpoint names, and version‑specific flags. In synthetic histories such details are either omitted or overly generic, so a compressor that drops them would not be penalised. The authentic logs in the dataset expose whether a summary truly retains the information the downstream agent needs to continue work【source:https://www.zenml.io/llmops-database/evaluating-context-compression-strategies-for-long-running-ai-agent-sessions】.
The three compressors compared are:
Factory — Anchored Iterative Summarization
Maintains a structured, persistent anchor (intent, changes made, decisions taken, next steps). When the token budget is exceeded, only the newly‑evicted span is summarised and merged into the anchor, preventing silent loss of critical details【source:https://zylos.ai/research/2026-02-28-ai-agent-context-compression-strategies】.
OpenAI — /responses/compact endpoint
Returns an opaque, highly compressed representation optimized for reconstruction fidelity. It achieves the highest compression ratios but offers no human‑readable view of what survived, making verification impossible【source:https://www.zenml.io/llmops-database/evaluating-context-compression-strategies-for-long-running-ai-agent-sessions】.
Anthropic — Claude SDK built‑in compression
Generates a full‑text summary of 7–12 k characters on every trigger. The summary is structured and inspectable, but the system rebuilds the entire summary each time rather than incrementally merging new information, which can introduce redundancy and extra latency【source:https://zylos.ai/research/2026-02-28-ai-agent-context-compression-strategies】.
By enforcing identical prefixes, exhaustive probe generation, and a six‑dimensional LLM‑based rubric, the harness isolates compressor behaviour and yields functional evidence that similarity metrics like ROUGE simply cannot provide.

The probe‑based benchmark evaluated three compression pipelines on a corpus of production‑grade, 178‑message debugging sessions. Overall quality was measured on a 5‑point scale using a six‑dimension rubric (accuracy, context awareness, completeness, instruction following, consistency, and artifact trail). The results were:
| Method | Overall | Compression Ratio | Accuracy | Context Awareness |
|---|---|---|---|---|
| Anchored structured summarization (Factory) | 3.70 | 98.6 % | 4.04 | 4.01 |
| Anthropic built‑in compression | 3.44 | 98.7 % | 3.74 | 3.56 |
| OpenAI compact endpoint | 3.35 | 99.3 % | 3.43 | 3.64 |
The structured method kept roughly 0.7 % more tokens than OpenAI’s approach, yet it earned a 0.35‑point quality advantage—an economy that pays off when re‑fetching context is costly【source1】.
Dimension breakdown (selected)
A representative session involved a stale Redis connection that caused a 401 response. The probes asked the compressed agent to:
| Method | Score (out of 5) | Detail retained |
|---|---|---|
| Anchored structured | 4.8 | Endpoint path, 401 code, stale Redis cause. |
| Anthropic | 3.9 | Correct code and general cause, but lost the endpoint path. |
| OpenAI | 3.2 | Vague “authentication issue” without concrete identifiers. |
For the artifact probe (e.g., “Which files were modified?”), the structured method scored 3.6 while OpenAI managed only 2.8, confirming the gap in file‑state tracking【source2】.
The results reveal two key insights:
Structure outweighs raw compression ratio – Explicit sections that force low‑entropy details (file paths, exact endpoints) to be stored verbatim prevent “silent drift” where the agent loses critical facts, even though the token budget is nearly the same.
Artifact tracking remains unsolved – All pipelines scored poorly on the artifact‑trail dimension, indicating that summarization alone cannot guarantee reliable file‑state provenance. The literature suggests a separate artifact index or scaffold‑level state tracking outside the textual summary as a plausible remedy【source3】.
In short, probe‑based evaluation exposes functional failures that traditional similarity metrics like ROUGE miss, and it highlights that improving compression quality hinges on richer structural representations rather than squeezing a few extra tokens.

Standard LLM judges inherit many of the same weaknesses that affect textual similarity metrics. Empirical work shows that position bias can shift preferences by more than 10 % when the order of candidates is swapped, verbosity bias rewards longer answers, and self‑preference bias appears when the judge shares a model family with the agent under test【source】(https://www.braintrust.dev/articles/what-is-prompt-evaluation). These effects, together with run‑to‑run score variability, make it essential to treat the judge as a measured instrument rather than a perfect oracle.
| Bias / Issue | Typical symptom | Primary mitigation |
|---|---|---|
| Position bias | First option receives higher score | Randomize the order of presented candidates |
| Verbosity bias | Longer responses score higher regardless of content | Penalize unnecessary length in the rubric |
| Self‑preference | Judge favours outputs from the same model family | Use a judge from a different family |
| Run‑to‑run inconsistency | Scores fluctuate across identical prompts | Pin temperature = 0; optionally average multiple runs |
| Cost at scale | Evaluation expense grows with repeated runs | Limit to a single judge per probe; batch executions |
Note: Using GPT‑5.2 as the judge is a version‑sensitive choice; switching to a different model (or a newer GPT‑5.x release) invalidates any previously established calibration. Re‑run the calibration pipeline whenever the judge model changes.
In short, probes can reveal functional degradation that ROUGE cannot capture, but the reliability of those probes hinges on a rigorously calibrated LLM judge. Treat calibration as a recurring cost of measurement, not a one‑off setup, and the resulting scores will remain a trustworthy signal for context‑compression decisions.

| ✅ Checklist Item | What to Do | Why It Matters |
|---|---|---|
| 1. Source probes from real session traces | Extract probe prompts directly from production logs rather than inventing synthetic histories. | Real traces preserve the true information density and task semantics; synthetic probes can mis‑represent difficulty and give a false sense of safety.¹ |
| 2. Stress‑test compression aggressively | Run the pipeline with the context window shrinking to 10–20 % utilization (instead of the usual ≈ 85 %). Generate many compression events per run to amplify differences between summarizers. | Aggressive triggering creates a high‑signal environment that reveals subtle regressions that are invisible under gentle usage.² |
| 3. Add explicit recoverability tests | Include “needle‑in‑the‑haystack” probes that require the agent to retrieve a fact that was heavily summarized (e.g., a specific error code or configuration value). | Guarantees that critical details remain accessible after compression; without this, the agent may appear to work while silently missing needed evidence.² |
| 4. Monitor for goal drift | After each compression point, ask a decision‑type probe that checks whether the agent still pursues the original objective (e.g., “What is the next step to resolve the Redis issue?”). | Agents can stay locally coherent yet abandon the user’s goal, a failure mode that similarity scores never surface.³ |
| 5. Treat artifact tracking as scaffolding | Keep a separate file‑state index (or structured artifact log) rather than expecting the summary to encode all file paths and modifications. All summarizers in the benchmark scored only 2.2–2.45 / 5 on the artifact‑tracking dimension, indicating systematic weakness.⁴ | |
| 6. Gate releases on total tokens per completed task | Use the tokens‑to‑completion metric (total tokens consumed from start to successful task finish) as the release threshold, not raw compression ratio or tokens‑per‑request. | High compression ratios can inflate token savings while actually increasing re‑fetch costs; the true cost is what you spend to finish the job.⁴ |
| 7. Layer cheap smoke tests under functional probes | Run lightweight equivalence checks (e.g., F1, semantic similarity) before the full probe suite, and treat them as early‑exit guards rather than replacements for probes. | Smoke tests catch obvious regressions quickly; functional probes still provide the decisive functional signal.⁵ |
| 8. Wire probe results into CI/CD | Automate the full probe‑based evaluation (including the six‑dimension LLM judge rubric) in your continuous‑integration pipeline; block merges that degrade any probe score beyond a pre‑defined tolerance. | Guarantees that any change to compression prompts, models, or post‑processing is validated against functional evidence before reaching production.⁶ |
The benchmark suggests a ratio – reliability – auditability curve:
Choose the operating point that matches your workload’s cost profile and risk tolerance.
References