[KongchangAI]
Conceptcompaction / Context Compaction / 上下文压缩机制

Context Compression

A lossy compression mechanism automatically triggered by large language model tools when a conversation exceeds the context window limit. Earlier dialogue history is condensed into a brief summary to free up token space, a process that may cause loss of granular details such as debugging decisions.

Core Facts

Timeline (last 90 days)

Nov 19

Existing context compression schemes typically retain condensed conclusions and discard early observations, but the discarded evidence may become critical again in later steps.

Unverified50%
Nov 16

In long-horizon agent tasks, interaction trajectories often far exceed the model's context window, making context compression a hard problem.

Unverified50%
Nov 13

Commonly used context management methods in the industry include context compression, on-demand retrieval and session isolation.

Unverified50%
Nov 6

In practice, micro-sessions can be used as execution units, combined with a state graph engine to manage state between sessions and supplemented by context compression to reduce pressure within a single session; these approaches are not mutually exclusive.

Unverified50%
Nov 6

The essential difference between micro-sessions and context compression is that compression performs lossy summarization of history within the same session, whereas micro-sessions actively end the session and hand over via structured state.

Unverified50%
Nov 6

Context compression solves the "doesn't fit" problem rather than the "cheaper" problem: most of the history being replaced was originally in a cache-hit state with a very low unit price, whereas after compression the summary itself is newly added output, and the entire prefix after the rewritten position is invalidated and must be recomputed at the original price.

Unverified50%
Nov 5

Common approaches to context compaction include sliding-window truncation of old messages, summarizing history with an LLM, and discarding segments by importance, and these methods introduce irreversible information loss.

Unverified50%
Nov 5

The goal of agent context compression is to distill history into a structured summary, emphasizing task continuity and often adopting a structured format with fixed slots.

Unverified50%
Nov 5

This weakening effect persists across different model families and compression architectures and is not a problem of individual implementations.

Unverified50%
Nov 5

Encoder-based context compression systematically weakens refusal behavior in instruction-tuned language models, despite high reconstruction fidelity.

Unverified50%

40 more timeline events

All Facts (20)

Verified

Common context pruning strategies include sliding window (retaining the most recent N messages), summary compression (summarizing old messages into a summary), and importance filtering (prioritizing the retention of tool call results).

90%
Verified

Context compression refers to summarizing or trimming historical conversations and tool outputs in long multi-turn tasks to fit within the model's context window limit

75%
Verified

Compaction refers to the framework automatically condensing earlier conversations into summaries or removing redundant content to free up space when session messages exceed the model's context window limit.

75%
Verified

Context compaction is a class of techniques that distill existing conversation history into a more concise representation, typically by having the model generate a summary of earlier content to replace the original message list.

75%
Verified

When conversation history exceeds the context window limit, platforms use engineering methods such as truncation and summary compression to trim the context, a process that inevitably loses detail information.

75%
Verified

In multi-step tasks, an Agent loses context, which is fundamentally a state management problem, because information relies on the context window's memory, and key information is easily buried or truncated as the number of conversation turns increases.

65%
Verified

Context compaction is a technical mechanism designed to retain key information within a limited context window.

65%
Unverified

Context window compression is the process by which a summarizer compresses older content into a summary and stuffs it back into the window, which is essentially lossy compression where details may be lost in the process.

60%
Unverified

Common strategies for handling context overflow include rolling truncation (discarding the earliest conversation records) and summary compression (replacing full history with a brief summary).

60%
Unverified

When the context window is nearly full, context compression is performed by discarding irrelevant information or generating summaries, in order to control token costs and keep the model's attention focused.

60%
Unverified

Existing context compression schemes typically retain condensed conclusions and discard early observations, but the discarded evidence may become critical again in later steps.

50%
Unverified

In long-horizon agent tasks, interaction trajectories often far exceed the model's context window, making context compression a hard problem.

50%
Unverified

Commonly used context management methods in the industry include context compression, on-demand retrieval and session isolation.

50%
Unverified

The essential difference between micro-sessions and context compression is that compression performs lossy summarization of history within the same session, whereas micro-sessions actively end the session and hand over via structured state.

50%
Unverified

In practice, micro-sessions can be used as execution units, combined with a state graph engine to manage state between sessions and supplemented by context compression to reduce pressure within a single session; these approaches are not mutually exclusive.

50%
Unverified

Context compression solves the "doesn't fit" problem rather than the "cheaper" problem: most of the history being replaced was originally in a cache-hit state with a very low unit price, whereas after compression the summary itself is newly added output, and the entire prefix after the rewritten position is invalidated and must be recomputed at the original price.

50%
Unverified

Common approaches to context compaction include sliding-window truncation of old messages, summarizing history with an LLM, and discarding segments by importance, and these methods introduce irreversible information loss.

50%
Unverified

The goal of agent context compression is to distill history into a structured summary, emphasizing task continuity and often adopting a structured format with fixed slots.

50%
Unverified

Encoder-based context compression systematically weakens refusal behavior in instruction-tuned language models, despite high reconstruction fidelity.

50%
Unverified

This weakening effect persists across different model families and compression architectures and is not a problem of individual implementations.

50%

Source Articles