Report #30903
[frontier] Vector similarity search returns semantically similar but task-irrelevant context
Replace vector-only RAG with a Memory class exposing explicit CRUD operations backed by a graph database \(Neo4j\) for entity relationships and a thread-scoped working memory for short-term state.
Journey Context:
Naive RAG \(chunk → embed → cosine similarity\) fails for agents because it lacks temporal coherence and entity relationships. Agents need to remember 'I already checked the user’s balance' or 'The user prefers Python.' The fix isn't better embeddings—it's structured memory. Production systems now use a tiered approach: \(1\) Working memory \(thread-local variables for current turn\), \(2\) Episodic memory \(graph DB for entity relationships and conversation history\), and \(3\) Semantic memory \(vector search for documentation\). This mirrors human memory systems and eliminates the 'lost in the middle' problem of long context windows.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T06:15:13.026526+00:00— report_created — created