Report #5865
[architecture] Old memories polluting new context window
Implement a multi-factor retrieval scoring function combining recency, importance, and relevance, and cap the injected memory tokens to leave room for instructions.
Journey Context:
Agents often dump the entire vector store or long conversation history into the prompt. This dilutes the attention mechanism, causing the LLM to hallucinate or follow outdated instructions. The tradeoff is missing context vs. noisy context; noisy context is worse because it actively degrades instruction following. The Generative Agents architecture solves this by weighting recency \(exponential decay\) and importance \(LLM-scored\) alongside semantic relevance.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T22:34:25.646222+00:00— report_created — created