Skip to main content
Memvid provides powerful search capabilities combining traditional keyword search with modern semantic understanding.

Search Modes

Memvid supports three search modes:

The find Command

Options

-m/--embedding-model is a global flag that selects the default embedding model (not the search mode). Use --mode for lex/sem/auto.

Time-Travel Options


Search Mode Examples

Best for exact matches and technical terms:
Best for natural language and conceptual queries:
Semantic (sem) and hybrid (auto) search require query embeddings. Memvid auto-detects the correct embedding runtime from the .mv2 when vectors are present. Use --query-embedding-model (or global -m/--embedding-model) only when you need to override.
Combines both approaches for best results:

Query Syntax

Multi-Word Queries

By default, multi-word queries use OR logic for better recall:

Boolean Operators

Use explicit operators for precise control:
Use quotes for exact phrase matching:
For natural language queries, use --mode sem (semantic search) which understands meaning rather than exact keywords.

Filtering Results

Filter by scope or specific URI:

Limiting Results

JSON Output

For programmatic use:
Output:

Pagination

For large result sets:

Time-Travel Queries

View search results at a specific point in time:

AI-Powered Q&A

The ask command retrieves relevant documents and synthesizes an answer using an LLM.

Basic Usage

Model Options

For NVIDIA models, you can also set NVIDIA_LLM_MODEL and use --use-model nvidia.
For local models, see Local Models with Ollama for setup instructions.

Options

Filtering Options

Examples

Search across multiple memory files:

JSON Output

Grounding & Hallucination Detection

When using --json, the response includes a grounding object that measures how well the answer is supported by the retrieved context:
Example output for low grounding (potential hallucination):
When follow_up.needed is true, the answer may not be reliable. Consider using the suggested follow-up questions or rephrasing your query.

Ground Truth Corrections

The correct command stores authoritative corrections that take priority in future retrievals. Use this to fix hallucinations or add verified facts.

Synopsis

Options

Examples

Verification

After storing a correction, verify it’s retrievable:
Corrections are stored with a [Correction] label and receive boosted retrieval scores, ensuring they appear prominently in search results.

The vec-search command performs direct vector similarity search with pre-computed embeddings.

Synopsis

Options

Examples


Temporal Queries

The when command resolves temporal phrases and lists matching frames.

Synopsis

Options

Examples


Audit Reports

The audit command generates audit reports with full source provenance.

Synopsis

Options

Examples

Response (Markdown)


Real-World Examples


Troubleshooting

No Results Found

Solutions:
  • Try different search mode: --mode sem or --mode lex
  • Broaden your query terms
  • Check that documents have been ingested: memvid stats knowledge.mv2
  • Verify lexical index exists: memvid doctor knowledge.mv2 --rebuild-lex-index

Low Relevance Scores

Solutions:
  • Use semantic search for natural language queries
  • Use lexical search for exact technical terms
  • Add more context to your query
  • Increase --top-k to see more results

LLM Errors

Solutions: Option 1: Use local Ollama model (recommended)
Option 2: Set API keys for cloud providers
See Local Models with Ollama for detailed setup instructions.

Next Steps

Timeline & View

Explore documents by time and view frame details

Maintenance

Verify integrity and manage your files