Back to list
Lv.2

Context Rot

Context Rot

A phenomenon where an AI's accuracy degrades as a conversation grows longer, causing it to forget earlier instructions.

In Simple Terms

Context rot is what happens when the conversation or text you feed an AI gets longer, causing its accuracy at following instructions and the quality of its answers to drop. It's a common headache in AI system and app development. As the conversation history grows longer, it causes the AI to ignore earlier instructions or produce irrelevant output. Developers need to guard against it especially when analyzing long documents or running chatbots over extended sessions.

Behind the Name

This name comes from two English words: "context", meaning the background information a system is working with, and "rot", meaning to decay or break down. As an AI holds onto more and more context, its grip on that information seems to decay – kind of like food rotting over time – which is exactly the image this term is going for.

Take a Closer Look!

Context rot refers to a drop in an AI model's accuracy and its ability to follow instructions that happens as the amount of text fed into it at once, or the length of an ongoing conversation, grows larger.
Even as the maximum amount of information an AI can take in keeps expanding, having more information to process can make its focus spread thin internally, making it harder to give accurate answers.

The main cause is the strain placed on the AI's ability to search through and connect the important pieces within a huge volume of text.
Instructions given near the beginning or middle of a long passage can get buried under all the surrounding text, causing the AI to forget or ignore them.
Roughly speaking, it's a bit like a person trying to answer questions about a thick book after reading it all in one sitting – the details from partway through tend to slip away.

To guard against context rot, developers regularly summarize conversation history or extract only the necessary information before passing it to the AI.
Researchers are also exploring ways to structure prompts so they're easier for AI to process, such as repositioning key instructions near the end of the text.
When building AI applications that need to handle long text, designing around this phenomenon has become essential.