上下文窗口在欺骗你:如何真正使用128K标记

📄 中文摘要

许多模型都在宣传其上下文窗口的大小,如128K标记或200K标记,声称可以处理整个代码库。然而,在实际应用中,使用Claude模型分析一个包含80K标记的Node.js项目时,发现模型只关注了一个不相关的错误,而忽略了真正的问题。这表明,尽管上下文窗口很大,模型并不会均等地关注所有信息。研究显示,LLM在处理信息时更倾向于关注上下文的开头和结尾部分,而中间部分的关注度则显著降低。这种现象在实际应用中可能导致重要信息被忽视,从而影响问题的解决效率。

📄 English Summary

Context Windows Are Lying to You: How to Actually Use 128K Tokens

Many models boast about their context window sizes, such as 128K tokens or 200K tokens, claiming that users can input entire codebases. However, practical experience with the Claude model on an 80K token Node.js project revealed that it identified a bug in an irrelevant file while ignoring the actual issue in the specified file. This indicates that large context windows do not guarantee equal attention across all information. Research has shown that LLMs tend to focus more on the beginning and end of the context, with significantly reduced attention to the middle. This phenomenon can lead to critical information being overlooked, ultimately affecting the efficiency of problem-solving.

Powered by Cloudflare Workers + Payload CMS + Claude 3.5

数据源: OpenAI, Google AI, DeepMind, AWS ML Blog, HuggingFace 等