📄【转译】Context Engineering vs Prompt Engineering,理解Context Engineering
2025-7-6
| 2025-7-6
字数 1496阅读时长 4 分钟
password
Created time
Jul 6, 2025 09:41 AM
type
status
date
slug
summary
tags
category
icon
💡
Context Engineering最近因为aj变的很火,那他是什么,与prompt什么关系呢?有一个视频做了很好的解释,最核心的一点是“ Prompt Engineering 是Context Engineering的一部分,如果 Prompt Engineering 正在编写一个出色的指令......上下文工程决定该指令之前和之后会发生什么——记住什么,从内存或工具中提取什么,整个事情是如何构建的。”,具体如下:
 
原文作者:Mehul Gupta
YouTubeYouTubeContext Engineering vs Prompt Engineering
Context Engineering 包含了prompt的设计,它是面向的大模型对话交互的设计框架考量。
notion image
Prompt Engineering focuses on what to say to the model at a moment in time.
Context Engineering focuses on what the model knows when you say it — and why it should care. If Prompt Engineering is writing a brilliant instruction…Context Engineering is deciding what happens before and after that instruction — what’s remembered, what’s pulled from memory or tools, how the whole thing’s framed.
如果 Prompt Engineering 正在编写一个出色的指令......上下文工程决定该指令之前和之后会发生什么——记住什么,从内存或工具中提取什么,整个事情是如何构建的。
notion image
notion image
notion image
Bad Prompt Engineering:  糟糕的提示工程:
  • Output tone is wrong 输出错误
  • Instructions get ignored 指令被忽略
  • Model acts like it’s drunk 模特表现得像傻子一样
  • You spend hours tweaking commas and synonyms 您花费数小时调整逗号和同义词
Bad Context Engineering:  不良环境工程:
  • Model forgets why it’s even in the conversation 模型甚至忘记了为什么它出现在对话中
  • Prompt gets drowned in noise 提示词被噪音淹没
  • Output is generic, unhinged, or misleading 输出是通用的、不合理的或具有误导性的
  • RAG breaks, memory leaks, tool chaining fails RAG 中断、内存泄漏、工具链接失败
notion image
  • Protects your prompt. You can write the best instruction ever, but if it’s lost at token 12,000 behind three FAQs and a JSON blob, it won’t matter.
    • 保护您的提示。 您可以编写有史以来最好的指令,但如果它在三个常见问题解答和一个 JSON blob 后面丢失了 12,000 个令牌,那也没关系。
  • Structures everything around the prompt. Memory, retrieval, system prompt — all exist to support the prompt’s clarity and priority.
    • 围绕提示符构建所有内容。 内存、检索、系统提示符 — 所有这些都是为了支持提示的清晰度和优先级。
  • Handles scale. You don’t need to keep engineering prompts for every variation. You inject structured context that adapts to different users/tasks.
    • 处理缩放。 您无需为每个变体保留工程提示。您注入适应不同用户 / 任务的结构化上下文。
  • Manages constraints. Token limits? Latency? Costs? Context Engineering decides what gets dropped and what stays.
    • 管理约束。 令牌限制?延迟?成本?上下文工程决定丢弃哪些内容,保留哪些内容。
notion image
  • Mindset: Prompt Engineering is about crafting clear instructions; Context Engineering is about designing the entire flow and architecture of a model’s thought process.
    • 心态:Prompt Engineering 是关于制定明确的指令;上下文工程是关于设计模型思维过程的整个流程和架构。
  • Scope: Prompt Engineering operates within a single input-output pair; Context Engineering handles everything the model sees — memory, history, tools, system prompts.
    • 范围:Prompt Engineering 在单个输入-输出对中运行;上下文工程处理模型看到的所有内容 — 内存、历史记录、工具、系统提示。
  • Repeatability: Prompt Engineering can be hit-or-miss and often needs manual tweaks; Context Engineering is designed for consistency and reuse across many users and tasks.
    • 重复性:Prompt Engineering 可能是偶然的,通常需要手动调整;上下文工程旨在实现许多用户和任务之间的一致性和重用性。
  • Scalability: Prompt Engineering starts to fall apart when scaled — more users = more edge cases; Context Engineering is built with scale in mind from the beginning.
    • 可扩展性:Prompt Engineering 在扩展时开始分崩离析 — 更多的用户 = 更多的边缘情况;环境工程从一开始就考虑到了规模。
  • Precision: Prompt Engineering relies heavily on wordsmithing to get things “just right”; Context Engineering focuses on delivering the right inputs at the right time, reducing the burden on the prompt itself.
    • 精度:Prompt Engineering 在很大程度上依赖于文字加工来使事情变得“恰到好处”;上下文工程专注于在正确的时间提供正确的输入 ,从而减轻提示本身的负担。
  • Debugging: Prompt Engineering debugging is mostly rewording and guessing what went wrong; Context Engineering debugging involves inspecting the full context window, memory slots, and token flow.
    • 调试:Prompt Engineering 调试主要是改写和猜测出了什么问题;上下文工程调试涉及检查完整的上下文窗口、内存插槽和令牌流。
  • Tools Involved: Prompt Engineering can be done with nothing but ChatGPT or a prompt box; Context Engineering needs memory modules, RAG systems, API chaining, and more backend coordination.
    • 涉及的工具: 提示工程只能用 ChatGPT 或提示框来完成;上下文工程需要内存模块、RAG 系统、API 链接和更多的后端协调。
  • Risk of Failure: When Prompt Engineering fails, the output is weird or off-topic; when Context Engineering fails, the entire system might behave unpredictably — including forgetting goals or misusing tools.
    • 故障风险: 当 Prompt Engineering 失败时,输出很奇怪或偏离主题;当情境工程失败时,整个系统的行为可能会不可预测,包括忘记目标或滥用工具。
  • Longevity: Prompt Engineering is great for short tasks or bursts of creativity; Context Engineering supports long-running workflows and conversations with complex state.
    • 长寿:Prompt Engineering 非常适合短期任务或创造力的爆发;上下文工程支持长时间运行的工作流和具有复杂状态的对话。
  • Effort Type: Prompt Engineering is like creative writing or copy-tweaking; Context Engineering is closer to systems design or software architecture for LLMs.
    • 努力类型:Prompt Engineering 就像创意写作或文案调整;上下文工程更接近于 LLM 的系统设计或软件架构。
notion image
 
 
 
  • AI应用
  • LLM
  • prompt
  • AI时代,小朋友最重要的能力是什么?AI不是你的敌人,而是需要被管理的“合伙人”:斯坦福万字报告深度解
    Loading...
    目录