Clean up release highlights copy and removing emdash from the docs (#5984)
This commit is contained in:
@@ -17,7 +17,7 @@ The new Mem0 release redesigns both extraction and retrieval, and cleans up the
|
||||
- **Retrieval**: Multi-signal hybrid search (semantic + BM25 keyword + entity matching)
|
||||
- **Entity linking**: Automatic entity extraction and cross-memory linking
|
||||
- **SDK cleanup**: Deprecated parameters removed, naming conventions standardized
|
||||
- **API surface aligned with Platform**: Entity IDs now follow the same convention across OSS and Platform — top-level kwargs for `add()` / `delete_all()`, inside `filters` for `search()` / `get_all()`
|
||||
- **API surface aligned with Platform**: Entity IDs now follow the same convention across OSS and Platform: top-level kwargs for `add()` / `delete_all()`, inside `filters` for `search()` / `get_all()`
|
||||
|
||||
These changes produce a **+20 point improvement on LoCoMo** (71.4 → 91.6) and **+26 point improvement on LongMemEval** (67.8 → 93.4), while cutting extraction latency roughly in half.
|
||||
|
||||
@@ -27,13 +27,13 @@ These changes produce a **+20 point improvement on LoCoMo** (71.4 → 91.6) and
|
||||
|
||||
| Change | Old | New | Migration |
|
||||
|---|---|---|---|
|
||||
| `search()` / `get_all()` entity IDs | Top-level kwargs (`user_id="..."`) | Inside `filters` dict | `m.search("q", filters={"user_id": "..."})` — top-level kwargs now raise `ValueError` |
|
||||
| `search()` / `get_all()` entity IDs | Top-level kwargs (`user_id="..."`) | Inside `filters` dict | `m.search("q", filters={"user_id": "..."})`: top-level kwargs now raise `ValueError` |
|
||||
| `top_k` default | `100` | `20` | Pass `top_k=100` explicitly to restore |
|
||||
| `threshold` default | `None` (no filtering) | `0.1` (filters low-relevance) | Pass `threshold=0.0` for old behavior |
|
||||
| `threshold` validation | Any float | Must be in `[0, 1]` | Out-of-range values now raise `ValueError` |
|
||||
| `rerank` default | `True` | `False` | Pass `rerank=True` to restore |
|
||||
| Entity ID validation | Accepted any string | Trimmed; empty / whitespace-only rejected (`ValueError`) | Pass a non-empty identifier without internal spaces |
|
||||
| `messages` in `add()` | Could be `None` | Must be `str` / `dict` / `list[dict]` — other types raise `Mem0ValidationError` (code `VALIDATION_003`) | Always pass a string, dict, or list of messages |
|
||||
| `messages` in `add()` | Could be `None` | Must be `str` / `dict` / `list[dict]`: other types raise `Mem0ValidationError` (code `VALIDATION_003`) | Always pass a string, dict, or list of messages |
|
||||
| `add()` events | Returns `ADD`, `UPDATE`, `DELETE` | Returns `ADD` only | Update code expecting UPDATE/DELETE |
|
||||
| Custom extraction prompt | `custom_fact_extraction_prompt` | `custom_instructions` | Rename in config |
|
||||
| Custom update prompt | `custom_update_memory_prompt` | Deprecated | Use `custom_instructions` instead |
|
||||
@@ -50,8 +50,8 @@ These changes produce a **+20 point improvement on LoCoMo** (71.4 → 91.6) and
|
||||
| `search()` / `getAll()` entity IDs | Top-level options (`userId: "..."`) | Inside `filters` object | `m.search("q", { filters: { userId: "..." } })` |
|
||||
| `threshold` validation | Any number | Must be in `[0, 1]` | Out-of-range values now throw |
|
||||
| Entity ID validation | Any string | Trimmed; empty / whitespace-only rejected | Pass non-empty identifiers without internal spaces |
|
||||
| `messages` in `add()` | Could be `null` / `undefined` | Required — throws on null/undefined | Always pass a string or array |
|
||||
| Payload key for lemmatized text | `text_lemmatized` (snake_case) | `textLemmatized` (camelCase) | TS-only internal field. If you share a vector store collection between Python and TS SDKs, lemma-based BM25 will not resolve across languages — keep collections language-scoped. |
|
||||
| `messages` in `add()` | Could be `null` / `undefined` | Required: throws on null/undefined | Always pass a string or array |
|
||||
| Payload key for lemmatized text | `text_lemmatized` (snake_case) | `textLemmatized` (camelCase) | TS-only internal field. If you share a vector store collection between Python and TS SDKs, lemma-based BM25 will not resolve across languages: keep collections language-scoped. |
|
||||
| Custom prompt | `customPrompt` | `customInstructions` | Rename in config |
|
||||
| Graph memory | `enableGraph` + `graphStore` in config | Removed | Graph store support has been removed entirely |
|
||||
| Default graph config | Neo4j default config applied | No default graph config | Graph store config is no longer used |
|
||||
@@ -62,7 +62,7 @@ These changes produce a **+20 point improvement on LoCoMo** (71.4 → 91.6) and
|
||||
|---|---|---|---|
|
||||
| Constructor | `MemoryClient(api_key, org_id, project_id)` | `MemoryClient(api_key)` | Remove `org_id`, `project_id` from constructor |
|
||||
| Method options | `client.add(messages, **kwargs)` | `client.add(messages, options=AddMemoryOptions(...))` | Use typed option classes (or `**kwargs` still works) |
|
||||
| Removed params | `api_version`, `output_format`, `async_mode`, `filter_memories`, `keyword_search`, `force_add_only`, `batch_size`, `immutable`, `includes`, `excludes`, `enable_graph`, `org_name`, `project_name` | — | Remove from all calls |
|
||||
| Removed params | `api_version`, `output_format`, `async_mode`, `filter_memories`, `keyword_search`, `force_add_only`, `batch_size`, `immutable`, `includes`, `excludes`, `enable_graph`, `org_name`, `project_name` | N/A | Remove from all calls |
|
||||
|
||||
### TypeScript Client SDK
|
||||
|
||||
@@ -70,7 +70,7 @@ These changes produce a **+20 point improvement on LoCoMo** (71.4 → 91.6) and
|
||||
|---|---|---|---|
|
||||
| Constructor | `new MemoryClient({ apiKey, organizationId, projectId })` | `new MemoryClient({ apiKey })` | Remove `organizationId`, `projectId`, `organizationName`, `projectName` |
|
||||
| All params | snake_case: `user_id`, `agent_id`, `top_k` | camelCase: `userId`, `agentId`, `topK` | Rename all params to camelCase |
|
||||
| Removed params | `api_version`, `output_format`, `async_mode`, `enable_graph`, `org_id`, `project_id`, `org_name`, `project_name`, `filter_memories`, `batch_size`, `force_add_only`, `immutable`, `includes`, `excludes`, `keyword_search` | — | Remove from all calls |
|
||||
| Removed params | `api_version`, `output_format`, `async_mode`, `enable_graph`, `org_id`, `project_id`, `org_name`, `project_name`, `filter_memories`, `batch_size`, `force_add_only`, `immutable`, `includes`, `excludes`, `keyword_search` | N/A | Remove from all calls |
|
||||
| Output format enum | `OutputFormat.V1`, `OutputFormat.V1_1` | Removed | v1.1 is now always used |
|
||||
| API version enum | `API_VERSION.V1`, `API_VERSION.V2` | Removed | Handled internally |
|
||||
|
||||
@@ -108,7 +108,7 @@ The Python `[nlp]` extra installs [spaCy](https://spacy.io/) for entity extracti
|
||||
</Info>
|
||||
|
||||
<Warning>
|
||||
**Qdrant users — install `fastembed` to enable BM25 keyword search.** The Qdrant backend uses [fastembed](https://github.com/qdrant/fastembed) to encode sparse (BM25) vectors alongside dense vectors in the same collection. Without it, BM25 is silently disabled and search falls back to semantic-only — you'll see a log warning `"fastembed not installed — BM25 keyword search disabled"` on the first search call. Other vector stores use their native full-text capabilities and don't need `fastembed`.
|
||||
**Qdrant users: install `fastembed` to enable BM25 keyword search.** The Qdrant backend uses [fastembed](https://github.com/qdrant/fastembed) to encode sparse (BM25) vectors alongside dense vectors in the same collection. Without it, BM25 is silently disabled and search falls back to semantic-only. The first search call logs a warning that BM25 keyword search is disabled. Other vector stores use their native full-text capabilities and don't need `fastembed`.
|
||||
|
||||
```bash
|
||||
pip install fastembed
|
||||
@@ -134,8 +134,8 @@ pip install fastembed
|
||||
# After
|
||||
config = {
|
||||
"custom_instructions": "Focus on user preferences", # [OK] New name
|
||||
# custom_update_memory_prompt removed — use custom_instructions
|
||||
# enable_graph and graph_store removed — graph store support has been removed
|
||||
# custom_update_memory_prompt removed: use custom_instructions
|
||||
# enable_graph and graph_store removed: graph store support has been removed
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
@@ -154,7 +154,7 @@ pip install fastembed
|
||||
// After
|
||||
const config = {
|
||||
customInstructions: "Focus on user preferences", // [OK] New name
|
||||
// enableGraph and graphStore removed — graph store support has been removed
|
||||
// enableGraph and graphStore removed: graph store support has been removed
|
||||
};
|
||||
```
|
||||
</Tab>
|
||||
@@ -165,7 +165,7 @@ pip install fastembed
|
||||
<Tabs>
|
||||
<Tab title="Python OSS">
|
||||
```python
|
||||
# Before — entity IDs as top-level kwargs
|
||||
# Before: entity IDs as top-level kwargs
|
||||
results = m.search(
|
||||
"what meetings did I attend?",
|
||||
user_id="alice",
|
||||
@@ -174,7 +174,7 @@ pip install fastembed
|
||||
for r in results:
|
||||
print(r["score"]) # Was raw cosine similarity
|
||||
|
||||
# After — entity IDs go inside `filters` (matches Platform API)
|
||||
# After: entity IDs go inside `filters` (matches Platform API)
|
||||
results = m.search(
|
||||
"what meetings did I attend?",
|
||||
filters={"user_id": "alice"}, # [REMOVED top-level kwarg, use filters]
|
||||
@@ -192,13 +192,13 @@ pip install fastembed
|
||||
</Tab>
|
||||
<Tab title="TypeScript OSS">
|
||||
```typescript
|
||||
// Before — entity IDs as top-level options
|
||||
// Before: entity IDs as top-level options
|
||||
const results = await m.search("what meetings did I attend?", {
|
||||
userId: "alice",
|
||||
limit: 20 // [REMOVED] Renamed to 'topK' for consistency
|
||||
});
|
||||
|
||||
// After — entity IDs go inside `filters` (matches Platform API)
|
||||
// After: entity IDs go inside `filters` (matches Platform API)
|
||||
const results = await m.search("what meetings did I attend?", {
|
||||
filters: { userId: "alice" }, // [REMOVED top-level option, use filters]
|
||||
topK: 20 // [OK] Renamed from 'limit'
|
||||
@@ -254,7 +254,7 @@ pip install fastembed
|
||||
<Tabs>
|
||||
<Tab title="Python OSS">
|
||||
```python
|
||||
# Before — could return ADD, UPDATE, DELETE events
|
||||
# Before: could return ADD, UPDATE, DELETE events
|
||||
result = m.add("I love hiking and my dog's name is Max", user_id="alice")
|
||||
for item in result["results"]:
|
||||
if item["event"] == "ADD":
|
||||
@@ -264,7 +264,7 @@ pip install fastembed
|
||||
elif item["event"] == "DELETE":
|
||||
print("Deleted:", item["memory"]) # [REMOVED] No longer returned
|
||||
|
||||
# After — only ADD events
|
||||
# After: only ADD events
|
||||
result = m.add("I love hiking and my dog's name is Max", user_id="alice")
|
||||
for item in result["results"]:
|
||||
print("New memory:", item["memory"]) # Only ADD events
|
||||
@@ -277,7 +277,7 @@ pip install fastembed
|
||||
# Before
|
||||
client.add(messages, user_id="alice", async_mode=True, output_format="v1.1")
|
||||
|
||||
# After — async_mode and output_format removed (async by default, v1.1 always)
|
||||
# After: async_mode and output_format removed (async by default, v1.1 always)
|
||||
client.add(
|
||||
messages,
|
||||
options=AddMemoryOptions(user_id="alice")
|
||||
@@ -305,7 +305,7 @@ pip install fastembed
|
||||
</Tabs>
|
||||
|
||||
<Tip>
|
||||
The ADD-only model means memories accumulate over time. When information changes, the new fact is stored alongside the old one. Retrieval handles ranking — the most relevant, current information surfaces first.
|
||||
The ADD-only model means memories accumulate over time. When information changes, the new fact is stored alongside the old one. Retrieval handles ranking: the most relevant, current information surfaces first.
|
||||
</Tip>
|
||||
|
||||
### 5. Update Vector Store Dependencies
|
||||
@@ -322,7 +322,7 @@ pip install "upstash-vector>=0.6.0"
|
||||
|
||||
### 6. Entity Store Setup
|
||||
|
||||
The new algorithm automatically creates a parallel entity store collection named `{your_collection}_entities`. No manual setup is required — it's created on first use.
|
||||
The new algorithm automatically creates a parallel entity store collection named `{your_collection}_entities`. No manual setup is required: it's created on first use.
|
||||
|
||||
<Warning>
|
||||
Make sure your vector store user/credentials have permission to create new collections. If you're using a managed vector database with restricted permissions, pre-create the `{collection_name}_entities` collection with the same embedding dimensions as your main collection.
|
||||
@@ -343,7 +343,7 @@ Mem0 now builds the graph itself. It extracts entities (proper nouns, quoted tex
|
||||
|
||||
**Migration:**
|
||||
- Remove `enable_graph` / `enableGraph` from your config
|
||||
- Remove the `graph_store` / `graphStore` block — it is no longer read
|
||||
- Remove the `graph_store` / `graphStore` block: it is no longer read
|
||||
- Uninstall external graph drivers (neo4j, memgraph, etc.) if you were using them only for Mem0
|
||||
- No data migration is required. Built-in graph memory activates automatically on the next `add()` call.
|
||||
|
||||
@@ -365,7 +365,7 @@ Input conversation
|
||||
→ Entity extraction + linking
|
||||
```
|
||||
|
||||
The previous algorithm used two LLM calls — one to extract candidate facts, one to decide ADD/UPDATE/DELETE actions against existing memories. The new algorithm collapses this into a single call that only adds. The model spends its capacity on understanding the input rather than diffing against existing state.
|
||||
The previous algorithm used two LLM calls: one to extract candidate facts, one to decide ADD/UPDATE/DELETE actions against existing memories. The new algorithm collapses this into a single call that only adds. The model spends its capacity on understanding the input rather than diffing against existing state.
|
||||
|
||||
### Retrieval: Multi-Signal Hybrid Search
|
||||
|
||||
@@ -381,7 +381,7 @@ Query
|
||||
|
||||
**Scoring:** The three signals are normalized and fused into a single combined `score` per result. The fusion adapts based on which signals are available at runtime (semantic-only, semantic + BM25, or all three when spaCy + the entity store are active).
|
||||
|
||||
**BM25 is a boost signal, not a recall expander.** Only semantic search results are candidates — BM25 and entity scores boost ranking but don't add new candidates.
|
||||
**BM25 is a boost signal, not a recall expander.** Only semantic search results are candidates: BM25 and entity scores boost ranking but don't add new candidates.
|
||||
|
||||
## Vector Store Compatibility
|
||||
|
||||
@@ -417,7 +417,7 @@ You always get semantic search. Hybrid search features layer on top when availab
|
||||
|
||||
These parameters have been removed across all SDKs. Remove them from your code:
|
||||
|
||||
### Python Client SDK — Removed parameters
|
||||
### Python Client SDK: Removed parameters
|
||||
|
||||
**Constructor:** `org_id`, `project_id`
|
||||
|
||||
@@ -431,7 +431,7 @@ These parameters have been removed across all SDKs. Remove them from your code:
|
||||
|
||||
**project.update():** `enable_graph`
|
||||
|
||||
### TypeScript Client SDK — Removed parameters
|
||||
### TypeScript Client SDK: Removed parameters
|
||||
|
||||
**Constructor:** `organizationId`, `projectId`, `organizationName`, `projectName`
|
||||
|
||||
@@ -443,7 +443,7 @@ These parameters have been removed across all SDKs. Remove them from your code:
|
||||
|
||||
**get_all():** `enable_graph` / `enableGraph`
|
||||
|
||||
### Python OSS — Removed/renamed parameters
|
||||
### Python OSS: Removed/renamed parameters
|
||||
|
||||
**Config:** `custom_fact_extraction_prompt` → renamed to `custom_instructions`
|
||||
|
||||
@@ -451,7 +451,7 @@ These parameters have been removed across all SDKs. Remove them from your code:
|
||||
|
||||
**Config:** `enable_graph` + `graph_store` → removed (graph store support removed entirely)
|
||||
|
||||
### TypeScript OSS — Removed/renamed parameters
|
||||
### TypeScript OSS: Removed/renamed parameters
|
||||
|
||||
**Config:** `customPrompt` → renamed to `customInstructions`
|
||||
|
||||
@@ -527,7 +527,7 @@ The entity store tries to create a `{collection_name}_entities` collection autom
|
||||
|
||||
### Score values are different from before
|
||||
|
||||
The top-level `score` still ranges `[0, 1]`, but it is computed differently in v3. Relative ranking between results stays comparable, but absolute numbers shift — retune any hard thresholds in your app against representative queries.
|
||||
The top-level `score` still ranges `[0, 1]`, but it is computed differently in v3. Relative ranking between results stays comparable, but absolute numbers shift: retune any hard thresholds in your app against representative queries.
|
||||
|
||||
If you need the raw cosine similarity for a specific use case, run an unboosted vector query directly against your vector store via `vector_store.search(...)`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user