Skip to main content

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 queries often work better than generic ones:
Include context to get more relevant results:
Question-format queries often perform well:
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

Start broad, then narrow down:
Search different aspects of the user:
Use previous conversation context:

Performance Optimization

Search Best Practices

Choose appropriate limits based on use case:
Use reranking selectively for better performance:
Cache frequent searches for better performance:

Common Use Cases

Personalized Responses

Content Recommendations

User Analysis

Common Issues

Possible causes:
  • Query too specific or using uncommon terms
  • No memories stored yet for the user
  • Query doesn’t match stored memory language
Solutions:
Possible causes:
  • Query too broad or ambiguous
  • Need reranking enabled
  • Categories not specified
Solutions:
Possible causes:
  • Old episodic memories ranking high
  • Need to update or clean old memories
Solutions:

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