The Core Problem
When building AI agents, developers often treat memory as just another retrieval problem. They store conversations in a vector database, embed queries, and hope semantic search will surface the right context. This approach fails because memory isn’t about finding similar text—it’s about understanding relationships, temporal context, and user state over time.Documents vs Memories in Supermemory
Supermemory makes a clear distinction between these two concepts:Documents: Raw Knowledge
Documents are the raw content you send to Supermemory—PDFs, web pages, text files. They represent static knowledge that doesn’t change based on who’s accessing it. Characteristics:- Stateless: A document about Python programming is the same for everyone
- Unversioned: Content doesn’t track changes over time
- Universal: Not linked to specific users or entities
- Searchable: Perfect for semantic similarity search
- Company knowledge bases
- Technical documentation
- Research papers
- General reference material
Memories: Contextual Understanding
Memories are the insights, preferences, and relationships extracted from documents and conversations. They’re tied to specific users or entities and evolve over time. Characteristics:- Stateful: “User prefers dark mode” is specific to that user
- Temporal: Tracks when facts became true or invalid
- Personal: Linked to users, sessions, or entities
- Relational: Understands connections between facts
- User preferences and history
- Conversation context
- Personal facts and relationships
- Behavioral patterns
Why RAG Fails as Memory
Let’s look at a real scenario that illustrates the problem:- The Scenario
- RAG Approach (Wrong)
- Memory Approach (Right)
The Technical Difference
RAG: Semantic Similarity
Memory: Contextual Graph
- Entities: Users, products, concepts
- Relationships: Preferences, ownership, causality
- Temporal Context: When facts were true
- Invalidation: When facts became outdated
When to Use Each
Use RAG For
- Static documentation
- Knowledge bases
- Research queries
- General Q&A
- Content that doesn’t change per user
Use Memory For
- User preferences
- Conversation history
- Personal facts
- Behavioral patterns
- Anything that evolves over time
Real-World Examples
E-commerce Assistant
- RAG Component
- Memory Component
Stores product catalogs, specifications, reviews
Customer Support Bot
- RAG Component
- Memory Component
FAQ documents, troubleshooting guides, policies
How Supermemory Handles Both
Supermemory provides a unified platform that correctly handles both patterns:1. Document Storage (RAG)
2. Memory Creation
3. Hybrid Retrieval
The Bottom Line
Key Insight: RAG answers “What do I know?” while Memory answers “What do I remember about you?”
- RAG for accessing knowledge
- Memory for understanding users