PrepGenAICerts

Context Rot and Context Drift

Advanced

Manage the context window as a shared, finite budget · Difficulty 2/5

0%
context-rotcontext-driftagent-sessionsquality-degradation

Explanation

Context Rot

Models suffer **Context Rot**: attention degrades as the window fills with irrelevant or stale content, even when there is technically still room left in the window. The problem is not running out of space -- it's that low-signal tokens crowd out the high-signal ones the model needs to attend to.

Context Drift

Context drift is when the model gradually loses track of instructions or facts over a long interaction. The telltale symptom: a long agent session starts ignoring earlier instructions and quality drops, even though nothing about the task changed.

Countering It

Compaction, pruning, isolation, and re-stating key constraints counter drift -- they are the active techniques that keep a long session's context high-signal instead of letting it decay.

Common exam traps

  • Reaching for "raise temperature" or "add more prohibitions" when a session starts ignoring earlier instructions. The actual fix is compacting older turns into a summary and pruning stale tool output -- temperature and prohibition count don't address a full, low-signal context window.

Key Takeaways

  • Context rot is attention degradation from irrelevant/stale content filling the window, not from running out of room
  • Context drift is the gradual loss of track of instructions or facts over a long interaction
  • Compaction, pruning, isolation, and re-stating key constraints counter drift
  • Raising temperature or adding more prohibitions does not fix context rot or context drift

Glossary Terms

Related Concepts

PrepGenAICerts.com is an independent third-party exam-prep platform for the Claude Certified Architect (CCA-F) certification. We are not affiliated with, endorsed by, or acting on behalf of Anthropic PBC.

Note: New premium upgrades are temporarily paused while we resolve an issue with our payment provider. Existing premium members retain full access.