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

1.5 KiB
Raw Blame History

title, created, updated, type, tags, sources, confidence
title created updated type tags sources confidence
Context Management上下文管理 2026-05-23 2026-05-23 concept
agent
context
memory
prompt
raw/papers/agent-harness-engineering-survey-2026.md
high

Context & Memory ManagementC 层)

ETCLOVG 的 C 层:控制模型在短期、会话级和持久视野中能看到什么。从 Prompt Engineering 演进而来。

三层视野

  • 短期Active Context Windowcompaction、tool-result clearing、prompt-cache-aware ordering
  • 中期Session State:跨运行持久化、会话状态管理
  • 长期Persistent Memory:向量存储、知识图谱、写入-管理-读取循环

核心挑战上下文漂移Context Drift

最深的上下文问题不是装更多 token而是保持 Agent 的工作状态与真实任务状态对齐

每次压缩、检索、遗忘操作都可能删除约束、扭曲优先级或保留过时假设。

重新框架:上下文作为状态估计

Zhang et al. (2025) 和 Du (2026) 将 Agent 记忆形式化为写入-管理-读取循环。未来系统需要:

  • 不确定性感知摘要
  • 事实溯源provenance
  • 矛盾处理
  • 显式陈旧标记
  • 从持久化产物重建状态的恢复程序

相关概念