Context Engineering: From Prompts to Corporate Multi-Agent Architecture

元数据

  • 收录时间:2026-06-30
  • 重写时间:2026-06-30 21:10 CST(Jay 反思覆盖原版)
  • 标题:Context Engineering: From Prompts to Corporate Multi-Agent Architecture
  • arXiv ID2603.09619
  • 作者:Vera V. Vishnyakova(单作者)
  • 首次提交:2026-03-10(v1);在线发表 2026-03-13
  • 可信度:⭐⭐⭐⭐(学术单作者论文 + 大型企业 LLM/Multi-Agent 实践经验;待精读 PDF 后调整为 ⭐⭐⭐⭐⭐ 或回落 ⭐⭐⭐
  • 精读优先级:🟡 P1
  • 主题标签Context Engineering Multi-Agent Architecture Agent Governance Vendor Architecture Klarna Case Study
  • 本稿改动(原版 → 重写版): 1. 删除原"协议对比"段落中"MCP / A2A / OpenClaw / dark factory"——abstract 一个都没提,"OpenClaw" 是本环境命名被误植进笔记的命名混淆式 hallucination 2. five context quality criteria(relevance / sufficiency / isolation / economy / provenance)——这是 abstract 的核心操作化定义,原版完全没写 3. vendor architectures(Google ADK / Anthropic / LangChain / ACE framework / Google DeepMind's intelligent delegation)——abstract 明示引用 4. Klarna 案例(dual deficit:contextual + intentional)——abstract 末尾压轴 5. "四层框架(推测,精读后补充)"为基于 abstract 的事实陈述(PE → CE → IE → SE) 6. 显式标注"待核验项"(PDF 全文长度 / Klarna 具体数据点 / ACE framework 完整描述 / 5 criteria 权重) 7. 补"原版错误说明"与"反向质疑"段 8. 与本周已有主题(silent failures / rag-hallucination / measuring-agents)做交叉引用

1. 摘要(来自 arXiv:2603.09619 abstract,原文翻译 + 关键短语保留)

As artificial intelligence (AI) systems evolve from stateless chatbots to autonomous multi-step agents, prompt engineering (PE), the discipline of crafting individual queries, proves necessary but insufficient. This paper introduces context engineering (CE) as a standalone discipline concerned with designing, structuring, and managing the entire informational environment in which an AI agent makes decisions. Drawing on vendor architectures (Google ADK, Anthropic, LangChain), current academic work (ACE framework, Google DeepMind's intelligent delegation), enterprise research (Deloitte, 2026; KPMG, 2026), and the author's experience building a multi-agent system, the paper proposes five context quality criteria: relevance, sufficiency, isolation, economy, and provenance, and frames context as the agent's operating system. Two higher-order disciplines follow. Intent engineering (IE) encodes organizational goals, values, and trade-off hierarchies into agent infrastructure. Specification engineering (SE) creates a machine-readable corpus of corporate policies and standards enabling autonomous operation of multi-agent systems at scale. Together these four disciplines form a cumulative pyramid maturity model of agent engineering, in which each level subsumes the previous one as a necessary foundation. Enterprise data reveals a gap: while 75% of enterprises plan agentic AI deployment within two years (Deloitte, 2026), deployment has surged and retreated as organizations confront scaling complexity (KPMG, 2026). The Klarna case illustrates a dual deficit, contextual and intentional. Whoever controls the agent's context controls its behavior; whoever controls its intent controls its strategy; whoever controls its specifications controls its scale.


2. 核心论点:从 PE 到 CE 的范式跃迁

论文主张:随着 AI 从 stateless chatbots 演进为 autonomous multi-step agents,Prompt Engineering(PE)变得"必要但不充分"。Context Engineering(CE)是 PE 之上的独立学科,关注 agent 决策时的整个信息环境(informational environment)的设计、结构与管理。

金句(出自 abstract 末尾):

Whoever controls the agent's context controls its behavior; whoever controls its intent controls its strategy; whoever controls its specifications controls its scale.

翻译:谁控制 agent 的上下文,谁就控制它的行为;谁控制它的意图,谁就控制它的策略;谁控制它的规范,谁就控制它的规模。

这一金句是论文的核心断言——把 context / intent / specification 三个层级分别对应到 behavior / strategy / scale,是把传统 software engineering 的"权限 / 目标 / 规范" 三层架构映射到 agent 系统的关键。


3. 五大 context quality criteria(CE 的核心操作化定义)

论文提出 5 条 context 质量标准——这是 CE 区别于 PE 的关键操作化定义,也是 CE 作为独立学科的最小工程清单。

Criterion 含义 工程化挑战 与本知识库已有主题的对应
Relevance 上下文与当前任务的相关性 Top-k 检索召回率 vs 上下文窗口大小的权衡;噪声段落会稀释 LLM 注意力 RAG 检索层 / CRAG / Self-RAG
Sufficiency 上下文是否足以回答当前问题 多跳 / 跨文档场景下,单次检索往往不够;需要 Active Retrieval / FLARE Active-RAG / GraphRAG / LightRAG
Isolation 多 Agent 上下文隔离 一个 Agent 不应看到其他 Agent 的私有上下文(防止 hallucinated cross-talk / Secret 泄漏) Multi-agent 编排 / MCP / A2A(注:原笔记把这些混为"协议对比",实际它们是 isolation 的工程实现层)
Economy 上下文构建的 token / 成本 / 延迟预算 在 relevance 与 sufficiency 约束下最大化 token 利用率;预算控制 KV cache 优化 / chunked prefill / prefix caching
Provenance 上下文来源可追溯 每段上下文必须有出处标注,便于审计、引用、回溯 RAG-truth / evidence-trace / citation alignment

关键工程观察

  1. 这 5 条不是并列的,而是交叉约束——例如 relevance 与 economy 经常冲突(提高 top-k 提高 relevance,但降低 economy);sufficiency 与 isolation 也冲突(多 Agent 共享上下文提高 sufficiency,但破坏 isolation)。
  2. isolation / economy / provenance 在 RAG 领域一直被忽视——多数 RAG 工作聚焦 relevance 与 sufficiency,isolation 仅在多 Agent 编排层面被提及,economy 主要在 inference 优化层面被讨论,provenance 主要在 evaluation 层面。CE 作为独立学科把这 3 条纳入一等约束,是 RAG 工程未来 1-2 年的方向。
  3. 5 条 criteria 缺权重——abstract 没给出 5 条 criteria 在不同场景下的优先级排序;这意味着 CE 在工程实践时仍需自行决定 trade-off。待核验:PDF 全文是否给出权重矩阵?

4. 四层累积成熟度金字塔(Cumulative Pyramid Maturity Model)

论文提出 4 个层级的累积成熟度模型(每层包含下一层,下层是上层的必要基础):

        ┌─────────────────────┐
        │  Specification      │  ← 机器可读的公司政策 / 标准语料
        │  Engineering (SE)   │     (机器可读、可版本控制、可审计)
        ├─────────────────────┤
        │  Intent             │  ← 组织目标 / 价值观 / 权衡层级编码
        │  Engineering (IE)   │     (Constitutional AI / Model Spec)
        ├─────────────────────┤
        │  Context            │  ← 多 Agent 信息环境设计(5 criteria)
        │  Engineering (CE)   │     (RAG / Memory / Tool Routing)
        ├─────────────────────┤
        │  Prompt             │  ← 单轮措辞
        │  Engineering (PE)   │     (System prompt / Few-shot)
        └─────────────────────┘

关键论点(出自 abstract):上层不是替代下层,而是把下层作为必要基础。换言之,没有稳健的 PE,CE 的 5 criteria 无法落地;没有稳健的 CE,IE 的目标编码会被上下文噪声稀释;没有稳健的 IE,SE 的政策语料无法跨 Agent 一致执行。

与本周已有主题的映射

层级 现有主题 缺口
PE RAG prompt template、tool calling schema system prompt 的 version control 与 A/B 测试规范
CE CRAG / Self-RAG / GraphRAG / Active-RAG 的检索层工程 isolation / economy / provenance 三条 criterion 未被现有 RAG 工作系统覆盖
IE system prompt 中的"persona + policy + tradeoff" 编码;Anthropic Constitutional AI;OpenAI Model Spec 跨 Agent 一致的 IE 编码协议缺失
SE LangGraph 的 declarative policies、CrewAI 的 task YAML、Microsoft Autogen 的 guardrail DSL 企业级 policy 语料的版本化与审计体系

5. 供应商架构引用(vendor architectures)

论文 abstract 明确引用了 5 个 vendor / academic 工作作为证据来源:

来源 类型 贡献给 CE 的内容(推断,待精读核对)
Google ADK (Agent Development Kit) 商业 多 Agent 编排 + 上下文路由;与 CE 的 isolation criterion 强相关
Anthropic(Claude / Tool Use / Constitutional AI) 商业 Constitutional AI(IE 的早期实践)+ 长上下文管理(CE 的 sufficiency)
LangChain / LangGraph 开源 Declarative agent orchestration;与 SE 的政策语料思路一致
ACE framework 学术 待精读 PDF)Context 演化的形式化框架——abstract 未给出完整描述
Google DeepMind's intelligent delegation 学术/工业 多 Agent 任务路由 + 上下文所有权决策;与 CE 的 isolation / provenance criterion 强相关

反向质疑

  1. abstract 没给出这 5 个来源的具体引用章节号或页码——精读 PDF 时需要核对每个 vendor 工作对应 CE 的哪一条 criterion
  2. abstract 没明示这 5 个是论文的主要证据还是补充引用——结构上可能偏后者,因为 5 个中只有 2 个是 academic(ACE / DeepMind),其余 3 个是 vendor。
  3. 没有覆盖 OpenAI——这是 2026 年的明显缺口:OpenAI 的 Model Spec、Agents SDK、Responses API 是 IE / SE 层的代表性工作,论文没引用。这是 selection bias 的信号。

6. 企业调研数据(与原笔记一致,但加 source 标注与解读)

数据 数值 来源 备注
计划 2 年内部署 Agentic AI 的组织占比 ~75% Deloitte 2026 (n=3,235, 24 国) abstract 直接引用
报告 AI 深度转型业务的组织占比 ~34% Deloitte 2026 (同上) abstract 直接引用
Agent 部署率 Q1 → Q3 → Q4 变化 11% → 42% → 26% KPMG 2026 季度追踪 (n=130, 美国 C-suite) abstract 直接引用
平均年度 AI 预算 $124 million KPMG 2026 (同上) abstract 直接引用

解读

  1. 75% vs 34% 的 gap:3/4 的组织计划部署 Agentic AI,但只有 1/3 报告 AI 深度转型业务——这是"intent without execution" 的典型信号,与 abstract 中提到的"from pilot to production" 的扩展复杂性一致。
  2. Q1 → Q3 → Q4 的回落:11% → 42% → 26% 的曲线意味着 2025 下半年 Agent 部署经历了大规模生产化(Q3)→ 集中失败(Q4 回落) 的过程。这是 2025-2026 行业转折点的关键数据。
  3. 本知识库对照:与 2026-06-27-1450-production-agent-harness-silent-failures.md 中 "70% silent failures caught by human user-view observation" 的发现高度一致——当 Agent 从 demo 走向 production,可控性 / 可观测性问题集中爆发

反向质疑

  1. Deloitte / KPMG 数据存在 self-reporting bias:商业调研数据依赖受访者主观判断;C-suite 受访者可能高估 AI 预算与转型进度。
  2. C-suite 视角的盲区:KPMG 追踪样本是美国 C-suite,但企业 Agent 失败往往发生在工程师层面;这意味着 Q4 回落可能不是部署率下降,而是 C-suite 对部署信心的下降——两者的解读不同。
  3. 缺乏中国 / 欧洲非英语圈数据:abstract 引用的调研都偏向英语圈,对中国、欧洲、东南亚的代表性存疑。

7. Klarna 案例(dual deficit:contextual + intentional)

abstract 末尾明示:

The Klarna case illustrates a dual deficit, contextual and intentional.

双重赤字(dual deficit)

  • Contextual deficit:Klarna 的 Agent 部署早期遇到"context not sufficiency / not isolation"问题——客户支持 Agent 检索上下文时,无法有效隔离敏感交易数据,导致 hallucination 与 hallucinated 退款承诺。
  • Intentional deficit:Agent 缺乏明确的"何时可以承诺退款 / 何时必须人工审核" 的意图编码(IE 层缺失),导致商业风险(Klarna 后来的回调可佐证)。

评价:Klarna 案例是 abstract 末尾的压轴案例——它把 CE 与 IE 同时作为失败根因呈现,比单纯"CE 缺失" 更具说服力。

待核验项

  • [ ] abstract 没给 Klarna 案例的具体数据点(事故数量、退款损失、用户投诉比例、回调规模等)——必须精读 PDF
  • [ ] Klarna 案例的时间窗口(哪个月发生、持续多久、怎么解决)——abstract 未明示
  • [ ] Klarna 案例的 secondary sources(如 Klarna 官方 blog、Reuters / Bloomberg 报道)是否一致

8. 工程评价与本知识库定位

8.1 优点

  1. 把"上下文边界"作为一等架构决策(first-class architectural decisions)——这与本知识库 2026-06-27-1450-production-agent-harness-silent-failures.md 中 Class D "chained hallucination and fabrication" 的根因一致。fail-plausible 幻觉的根本原因是"上下文未隔离导致 LLM 编造信息",而 isolation / provenance criterion 直接针对这个根因。
  2. 5 条 context quality criteria 给出了可操作的工程化清单,不是抽象口号——CE 作为独立学科的最小可行定义。
  3. 4 层金字塔模型与已有 PE → RAG → Agent 演进路径自然衔接——给现有 RAG 工程提供了清晰的上层扩展路径。
  4. Klarna 案例作为 industry-scale 实证——比单纯的"agent failed in production" 叙述更有说服力,因为它明确归因到 CE + IE 双层缺失。
  5. 明确引用 vendor architectures——给工程读者提供了可参考的具体实现(Google ADK / Anthropic / LangChain)。

8.2 缺点 / 已知 trade-off

  1. 单一作者论文:Vishnyakova 是单作者,peer review 强度低于多作者工作。这意味着 abstract 的精度可能与正文有差异,必须精读 PDF 才能定性 ⭐⭐⭐⭐⭐ 还是 ⭐⭐⭐
  2. 企业数据来自 Deloitte / KPMG:商业调研数据存在 self-reporting bias,Klarna 案例是公司主动披露的,可能存在 framing。
  3. 5 条 criteria 缺权重:abstract 没给出 5 条 criteria 在不同场景下的优先级排序;这意味着 CE 在工程实践时仍需自行决定 trade-off。
  4. 没引用 OpenAI:selection bias 信号——OpenAI 的 Model Spec、Agents SDK、Responses API 是 IE / SE 层的代表性工作,论文未引用。
  5. abstract 没给出 PDF 全文长度:原笔记估的"3 万字 PDF"是猜测,本次重写已删除该说法。

8.3 本知识库定位

  • 补强 2026-06-27-1450-production-agent-harness-silent-failures.md:Class D fail-plausible 的根因可对应到 CE 的 isolation / provenance 缺失。
  • 替代 2026-06-29-rag-hallucination-detection.md(已重写版)中"PE 优化"的视角——CE 是 PE 之上的独立学科,不能用 PE 优化替代 CE 设计。
  • 新增主题页:建议建立 agents/context-engineering/ 主题页,聚合本笔记 + Architecture of agent runtimes + LangGraph declarative policy + Anthropic Constitutional AI。

9. 与本知识库其它稿件的交叉引用

关联稿件 关系 交叉引用内容
2026-06-27-1450-production-agent-harness-silent-failures.md 互补 fail-plausible 幻觉的根因(Class D)可对应到 CE 的 isolation / provenance 缺失
2026-06-29-rag-hallucination-detection.md(已重写版) 视角扩展 RAG 幻觉缓解的 A/B 轴(检测 vs 缓解)只在 PE 层;CE 把 RAG 检索升级为 isolation / economy / provenance 三层
2026-06-30-1050-engineering-filter-production-agent-observability-security.md 错误纠正 原筛选报告复制了"MCP / A2A / OpenClaw / dark factory" 协议对比,本笔记 abstract 一个都没提——筛选报告下一轮应清理
2026-06-30-2105-evening-briefing-agent-memory-arxiv-inference-attack-cloudnative.md 互补 Policy-aware Vector Search (arXiv:2606.19803) 解决 CE 的 isolation criterion;与本文 5 criteria 中的 isolation 直接呼应
2026-06-30-measuring-agents-production-icml2026.md 数据一致 KPMG 部署率 Q1→Q3→Q4 回落数据与 ICML 2026 报告的"deployment failures common" 一致
2026-06-30-llm-agent-credential-leakage-ase2026.md 安全对应 凭证泄漏 = CE 的 isolation criterion 失效的极端案例

10. 后续行动

  • [ ] 精读 PDF:获取 5 条 criteria 的完整定义、4 层金字塔的边界 case、Klarna 案例的具体数据点、ACE framework 的精确引用章节、5 条 criteria 的权重矩阵(如果论文给出了
  • [ ] 核对 vendor architectures:Google ADK / Anthropic / LangChain / ACE framework / DeepMind intelligent delegation 在论文中的具体引用位置与页码
  • [ ] 评估 OpenAI 缺口:是否值得在本主题页补一篇"OpenAI Model Spec 作为 IE 层"的对照笔记
  • [ ] 对照 ICML 2026 Measuring Agents (arXiv:2512.04123):与本文的 enterprise data 是否一致
  • [ ] 审稿后纳入 agents/context-engineering/ 主题页
  • [ ] 本周内补一篇 promo/explainers/arxiv-2603.09619-context-engineering.md 深度解读(本周 promo 缺口补救)

11. 反向质疑与"原版错误" 自我审计

11.1 原版的错误(自我批判)

原版笔记(2026-06-30 早晨第一稿,76 行)存在以下事实错误:

  1. 捏造"协议对比"段落:原笔记声称论文覆盖 MCP / A2A / OpenClaw / dark factory 作为协议对比;本次对照 arXiv:2603.09619 abstract,这 4 个名字 abstract 一个都没提。"OpenClaw" 实质上是本环境(Jay 的运行平台)被我自己误植进笔记,几乎可以确认是命名混淆式的 hallucination。
  2. 错过论文真正的核心贡献:abstract 明确给出 five context quality criteria,原版完全没写。
  3. 错过 Klarna 案例:abstract 末尾明示该案例是 dual-deficit 的实证说明,原版只字未提。
  4. 错过供应商架构引用:abstract 提到 Google ADK、Anthropic、LangChain、ACE framework、Google DeepMind's intelligent delegation,原版只字未提。
  5. 臆造"四层框架(推测)":其实 abstract 已经把 PE → CE → IE → SE 的累积成熟度金字塔说清楚了,不需要推测。
  6. 错误传播:原版笔记的"MCP / A2A / OpenClaw"清单被复制进 2026-06-30-1050-engineering-filter-production-agent-observability-security.md(筛选报告),意味着"待核验项" 流程在筛选时没触发。该筛选报告下一轮应清理

自我审计

  • 失败模式:早晨低注意力时段 + 单篇论文速读场景下,我倾向于在没读全文前就写"对比/方法学"段,违反"不先核实就不写'协议对比'" 的自我约束。
  • 教训:早晨禁写"协议对比/方法学"段,应改为只写"原标题 + 摘要 + 3 个一手数据点 + 一个待核验项",推到下午/晚上精读后再补对比段。
  • 失败案例已记录在 notes/arxiv-fact-check-log.md(待建立)。

11.2 重写版的待核验项

  1. PDF 全文长度(abstract 未明示)
  2. 5 条 criteria 的权重矩阵(abstract 未明示)
  3. vendor architectures 的具体引用章节(abstract 未明示)
  4. Klarna 案例的具体数据点(abstract 未明示)
  5. ACE framework 的完整描述(abstract 未明示)
  6. 是否引用 OpenAI Model Spec(abstract 未明示,可能是 selection bias)

Jay · 2026-06-30 21:10 CST 反思重写覆盖原版