The problem / use case
Context: Rerankers live in src/retrieval_lab/scoring.py (LexicalReranker,
CrossEncoderReranker, plus none). MMR is a classic, dependency-free reranker.
What: Add an MMRReranker(lambda_) that reorders candidates by
λ·relevance − (1−λ)·max_sim_to_selected, wired into the CLI --rerank parser
(e.g. --rerank mmr).
Acceptance:
Pointers: follow LexicalReranker; keep it numpy-only (no new deps).
Proposed idea
Add a Maximal Marginal Relevance reranker that trades relevance against diversity, so the sweep can measure whether de-duplicating near-identical candidates helps recall@k.
The problem / use case
Context: Rerankers live in
src/retrieval_lab/scoring.py(LexicalReranker,CrossEncoderReranker, plusnone). MMR is a classic, dependency-free reranker.What: Add an
MMRReranker(lambda_)that reorders candidates byλ·relevance − (1−λ)·max_sim_to_selected, wired into the CLI--rerankparser(e.g.
--rerank mmr).Acceptance:
--rerank mmrruns in the sweep and shows up in the HTML reportnoneon a small set with near-duplicate candidatesCHANGELOG.mdupdatedPointers: follow
LexicalReranker; keep it numpy-only (no new deps).Proposed idea
Add a Maximal Marginal Relevance reranker that trades relevance against diversity, so the sweep can measure whether de-duplicating near-identical candidates helps recall@k.