# Perplexity — Context compaction in AI: how it works and what to do

- Company: Perplexity (perplexity.ai)
- Announced: 2026-11-25
- Category: not stated
- Coverage: not counted
- Announcement: no
- Group: routine
- Source: https://www.perplexity.ai/hub/blog/context-compaction
- Record: https://forck.live/items/41293-context-compaction-in-ai-how-it-works-and-what-to-do
- Subject: Perplexity

Perplexity's guide explains context compaction, the practice of summarizing older parts of a long conversation so an AI model receives the summary instead of the full text. Compaction frees room once a long session approaches the context window's limit, and it also keeps replies faster and more accurate, since the model rereads the whole context for every response. A long context can make answers less accurate, an effect called context rot, so compaction can help even before the window is full. Tools trigger it at a threshold below the limit, measured by token count, by share of the window or by number of exchanges. Some material is kept word for word, such as the original request and the agent's standing instructions, because summarizing them might make the agent stop obeying them partway through a task. After compaction the AI may mistake the summary for a finished task, so tools add the state of to-do lists or a direct instruction to keep working.

## Evidence

Verbatim from https://www.perplexity.ai/hub/blog/context-compaction:

> Context compaction is when an AI tool summarizes the older part of a long conversation, then sends the AI model that summary instead of the full text. Recent messages often stay word for word. The model then carries on from the summary and those recent messages.
> 
> Compaction is necessary because the model itself doesn't store the conversation. Each time someone sends a message, the AI tool passes the model everything it needs to respond: instructions, earlier messages, uploaded files, and search results. That material is the model's context.
> 
> A model can only take in so much context at one time. That limit is called the context window . It's measured in tokens, the small chunks of text a model reads. A token can be a word, part of a word, or a punctuation mark. In English, 1 token is about 4 characters of text .
> 
> Compaction does two jobs. The first is making room. Every message, pasted document, and web page in a conversation adds tokens. A long research session with several pasted reports could quickly pass the context window's limit. Compaction frees up space so the conversation can continue after that point.
> 
> The second job is to keep its answers fast and accurate.

---

Record: https://forck.live/items/41293-context-compaction-in-ai-how-it-works-and-what-to-do
Catalogue: https://forck.live/llms.txt
Current issue: https://forck.live/feed.md
