Files
mem0/docs/components
kartik-mem0 0842310eba fix(docs/rerankers): pass rerank=True so examples actually rerank
The reranker examples configured a `reranker` block but called
memory.search(...) without rerank=True. Memory.search() defaults rerank=False
(mem0/memory/main.py:1333) and only reranks 'if rerank and self.reranker'
(:1447), so reranking never ran:

- cohere, zero_entropy, llm, sentence_transformer print result['rerank_score'],
  which doesn't exist unless reranking runs -> KeyError on copy-paste.
- optimization (reranker benchmark) and custom-prompts (reranker-prompt test)
  silently measured un-reranked search.

Add the missing rerank=True flag to every search meant to exercise the reranker.
2026-06-27 12:31:12 +05:30
..