返回首页

对比阅读

对比阅读:Curing AI Coding Amnesia: Context Engineering Replaces Prompting as Production Key 与 AI编程助手健忘症有解,上下文工程正取代提示词成为落地关键

AEN
CursorTongyi LingmaContext Engineering·

Curing AI Coding Amnesia: Context Engineering Replaces Prompting as Production Key

Repeatedly explaining the tech stack can quadruple the number of modifications per chat session with AI coding assistants—we note that context engineering, which fills the "amnesia" gap of large models, is becoming more decisive for AI output quality than prompt engineering.

What this is

Current mainstream large models have a fundamental design flaw: the context window (the maximum token range a large model can process in a single conversation) is limited, and memory resets instantly when the chat window closes. Developers must re-explain tech stacks and specifications to the AI every time, reduced to "manual context managers." To solve this, the industry introduced context engineering (systematically assembling the information AI needs to complete tasks). Unlike prompt engineering (teaching you how to ask well), its core is ensuring the AI "knows enough." Current implementations divide into three tiers: The first tier is project rule files (like documents in the .cursor/rules/ directory), hardcoding the tech stack to travel with the code; the second tier is global rules, defining personal communication preferences and code aesthetics; the third tier is implicit memory, where tools automatically capture your usage habits and pitfall logs in the background for on-demand retrieval.

Industry view

We believe the rising emphasis on context engineering marks a substantive shift in AI applications from "single-turn Q&A" to "continuous collaboration." The quality of AI-generated results is directly correlated with the quality of context it receives; without a memory system, every task is an expensive cold start. However, this is not without controversy and risks. On one hand, implicit memory poses clear privacy concerns—tools automatically capturing browser tabs and file operations at the system level creates extremely blurry data boundaries; on the other hand, the maintenance cost of explicit rule files cannot be ignored. If the project iterates but the rule files aren't updated in sync, outdated context will instead mislead the AI into generating even more outrageous hallucinations. The industry is still exploring the balance point between explicit presets and implicit capture.

Impact on regular people

For enterprise IT: The focus of AI deployment will shift from merely competing on model parameters to building internal knowledge bases and rule standards, ensuring AI can automatically read company-level context.

For the individual workplace: Translating implicit experience into AI-readable rule documents will become a core skill; employees who "know how to write memos" can direct AI more efficiently.

For the consumer market: AI tools will universally embed memory assistant features. "Whether preferences are remembered across sessions" will become a more intuitive metric than benchmark scores when users select tools.

来源: juejin.cn
BZH
Cursor通义灵码上下文工程·

AI编程助手健忘症有解,上下文工程正取代提示词成为落地关键

重复交代技术栈能让AI编程助手单次对话修改次数翻4倍——我们注意到,填补大模型“健忘”缺口的上下文工程,正变得比提示词更决定AI的产出质量。

这是什么

当前主流大模型存在设计上的硬伤:上下文窗口(大模型单次对话能处理的最大字数范围)有限,关掉聊天窗口,记忆即刻清零。开发者每次都要重新向AI解释技术栈和规范,沦为“人肉上下文管理器”。为解决此问题,业内提出了上下文工程(系统性地组装AI完成任务所需的信息),它与提示词工程(教你怎么问得好)不同,核心是确保AI“知道得够”。目前落地分三个层级:第一层是项目规则文件(如.cursor/rules/目录下的文档),把技术栈写死随代码走;第二层是全局规则,定义个人的沟通偏好和代码审美;第三层是隐式记忆,工具在后台自动捕获你的操作习惯和踩坑记录,按需检索。

行业怎么看

我们认为,上下文工程的受重视程度上升,标志着AI应用从“单轮问答”向“连续协作”的实质转移。AI生成结果的质量与它拿到的上下文质量直接正相关,没有记忆系统,每次工作都是昂贵的冷启动。但这并非没有争议和风险。一方面,隐式记忆存在明显的隐私隐患——工具在系统层自动捕获浏览器标签和文件操作,数据边界极其模糊;另一方面,显式规则文件的维护成本不可忽视,若项目迭代但规则文件未同步更新,过时的上下文反而会误导AI产生更离谱的幻觉。行业目前仍在摸索显式预设与隐式捕获的平衡点。

对普通人的影响

对企业IT:AI部署的重心将从单纯比拼模型参数,转向建设内部知识库与规则标准,确保AI能自动读取公司级上下文。

对个人职场:把隐性经验转化为AI可读的规则文档将成为核心技能,“会写备忘录”的员工能更高效地指挥AI。

对消费市场:AI工具将普遍内嵌记忆助理功能,“是否跨会话记住偏好”会成为用户选型时比跑分更直观的指标。

来源: juejin.cn