cloudflare / cloudflare/workerd

Feature Request: Support for Maximal Marginal Relevance (MMR) in Vectorize

Open
#6,543 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
8.7k
Forks
739
Avg merge
2d 20h
Merged PRs (30d)
174

Description

Hello,

I’d like to request support for Maximal Marginal Relevance (MMR) in Vectorize.

MMR is a well-known technique for improving result diversity while maintaining relevance in vector search. It helps reduce redundancy in retrieved results by balancing similarity with novelty. For reference, see:
https://www.cs.cmu.edu/~jgc/publication/The_Use_MMR_Diversity_Based_LTMIR_1998.pdf

I’ve reviewed the current documentation and API reference but couldn’t find any indication that MMR is supported. If it already exists, I’d appreciate guidance on how to use it.

If it’s not currently supported, I believe this would be a valuable addition to Vectorize. Since MMR operates as a post-retrieval re-ranking step, it could potentially be implemented as an optional relevance/diversity filtering layer on top of existing similarity search results.

Proposed capability:
- Optional MMR-based re-ranking for query results
- Configurable trade-off parameter (e.g., lambda) between relevance and diversity
- Seamless integration with existing query APIs

This would significantly improve use cases like RAG pipelines, search result diversification, and recommendation systems.

Contributor guide

Open the contributing guide

Research direction

The issue names no files, tests, or entry points. Start by locating Vectorize’s existing query API and determine how optional MMR re-ranking and a configurable lambda would fit; done means the proposed capability is defined, integrated with queries, and covered by appropriate tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend-api-design, search
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.