← Back to concept explainers

Concept Fable

Maximum Marginal Relevance

Conclusion first:Maximal Marginal Relevance, MMR, is a method for selecting retrieval results that balances relevance and diversity. It prioritizes documents that are both relevant to the query and not too repetitive with already selected results. In RAG, MMR is often used for context selection to avoid top-k being filled with homogeneous chunks, duplicate pages, or identical incident records, thereby improving the information coverage of a limited context window. It does not pursue the single highest score, but optimizes the combined value of a set of evidence.

Maximal Marginal Relevance, MMR · Retrieval

Read the story first. There is no rush to give a definition here; let the question grow on its own first.

Fable

The director no longer laid the same answer across the whole table

A researcher asked the archive: which customers will churn because of a failed upgrade? The retrieval system quickly pulled ten documents, all with high scores. But the curator frowned. Eight of the ten came from the same incident post-mortem, just with different titles and summaries. They were all relevant, but once they filled the table, there was no room for other risk signals. The craftsman first deleted duplicate documents. But the problem wasn't solved: the customer service records, tickets, meeting notes and patch notes from the same incident weren't exact duplicates, yet they all told the same angle. Someone suggested sorting by score alone. The higher the score, the higher it ranked. As a result, the evidence the agency read became increasingly concentrated, and the answers were confident but missed secondary causes like insufficient training, permission configuration and customer communication.

Later the curator changed the table-setting rule. Every time a new piece of material was added, two questions had to be asked: how relevant is it to the question; and how different is it from the material already on the table.

On first application, the whole setup did not put all ten records of the same incident into context, but retained one retrospective, one work order, one customer email, one version note and one renewal risk record.

The agency's answer changed. It no longer just said 'upgrade failure caused churn'—it could break out technical failures, communication cadence, compensation plans, and client internal approval delays.

The curator reminded the team: diversity is not for looking good, but for allowing limited context to cover more complementary evidence. Relevant but repetitive material steals the positions that could hold truly incremental information.

From then on, the archive desk no longer pursued making every sheet look most like the question, but rather making the whole most helpful for answering the question.

When the new rule was first introduced, the researcher was not used to it. He was accustomed to taking away all the highest-scoring papers, thinking that a slightly lower score meant poor quality. The director had him paste ten papers on the wall by reason, and only then did he see that high-scoring papers often merely restated each other.

Later the archive left a note for each paper selection: which angle this one supplemented, and which duplicate material it replaced. The limited desktop was managed as a scarce resource, and answers expanded from a single incident to a complete causal chain.

Reveal

This story is about: maximum marginal relevance

Maximal Marginal Relevance, MMR, is a method for selecting retrieval results that balances relevance and diversity. It prioritizes documents that are both relevant to the query and not too repetitive with already selected results. In RAG, MMR is often used for context selection to avoid top-k being filled with homogeneous chunks, duplicate pages, or identical incident records, thereby improving the information coverage of a limited context window. It does not pursue the single highest score, but optimizes the combined value of a set of evidence.

What matters is that it is not just a term, but a structural problem that repeatedly appears in real AI / Agent systems. Understanding it lets you judge when to add a model, when to change a process, and when to add governance.

Metaphor mapping

  • Ten high-scoring documents: top-k results ranked purely by similarity
  • Multiple records of the same incident: candidate chunks that are semantically similar but not exact duplicates
  • Deduplicating documents: can only handle literal duplication, not information redundancy
  • Two things: MMR considers both query relevance and diversity
  • Retain different types of evidence: let context cover complementary information
  • Limited context: the hard constraints of token windows and cost in enterprise Agents
  • The whole best answers the question: MMR optimizes the result set, not a single highest score

Andy Ren Xu's judgment

The practical value of this concept is that it helps you break "AI features that look smart" into deliverable, verifiable, and governable units of work.

diversificationreranking

Related distinctions

This concept is easily confused with adjacent concepts; it is recommended to continue to the comparison page.

京ICP备2026014272号