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.
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
- Metadata filtering
- Multi-hop retrieval
- Multi-query retrieval
- Multi-tenancy
- Multi-vector retrieval
- Multimodal retrieval
- Nearest neighbour search
- nprobe
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.