Memory Types
MemSync uses two distinct types of memories to capture different kinds of information from user interactions. Understanding these types helps you optimize how your AI application stores and retrieves context.Semantic Memories
Semantic memories represent stable, lasting facts that are not tied to a specific time or place. These are the core truths about a user that remain relatively constant over time.Characteristics
- Persistent: Don’t change frequently
- Context-independent: True regardless of when or where they were mentioned
- Factual: Represent established knowledge about the user
- Searchable: Highly valuable for providing relevant context
Examples
Identity
- “User is a software engineer at Google”
- “Lives in San Francisco, California”
- “Graduated from Stanford with a CS degree”
Skills & Expertise
- “Experienced in Python and machine learning”
- “Specializes in natural language processing”
- “Has 5 years of backend development experience”
Preferences
- “Prefers working in collaborative environments”
- “Enjoys technical challenges and problem-solving”
- “Values work-life balance”
Interests
- “Passionate about hiking and photography”
- “Interested in AI ethics and responsible development”
- “Enjoys reading science fiction novels”
Episodic Memories
Episodic memories relate to current situations, goals, or projects that might change over time. They are tied to specific moments and could evolve or become outdated.Characteristics
- Time-bound: Relevant to a specific period or context
- Dynamic: May change, complete, or become irrelevant over time
- Situational: Tied to particular circumstances or goals
- Contextual: Provide important background for current interactions
Examples
Current Projects
- “Currently working on a new iOS app for AI model monetization”
- “Leading a team of 3 engineers and 1 marketing person”
- “Planning to launch the app in Q2 2024”
Active Goals
- “Learning how to cook new recipes for weight loss”
- “Training for a marathon in 6 months”
- “Studying for AWS certification exam”
Recent Events
- “Just moved to a new apartment last week”
- “Recently started using MemSync for their chatbot”
- “Had a great conversation about AI safety yesterday”
Temporary States
- “Currently traveling in Europe for 2 weeks”
- “Taking a break from social media this month”
- “Working from home while recovering from injury”
How MemSync Determines Memory Types
MemSync uses advanced language models to automatically classify memories during extraction. The system analyzes several factors:Semantic Memory Indicators
Episodic Memory Indicators
Memory Classification Process
1
Conversation Analysis
MemSync analyzes the full conversation context to understand what information is being shared.
2
Fact Extraction
The system extracts meaningful facts using advanced prompts designed to identify important information.
3
Type Classification
Each extracted fact is classified as semantic or episodic based on temporal indicators, context, and content analysis.
4
Storage & Indexing
Memories are stored with their type classification and made searchable through vector embeddings.
Best Practices for Memory Types
For Developers
Optimizing Memory Extraction
Optimizing Memory Extraction
- Provide rich conversation context to help MemSync understand what information is important
- Include relevant details that help classify memories correctly
- Use consistent terminology for better memory organization
Search Strategy
Search Strategy
- Use broad queries to find semantic memories (e.g., “What does the user do for work?”)
- Use specific queries to find episodic memories (e.g., “What is the user currently working on?”)
- Combine both types in search results for comprehensive context
Memory Lifecycle
Memory Lifecycle
- Semantic memories typically have longer relevance
- Episodic memories may need periodic updates or cleanup
- Monitor memory relevance over time and update as needed
Memory Evolution
Semantic Memory Updates
When new information conflicts with existing semantic memories, MemSync intelligently handles updates:Episodic Memory Transitions
Episodic memories can evolve or transition to semantic memories:Integration with Search
Understanding memory types helps optimize search queries:Semantic Memory Search
Episodic Memory Search
Combined Search
Memory Type Distribution
In typical usage, you’ll see different distributions of memory types:- Semantic memories: 60-70% of total memories
- Episodic memories: 30-40% of total memories
- User interaction patterns
- Application type (task-focused vs. general chat)
- Conversation topics and context
Next Steps
Memory Categories
Learn how memories are organized into categories like work, hobbies, and relationships
Semantic Search
Discover how to effectively search and retrieve relevant memories
User Profiles
Understand how memories combine to create comprehensive user profiles
API Reference
Explore the API endpoints for working with memories