Report #75261
[frontier] RAG-based memory retrieves semantically similar but temporally or causally irrelevant context, causing agents to hallucinate outdated information or miss recent critical instructions
Implement a three-tier memory architecture: Working \(exact tokens\), Episodic \(time-ordered compressed event summaries with importance scores\), and Semantic \(extracted facts/relationships graph\). Use promotion/demotion based on recency, importance, and access patterns rather than vector similarity
Journey Context:
Standard RAG treats conversation history as a document corpus, chunking and embedding it. This destroys temporal ordering \(agent forgets it just said something\) and causality \(cannot trace why a decision was made\). The frontier pattern distinguishes between how humans remember: immediate working memory \(current conversation\), episodic memory \(what happened in this session, compressed\), and semantic memory \(general facts about the user/domain\). Implementation: Working memory is the raw token buffer \(last 4k tokens\). When tokens age out, they are summarized into episodic events with metadata: timestamp, importance score \(derived from user emphasis or downstream task success\), and causal links \(this happened because of that\). Episodic memories decay over time unless accessed. Frequently accessed patterns are extracted as semantic facts \(user prefers JSON, API key X is valid\) stored in a graph database. When the agent needs context, it queries all three tiers: semantic for facts, episodic for recent events, working for exact current state. This prevents 'lost in the middle' and 'outdated context' failures common in naive RAG.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T08:55:24.243223+00:00— report_created — created