OC-301c · Module 2
Memory Contamination Prevention
3 min read
Memory contamination occurs when incorrect, outdated, or contextually inappropriate memories influence agent behavior. An agent that remembers a client's pricing sensitivity from two years ago applies outdated context to a current negotiation. An agent that reads another agent's speculative analysis treats it as confirmed fact. Contamination is insidious because the agent acts on the contaminated memory with full confidence.
Prevention has three layers. First: provenance tracking. Every memory carries metadata about its source, the context in which it was created, and its confidence level. An agent loading a memory can assess its reliability before acting on it. Second: expiration policies. Factual memories (client preferences, market data, pricing) expire after a defined period unless explicitly refreshed. The expiration does not delete the memory — it flags it as "unverified" so the agent treats it with appropriate skepticism. Third: contradiction detection. When a new memory contradicts an existing memory, the system flags the conflict for resolution rather than silently overwriting.
Do This
- Track provenance for every memory — source, context, confidence, creation date
- Implement expiration policies for factual memories — stale facts produce stale decisions
- Detect and flag contradictions between new and existing memories — silent overwriting hides important signals
Avoid This
- Treat all memories as equally reliable — a speculation and a confirmed fact need different confidence levels
- Keep memories forever without expiration — client preferences from two years ago may be actively harmful
- Allow new memories to silently overwrite old ones — the contradiction between them may be more informative than either alone