找context engineering的资料
回复 群友 9507: context engineering 的资料挺多了,我按"想解决什么问题"分一下,你挑着看: 1)中文、最省事的入口 Joye 那篇《Agent 工程师入门指南》里 5.1 就是讲上下文工程的,给了几个具体技巧:结构化 prompt、关键信息放头尾(Lost in the Middle 现象)、历史摘要替代明文、prefix cache 友好的排布。5.9 讲多 Agent 时也有个很实用的结论:上下文塞不下时,先把力气花在压缩和上下文工程上,别急着拆 subagent。链接:https://www.joyehuang.me/blog/20260517---agentonboardingguide/post 另外面试复盘那篇 3.1「你设计过上下文工程吗」是反着讲的,说"做了上下文管理"写在简历上等于废话,得写出几层上下文、什么时候触发摘要/长期记忆、怎么处理噪音、怎么做 prefix cache 友好。被问简历的时候很有用。 2)一手权威,真值得精读的 Anthropic 那篇 Effective context engineering for AI agents:https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents 这篇的核心几个概念建议记住:context rot(token 越多,准确召回越差,这是 attention budget 有限的必然)、system prompt 要落在"right altitude"(别写死 if-else,也别太虚)、just-in-time 检索(只存文件路径/查询/链接,用到再取,Claude Code 那种做法)、以及长任务的三个手段:compaction(摘要后重开窗口)、structured note-taking(NOTES.md 这类外置记忆)、sub-agent(各自探索、只回传一两千 token 的浓缩结果)。 3)偏工程手册、能直接抄的 Sourcegraph 的 Context Engineering: A Practical Guide for AI Agents(2026,讲四支柱和跟 prompt engineering 的区别):https://sourcegraph.com/blog/context-engineering PromptingGuide 的 Context Engineering Guide,带可下载模板和 prompt:https://www.promptingguide.ai/guides/context-engineering-guide 4)群里刚聊到的 smart zone / dumb zone 这个说法源头是 Dex Horthy 在 The Pragmatic Engineer 播客里讲的,意思是上下文不是平的,前段注意力锐利(smart),超阈值后开始降智(dumb)。文字版可以看 https://garrit.xyz/posts/2026-05-06-dont-trust-large-context-windows 和 https://daily.dev/posts/what-is-the-dumb-zone--zlsk071dj 5)理论底座 Lost in the Middle(模型对上下文开头结尾注意力更强,中间容易被忽略):https://arxiv.org/abs/2307.03172。讲"为什么会长了就降智"基本都绕不开这篇。 6)中文长文补充 AWS 中国的 Agentic AI 基础设施实践系列(九)就是 Context Engineering,结合 Bedrock AgentCore 和 Strands Agents 讲,有中文场景和代码:https://aws.amazon.com/cn/blogs/china/agentic-ai-infrastructure-practice-series-nine-context-engineering/ 7)想要社区讨论 Reddit 有个 r/ContextEngineering 版块,里面有人整理过学习资源清单帖,搜 "best learning resources" 能翻到。 最后一句实话:这类资料读三篇和读十篇差别不大,剩下的手感得靠 trace。拿你自己某次跑长了的任务记录,试着压一遍,看哪些信息压完就丢了、哪些根本不用留,比继续收藏文章有用得多。