Skip to main content
Memvid is not another vector database. It’s a portable, single-file memory system with flexible embedding options. Use local models for privacy and offline use, or connect to external providers like OpenAI, NVIDIA, and more.

The Problem with Traditional RAG

Most memory systems today follow the same pattern: This approach has serious limitations:
ProblemImpact
API dependencyCan’t work offline, costs money per query
Embedding driftModel updates break your index
No exact matching”Error 404” doesn’t find “error 404”
Black box relevanceHard to debug why results are wrong
Cold startNeed to embed everything before first search

The Memvid Innovation

Memvid takes a completely different approach: Flexible embedding options. Memvid combines multiple search strategies:
  • BM25 lexical search - Battle-tested, fast, explainable
  • Vector embeddings - Local models (Nomic, BGE, GTE) or external APIs (OpenAI, NVIDIA)
  • SimHash deduplication - Find near-duplicates instantly
  • Time-aware retrieval - When something was added matters
  • Hybrid search - Combines lexical + semantic for best results

How Frames Change Everything

Traditional systems store “chunks” - arbitrary text splits. Memvid stores Frames - structured units of memory:
FieldExample
content”The quarterly revenue exceeded $10M…”
urireports/q4-2024.pdf
timestamp2024-12-15T10:30:00Z
content_hashblake3(…)
simhash0x8f3a2b1c…
Each frame knows:
  • What it contains (content + hash)
  • Where it came from (URI + metadata)
  • When it was created (timestamp)
  • What it’s similar to (SimHash)
  • What entities it mentions (Logic Mesh)
  • How it connects to other frames (relationships)
Frames are the foundation of Memvid’s multi-index approach, enabling both lexical and semantic search.

Multiple Indices, Flexible Providers

Every .mv2 file contains multiple search indices:
IndexPurposeHow It Works
Lexical (BM25)Keyword searchTF-IDF scoring, exact matches
VectorSemantic similarityLocal or external embedding models
SimHashNear-duplicate detection64-bit locality-sensitive hash
TimeTemporal queriesB-tree on timestamps
Logic MeshEntity-relationshipTriple store (subject-predicate-object)
Embedding flexibility - Choose what works for your use case:
  • Local models (Nomic, BGE-small, BGE-base, GTE-large) - Fast, private, works offline
  • External APIs (OpenAI, NVIDIA) - Higher quality, no local compute needed

Choosing Your Embedding Provider

Memvid supports multiple embedding providers. Choose based on your needs:
ProviderModelsBest For
Local (Default)bge-small, bge-base, nomic, gte-largePrivacy, offline use, no API costs
OpenAIopenai, openai-small, openai-adaHighest quality, multilingual
NVIDIAnvidiaEnterprise, high throughput
# Use local embeddings (default - works offline)
memvid create notes.mv2
memvid put notes.mv2 --input docs/ --embedding

# Use OpenAI embeddings (requires OPENAI_API_KEY)
memvid put notes.mv2 --input docs/ --embedding -m openai

# Use specific local model
memvid put notes.mv2 --input docs/ --embedding -m bge-base

Logic Mesh: Relationships Without ML

Traditional systems need expensive NER models for entity extraction. Memvid’s Logic Mesh uses:
  • Rule-based extraction - Fast, free, no API
  • Pattern matching - Dates, emails, numbers
  • Co-occurrence - Entities mentioned together
  • Temporal reasoning - When facts changed
# Enable Logic Mesh during ingestion
memvid put memory.mv2 --input docs/ --logic-mesh

# Query relationships
memvid follow traverse memory.mv2 --start "John" --link "works_at"

# Result: John → works_at → Acme Corp (since 2024-01-15)

SimHash: Smart Deduplication

Instead of comparing embeddings, Memvid uses SimHash - a locality-sensitive hash that detects near-duplicates:
Document A: "The quick brown fox jumps over the lazy dog"
Document B: "The quick brown fox leaps over the lazy dog"

SimHash A: 0x8f3a2b1c4d5e6f70
SimHash B: 0x8f3a2b1c4d5e6f71

Hamming distance: 1 bit → Near duplicate detected!
Benefits:
  • Instant - O(1) comparison
  • No API calls - Computed locally
  • Works offline - No internet needed
  • Deterministic - Same input = same hash

Real-World Performance

Memvid’s local-first approach delivers fast performance:
OperationTraditional Vector DBMemvid (Local Embeddings)
Ingest 1,000 docs5-10 minutes30 seconds
First searchAfter embeddingInstant
Offline search
Cost per query$0.0001+$0 (local)
Single file portability

Getting Started

Get started with Memvid in minutes:
# Install
npm install -g memvid-cli

# Create memory
memvid create my-memory.mv2

# Add your documents (uses local embeddings by default)
memvid put my-memory.mv2 --input ./documents/

# Search with hybrid lexical + semantic
memvid find my-memory.mv2 --query "quarterly report"

# Ask questions
memvid ask my-memory.mv2 --question "What were the Q4 results?"
That’s it. Local embeddings work out of the box, no API keys required.

Switching Embedding Providers

Need higher quality embeddings? Switch to an external provider:
# Rebuild vector index with OpenAI embeddings
memvid doctor my-memory.mv2 --rebuild-vec-index -m openai

# Search with semantic mode
memvid find my-memory.mv2 --query "financial performance" --mode sem

# Or use hybrid (lexical + semantic)
memvid find my-memory.mv2 --query "financial performance" --mode hybrid
Your existing data stays intact. Only the vector index is rebuilt.

Next Steps