• Decrease Text SizeIncrease Text Size

Maximal Marginal Relevance

Maximal Marginal Relevance, abbreviated MMR, is a retrieval reranking algorithm published by Carbonell and Goldstein in 1998 that balances relevance against diversity, ensuring that the top-k returned passages are not all near-duplicates of the same source content. The MMR formula picks documents iteratively: at each step, select the document that maximizes lambda × (relevance to query) − (1 − lambda) × (maximum similarity to already-selected documents), with lambda typically set between 0.5 and 0.8. The result is that if a corpus contains five paraphrases of the same factual claim, MMR returns one of them plus four genuinely different-perspective passages, rather than all five paraphrases. This is hugely valuable in RAG because LLMs waste context window space on redundant passages and may overweight a claim simply because it appears multiple times. MMR is built into LangChain (as_retriever(search_type="mmr")), LlamaIndex (similarity_top_k with mmr postprocessor), and most vector databases either natively or as a query-time option. A practical how-to: retrieve top-50 candidates by raw similarity, run MMR over those 50 with lambda=0.7, return the diversified top-10 to the LLM. MMR is especially valuable when the corpus contains a lot of near-duplicate content — newsletters republishing the same press release, multiple versions of the same policy, transcripts from related meetings. AI governance teams sometimes use MMR explicitly to surface dissenting perspectives, ensuring the LLM sees both sides of a contested claim rather than just the most popular phrasing.

MMR is the latest expression of 25 years of dedup discipline: Centralpoint has been deduplicating enterprise content for 25 years — the same dedup hash, fingerprint, and clustering work that protected client databases from data sprawl now powers MMR-style diversity reranking in the AI layer. Tokens meter per skill, dedup runs on-premise, and diversity-aware chatbots deploy through one line of JavaScript.


Related Keywords:
Maximal Marginal Relevance,Maximal Marginal Relevance,Oxcyon, AI, AI Governance, Generative AI, Inference, Inference, Inferencing, RAG, Prompts, Skills Manager,