You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enhancement: MMR (Maximal Marginal Relevance) diversity scoring in reranker #2090
Add Maximal Marginal Relevance (MMR) as a post-reranking diversity pass in ResultReranker. Currently the reranker blends cross-encoder + vector scores (#2004) but does not penalize redundant results — if 5 near-identical chunks score highly, all 5 are returned, wasting LLM context window.
Motivation
Inspired by MMR diversity scoring patterns used in multi-agent orchestration frameworks
AutoBot's existing diversity_threshold in advanced_rag_optimizer.py is binary dedup (drop if too similar) — MMR is a graded alternative that balances relevance vs. novelty
Direct improvement to RAG answer quality with minimal code change
Proposed Implementation
Add mmr_lambda to RerankWeights (default 0.0 = disabled, backward-compatible):
Activity
feat(rag): add MMR diversity scoring to reranker (#2090)
feat(rag): add MMR diversity scoring to reranker (#2090) (#2968)
mrveiss commentedon Mar 31, 2026
Merged in PR #2968. MMR diversity scoring added to reranker with configurable mmr_lambda.