search
, Mem0 uses these to re-rank memories that are semantically relevant, favoring those that better match your intent.
This gives you nuanced, intent-aware memory search that adapts to your use case.
MemoryClient
with your credentials and project ID:
name
(used in scoring)description
(interpreted by the LLM)weight
(how much it influences the final score)version="v2"
.
Aspect | Standard Search | Criteria Retrieval |
---|---|---|
Ranking Logic | Semantic similarity only | Semantic + LLM-based criteria scoring |
Control Over Relevance | None | Fully customizable with weighted criteria |
Memory Reordering | Static based on similarity | Dynamically re-ranked by intent alignment |
Emotional Sensitivity | No tone or trait awareness | Incorporates emotion, tone, or custom behaviors |
Version Required | Defaults | search(version="v2") |
version="v2"
behaves like normal search.project.update()
. They apply at the project level and influence all searches using version="v2"
.version="v2"
, Mem0 first retrieves relevant memories based on the query and your defined criteria.version="v2"
when performing searches with custom criteria.project.update()
version="v2"
to activate criteria-aware search