While modern LLMs boast massive context windows, such as one million tokens, effective working memory is significantly smaller. As input size increases, model performance often degrades due to three primary technical phenomena. First, the quadratic scaling of attention mechanisms means computational cost grows with the square of the input; while KV caching accelerates processing, it does not improve quality. Second, the "softmax bottleneck" forces attention weights to always sum to one, meaning adding more context dilutes the model's focus across more tokens. Third, the "Lost in the Middle" phenomenon, identified by Liu et al., demonstrates that accuracy drops significantly when relevant information is placed in the middle of a long prompt, whereas performance remains high at the beginning and end. Additionally, "distractor" data—such as conflicting versions of documentation—further confuses the model as input length grows. To mitigate these issues, developers should prioritize high-quality retrieval by sending fewer, more relevant chunks (e.g., 3–5 instead of 50), utilize the "edges" of the prompt by repeating instructions at the bottom, and implement multi-step workflows using summaries rather than full conversation transcripts to maintain a lean, high-signal context.

Read original