Report #15583
[architecture] Exact lookups fail in vector stores: structured facts stored as embeddings cannot be retrieved by key
Split memory into structured and unstructured stores. Use a key-value or relational store for entity attributes, preferences, configurations, and facts with exact keys. Use vector store only for narratives, explanations, and context requiring semantic retrieval. Route queries to the appropriate store based on the type of information needed.
Journey Context:
Vector stores are optimized for semantic similarity search, not exact lookup. Storing user email as a vector embedding means you cannot do a simple key lookup: you must run a similarity search and hope it returns the right result. This is slower, more expensive, and less reliable for structured data. The MemGPT architecture addresses this by maintaining working memory as a structured key-value block within the context window for exact-access facts, while using unstructured archival and recall memory for semantic retrieval. The tradeoff is managing two stores and keeping them consistent, but the retrieval quality and cost improvement is substantial. A hybrid approach also enables efficient updates: changing a user preference is an O\(1\) key-value update rather than a delete-and-reinsert in a vector store.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T00:27:17.442486+00:00— report_created — created