Skip to content

Conversation

@majiayu000
Copy link

Summary

  • Fixed all LLM reranker configuration examples to use flat structure instead of nested "llm" key
  • Updated Configuration Parameters table to match actual LLMRerankerConfig fields

Fixes #3803

Problem

The documentation examples were using a nested structure:

"config": {
    "llm": {
        "provider": "openai",
        "config": {"model": "gpt-4", ...}
    }
}

But LLMRerankerConfig expects a flat structure:

"config": {
    "provider": "openai",
    "model": "gpt-4",
    "api_key": "...",
    ...
}

Changes

  • docs/components/rerankers/models/llm_reranker.mdx: Updated all config examples
  • docs/open-source/features/reranker-search.mdx: Updated LLM reranker example

Test Plan

  • Verified config structure matches LLMRerankerConfig class in mem0/configs/rerankers/llm.py
  • Verified config usage in LLMReranker.__init__() in mem0/reranker/llm_reranker.py
Fixes mem0ai#3803

The documentation examples were using a nested "llm" key structure:
```python
"config": {
    "llm": {
        "provider": "openai",
        "config": {"model": "gpt-4", ...}
    }
}
```

However, the actual LLMRerankerConfig class expects a flat structure:
```python
"config": {
    "provider": "openai",
    "model": "gpt-4",
    "api_key": "...",
    ...
}
```

This PR updates all configuration examples in:
- docs/components/rerankers/models/llm_reranker.mdx
- docs/open-source/features/reranker-search.mdx

Also updated the Configuration Parameters table to match the actual
LLMRerankerConfig fields (provider, model, api_key, top_k, temperature,
max_tokens, scoring_prompt).
@CLAassistant
Copy link

CLAassistant commented Dec 13, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants