做产品 PMaker
空格的键盘
系统提示 项目约束 中间:历史对话、读过的文件、工具输出 越长,这一段越容易被忽略 最新一条 你刚说的话 一次请求,模型能看到的全部内容 注意力 开头记得牢 中间最容易丢 结尾最新鲜

上下文窗口不是均匀的。开头和结尾被看得最清楚,中间那一段随着长度增加会逐渐失焦。

What Context Actually Is

Context is everything the model can see within a single request. It has a ceiling, and seeing it doesn't mean using it.

What you'll run into
  • 聊到第三十轮,它开始忘记前面定好的规则
  • 把整个项目丢给它之后,回答反而变含糊了
  • 新开一个会话,昨天讲清楚的事要从头再讲一遍

What it contains

组成说明
系统提示与项目规则工具自带的指令,加上你项目里的约束文件
历史对话这一轮会话里说过的每一句,包括它自己的回复
读过的文件它打开过的代码、文档。一个大文件能吃掉很大一块
工具输出搜索结果、命令行输出、报错信息。这部分最容易失控
你最新说的话本轮的指令
The first one has the most leverage. Writing settled decisions into a file gives the model a kind of memory that doesn't blur as the conversation grows long.

There's another trap to watch for: it doesn't carry over across sessions automatically. When today's session ends, yesterday's judgments are gone—unless they were written into a file in the project.

It degrades as it gets longer

Intuitively, more information is better. In practice, no. As context grows longer, reasoning accuracy gradually declines. The decay is gradual, not a sudden cliff, so it's hard to notice.

窗口大,不等于这一百万都被有效利用 真正被用上的 读了用不上的文件 · 贴了一大段无关日志 · 上个话题的全部历史 这些不是「多点信息没坏处」,它们在挤占注意力 而且准确率是渐进下滑的,不会突然崩掉,所以很难察觉 上下文由这五块拼成 系统提示与规则 历史对话 读过的文件 工具输出 你最新说的话 「工具输出」这块最容易失控——搜索结果、命令行输出、几百行报错,一下就把窗口撑满了。 还有一条容易踩的:跨会话不会自动延续。 今天的会话结束,昨天的判断就不在了——除非它被写进了项目里的文件。
The first one has the most leverage. Writing settled decisions into a file gives the model a kind of memory that doesn't blur as the conversation grows long.

Four responses

动作做什么具体手段
写出去 把结论存到上下文之外 规格文件、约束文件、进度记录。不让它反复推导已经定过的事
挑着给 只给这一步真正需要的 指名要改哪个文件,别让它自己翻遍整个仓库
压缩 长内容先摘要再进上下文 大段日志先提取关键行;长对话阶段性总结一次
隔离 不同任务分开跑 一个任务一个会话,别让上一件事的噪音污染下一件
The first one has the most leverage. Writing settled decisions into a file gives the model a kind of memory that doesn't blur as the conversation grows long.

There's also one related to code organization: splitting directories by feature suits AI collaboration better than splitting by technical layer. For a login-related change, the former only needs the auth directory; the latter has to read a few files from each layer to assemble the full picture.