Report #15798
[architecture] Agent runs out of context or hallucinates by stuffing entire vector DB results into the prompt
Implement a two-tier memory architecture: working memory \(context window\) for the current task step, and long-term memory \(vector store\) for retrieval. Only promote relevant slices to working memory.
Journey Context:
Agents often try to RAG everything, but LLMs suffer from lost-in-the-middle and attention dilution. Conversely, keeping everything in context is expensive and hits token limits. The fix is strict memory promotion/demotion, treating the context window as a limited cache rather than a persistent database.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T01:09:24.781988+00:00— report_created — created