Embeddings
Remem generates embeddings locally using fastembed with the all-MiniLM-L6-v2 model, inside the remem-server process.
| Property | Value |
|---|---|
| Model | all-MiniLM-L6-v2 |
| Dimensions | 384 |
| Similarity metric | Cosine |
| Inference | CPU, local, in-process |
The model is configured via the [embedding] section of remem-server.toml:
[embedding]model = "all-MiniLM-L6-v2"cache_size = 10000 # embeddings kept in LRU cacheNo internet connection is required at runtime, no external embedding API, no per-query cost. dimension in [vector] must match the embedding model’s output size — changing [embedding].model to a different model requires updating [vector].dimension to match, and requires reindexing existing data.
When embeddings are generated
Section titled “When embeddings are generated”- On
store_memory— the content is embedded and the vector is stored in the HNSW index - On
search_memorieswithsearch_type: "semantic"orsearch_type: "hybrid"— the query is embedded at search time
Similarity threshold for auto-discovery
Section titled “Similarity threshold for auto-discovery”Auto-discovery of connections between memories is controlled by the [connections] section of remem-server.toml, not an environment variable:
[connections]auto_discovery_threshold = 0.7 # minimum similarity to auto-link two memoriesauto_discovery_top_k = 5 # max auto-created connections per new memoryWhen a memory is stored, its embedding is compared against existing memories; pairs with cosine similarity at or above auto_discovery_threshold get linked, capped at auto_discovery_top_k new edges per memory. This runs on a background worker, so store_memory returns before discovery completes.
Lower values create denser graphs with more loose connections. Higher values create sparser graphs with only strong connections.
Long content
Section titled “Long content”For long documents, consider:
- Storing paragraph-level chunks as separate memories and linking them with
part_ofconnections - Summarising the content and storing the summary as the memory content
