In short.
Mem0's reranker configuration page is a settings reference for developers building AI memory search, but Python and TypeScript configurations are not interchangeable. It covers Cohere, Zero Entropy, Sentence Transformer, Hugging Face and LLM reranking options. TypeScript uses camelCase keys, provider SDK dependencies and ONNX-compatible local models; batchSize and showProgressBar have no effect there. The page also presents two LLM configuration tables without explaining their relationship. Search quality, runtime compatibility, costs and license terms remain unknown.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage includes the complete documentation page at [https://docs.mem0.ai/components/rerankers/config], including its parameter tables, environment variables, Python and TypeScript examples, TypeScript compatibility note and page metadata. Linked guides, provider documentation, model documentation, repository files and release notes are excluded. No code was installed or executed. Runtime compatibility, search quality and performance remain unassessed; pricing and license grants are not established by this page.
The overview
Resource identity
This is the reranker configuration reference in Mem0's Open Source documentation, available at [https://docs.mem0.ai/components/rerankers/config]. The resource is the documentation page itself, covering shared settings, provider-specific settings, environment variables and Python/TypeScript examples.
Practical assessment
The page is useful when adding or adjusting a reranker in an existing Mem0 integration. Its strongest practical detail is the distinction between Python and TypeScript: configuration names, local model defaults and effective options differ.
It assumes an understanding of the surrounding Mem0 setup. The Python example defines a configuration object, and the TypeScript example creates a Memory instance; neither demonstrates a search request or its results. The page therefore supports configuration decisions without establishing search improvements.
Who it helps
The reference is best suited to developers configuring Mem0 in Python or the self-hosted TypeScript SDK imported through mem0ai/oss. Experienced developers can use the parameter tables to inspect defaults and plan SDK migrations.
Beginners will need familiarity with configuration objects, environment variables and package installation. The page explains individual options but provides little introductory explanation of retrieval or how to measure relevance.
Documented options
The shared table requires a provider name and documents top_k as the maximum number of results returned after reranking. Both top_k and api_key default to None. Zero Entropy lists zerank-1 as its default model and zerank-1-small as another option. Cohere lists rerank-v3.5, return_documents defaulting to False and an optional max_chunks_per_doc.
The Python Sentence Transformer table defaults to cross-encoder/ms-marco-MiniLM-L-6-v2 and exposes device, batch_size with a default of 32, and show_progress_bar defaulting to False. The Hugging Face table defaults to BAAI/bge-reranker-large and exposes an API token and device setting.
LLM scoring settings include a model, provider, API key, temperature, response token limit and custom scoring_prompt. A separate LLM Reranker table documents nested llm.provider and llm.config fields plus top_n.
Using it
Dependencies and prerequisites
For TypeScript, the page identifies provider SDKs as peer dependencies installed for the chosen reranker: cohere-ai for Cohere, zeroentropy for Zero Entropy, and @huggingface/transformers for either local cross-encoder provider. The llm_reranker option uses the chosen LLM provider's own SDK.
Service integrations use provider credentials. Local model options expose device configuration, with cpu and cuda given as examples in the Python tables. Supported Mem0 releases, Python and Node versions, complete Python dependencies, and minimum memory or accelerator requirements are unspecified.
How the settings work
Reranking changes the ordering of search results, and top_k limits how many results are returned afterward. The examples place the selected implementation under reranker.provider and its options under reranker.config. The page does not describe candidate retrieval, scoring formulas or how many candidates are processed.
The LLM-based table describes using a language model for scoring, with documented defaults of openai, gpt-5-mini, temperature 0.0 and max_tokens 100. The TypeScript local cross-encoder providers run through Transformers.js using ONNX model mirrors. These are documented mechanisms and defaults; their runtime behavior was not assessed.
Configuration steps
Choose the SDK language and reranker provider, then add the reranker object to the Mem0 configuration. Python examples use snake_case fields such as api_key and top_k. TypeScript uses camelCase fields such as apiKey, topK and maxLength.
The documented credential environment variables are ZERO_ENTROPY_API_KEY, COHERE_API_KEY, HUGGINGFACE_API_KEY, OPENAI_API_KEY and ANTHROPIC_API_KEY. The TypeScript example explicitly passes process.env.ZERO_ENTROPY_API_KEY as apiKey.
The TypeScript dependency commands shown are pnpm add cohere-ai, pnpm add zeroentropy and pnpm add @huggingface/transformers, depending on the provider. The page does not supply a complete installation procedure for the surrounding application.
What the examples show
The Python example defines a Chroma vector store with collection_name my_memories and path ./chroma_db, an OpenAI LLM using gpt-5-mini, and a zero_entropy reranker using zerank-1 with top_k set to 5. These are example selections; the page does not establish them as requirements for every configuration.
The TypeScript example imports Memory from mem0ai/oss and constructs an instance with provider zero_entropy, apiKey supplied from the environment and topK set to 5. Both examples show configuration rather than a completed search journey. Neither includes output, and neither was executed.
Assessment & evidence
Important limitations
TypeScript's local defaults are Xenova/ms-marco-MiniLM-L-6-v2 and Xenova/bge-reranker-base. The page says Python model strings must be replaced with ONNX-compatible equivalents. In particular, the documented Hugging Face defaults differ between Python and TypeScript, so identical provider names do not establish identical model behavior.
The TypeScript runtime accepts batchSize and showProgressBar for parity with Python, but both settings have no effect.
The LLM-based and LLM Reranker tables use different configuration structures. The page does not explain their relationship, when each applies, or how top_n relates to the shared top_k setting. It also supplies no relevance benchmarks, latency measurements or verified SDK compatibility results.
Choosing an approach
The documented options make SDK language and deployment requirements central to the choice. API routes introduce provider credentials and service dependencies, while the TypeScript local routes introduce Transformers.js and compatible model requirements. These differences support a practical comparison, but the page provides no measurements establishing which option is faster, cheaper or more accurate.
top_k controls the returned result count. The page does not connect that count to the number of candidates scored, processing time or billing, so reducing it cannot be assumed to reduce reranking cost.
Documented alternatives
Within Mem0, the page presents Cohere and Zero Entropy service configurations, Sentence Transformer and Hugging Face model configurations, and LLM reranking. Cohere exposes document-return and chunk settings; Sentence Transformer exposes Python batching controls; LLM-based scoring exposes a custom prompt.
These are alternative configuration paths, with no head-to-head evaluation supplied. Reranking tools outside those named on this page are not assessed.
Evidence and confidence
The source is Mem0's configuration reference at [https://docs.mem0.ai/components/rerankers/config]. Its parameter tables support the documented option names and defaults, while its examples support the illustrated configuration structures.
The TypeScript note explicitly establishes the ONNX model requirement and the two ineffective settings. Configuration tables and examples do not establish successful execution, model availability, search quality or production suitability. Linked implementation files and guides are outside this page.
Access & freshness
Costs
The page provides no prices, free allowances, rate limits or billing examples. Charges for provider APIs and LLM scoring are unknown. Local model deployment and compute costs are also unspecified; local execution does not establish that an integration has no operating cost.
Licenses and terms
The page contains no license text establishing reuse or redistribution rights for the documentation, SDK code or named model weights. Its Open Source navigation label does not establish the applicable license terms.
Commercial-use permissions, model restrictions, API service terms and provider data-handling terms are unknown from this page. Each dependency and service requires its own applicable terms.
Dates and version coverage
The page metadata reports a last modification date of 31 July 2026. The supplied page capture is dated 24 November 2026. Neither date identifies the Mem0 SDK release to which every table applies.
The model identifiers are the page's documented defaults. Their current availability and compatibility with a particular installed SDK version are unknown.
Before adopting the configuration
Identify your SDK language and Mem0 version, then confirm the matching provider configuration. For TypeScript local models, use compatible ONNX identifiers and account for batchSize and showProgressBar having no effect. Resolve the applicable LLM configuration structure before copying either LLM table.
Check the chosen provider's pricing, data-handling terms and licenses for the SDK and model. Evaluate representative memory searches to establish relevance, latency and operating cost for your application; this page supplies no measured results for those decisions.
