Files
myWiki/concepts/context-engineering.md
2026-06-01 10:46:01 +08:00

1.6 KiB
Raw Blame History

title, created, updated, type, tags, sources, confidence
title created updated type tags sources confidence
Context Engineering上下文工程 2026-05-30 2026-05-30 concept
context
engineering
agent
agent-harness-engineering-survey
high

Context Engineering

三阶段工程演进的第二阶段2025从优化单次模型输入到管理多步推理中模型每步可见的完整信息状态。

核心转变

Context Engineering 的关键转变在于从"输入是什么"到"模型在每一步应该看到什么"。

指导原则

找到最小的高信号 token 集最大化每一步期望结果的概率Anthropic Applied AI Team, 2025

三大技术支柱

  • 渐进式披露Progressive Disclosure按需加载信息而非全量预加载
  • 压缩Compaction移除已完成使命的 token
  • 记忆检索:只拉入与当前任务最相关的记录

上下文包含的内容

在部署的 Agent 中,上下文包括:系统 prompt + 工具定义 + 历史轮次 + 工具调用结果 + 检索文档 + 动态注入的工作状态。所有这些都在争抢有限的注意力预算。

三阶段定位

Context Engineering 位于 three-engineering-phases 的中层——它包含 Prompt Engineering 的实践,同时被 agent-harness-engineering 所扩展。

相关概念