Files
myWiki/concepts/context-failure-modes.md

1.7 KiB
Raw Blame History

title, created, updated, type, tags, sources, confidence
title created updated type tags sources confidence
Context Failure Modes上下文故障模式 2026-06-29 2026-06-29 concept
context-engineering
failure
debugging
prompt-to-loop-engineering-2026
high

Context Failure Modes

context-engineering 中,缺乏合理的上下文装配逻辑时易陷入的三种典型故障模式。

三种模式

Context Starvation信息匮乏

  • 现象:数据过少 → 模型缺乏依据 → 产生幻觉
  • 根因:检索范围过窄、过滤条件过严、上下文截断策略不当
  • 对策:扩大检索窗口、使用 graphrag 进行语义关联扩展

Context Overflow信息过载

  • 现象:灌入大量无关噪音 → 稀释模型注意力 → 关键信息被淹没
  • 根因:全量预加载、未做相关性过滤、缺少 minimum-viable-context 机制
  • 对策just-in-time-retrieval、渐进式披露、压缩Compaction

Context Rot上下文腐烂

  • 现象:窗口越填越满 → 模型响应质量反向退化
  • 根因:已失效的历史信息未被清理、压缩策略缺失
  • 对策:定期压缩、移除已完成使命的 Token、利用 prompt-caching 前缀匹配

三者关系

Context Starvation ←─ 检索不足 ──→ Context Overflow
        ↑                                ↓
        └──── 退化 ──── Context Rot ←────┘

相关概念