AI engineering glossary · RAG vector search

What is MMR (maximal marginal relevance)?

Maximal marginal relevance (also called MMR): A selection method that picks results that are both relevant to the query and different from those already chosen, using a weight between the two. It reduces near-duplicate passages and increases the variety of information sent to the model.

Level: advancedTopic: RAG vector search

Maximal marginal relevance: an example

With lambda = 0.7, the second pick is a passage on a new sub-topic rather than a copy of the first.

Related terms

More RAG vector search terms

Where you learn it

Maximal marginal relevance is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.