Semantic Search
MemSync’s semantic search goes beyond keyword matching to understand the meaning and context of your queries. This powerful feature uses vector embeddings and advanced ranking to find the most relevant memories for any situation.How Semantic Search Works
Vector Embeddings
MemSync converts both memories and search queries into high-dimensional vectors that capture semantic meaning:1
Memory Storage
When memories are stored, they’re converted into vector embeddings using advanced language models
2
Query Processing
Your search query is converted into the same vector space
3
Similarity Matching
The system finds memories with vectors closest to your query vector
4
Ranking & Reranking
Results are ranked by relevance and optionally reranked for improved accuracy
Search Algorithm
Basic Search Examples
Simple Queries
Natural Language Queries
MemSync understands natural language, allowing for conversational search:Advanced Search Features
Category Filtering
Narrow your search to specific categories:Agent and Thread Filtering
Search within specific conversations or agents:Reranking
Enable reranking for improved search quality:Reranking uses additional processing but significantly improves search quality, especially for complex queries.
Search Query Optimization
Effective Query Patterns
Specific vs. General
Specific vs. General
Specific queries often work better than generic ones:
Context-Rich Queries
Context-Rich Queries
Include context to get more relevant results:
Question Format
Question Format
Question-format queries often perform well:
Intent-Based Queries
Intent-Based Queries
Focus on the intent behind your search:
Understanding Search Results
Result Structure
Key Metrics
- vector_distance: Semantic similarity (0.0 = identical, 1.0 = completely different)
- rerank_score: Relevance score when reranking is enabled (0.0-1.0, higher is better)
- categories: Helps understand what aspect of the user this memory represents
- type: Semantic (lasting facts) vs Episodic (time-bound information)
Result Interpretation
Search Strategies
Progressive Search
Start broad, then narrow down:Multi-Faceted Search
Search different aspects of the user:Contextual Search
Use previous conversation context:Performance Optimization
Search Best Practices
Limit Optimization
Limit Optimization
Choose appropriate limits based on use case:
Reranking Strategy
Reranking Strategy
Use reranking selectively for better performance:
Caching Strategy
Caching Strategy
Cache frequent searches for better performance:
Common Use Cases
Personalized Responses
Content Recommendations
User Analysis
Troubleshooting Search
Common Issues
No Results Returned
No Results Returned
Possible causes:
- Query too specific or using uncommon terms
- No memories stored yet for the user
- Query doesn’t match stored memory language
Irrelevant Results
Irrelevant Results
Possible causes:
- Query too broad or ambiguous
- Need reranking enabled
- Categories not specified
Outdated Results
Outdated Results
Possible causes:
- Old episodic memories ranking high
- Need to update or clean old memories
Next Steps
User Profiles
Learn how search results combine to create comprehensive user profiles
Memory Types
Understand how memory types affect search results
Memory Categories
Master category-based search strategies
Search API
Explore the complete search API documentation

