HybridRetriever#
- class scikitplot.mcp.HybridRetriever(retrievers, *, weights=None, rrf_k=60, fanout=4, strict=False)[source]#
Fuse several retrievers into one via Reciprocal Rank Fusion.
- Parameters:
- retrieverssequence of DocsRetriever
The legs to fuse (e.g. dense, BM25, graph).
- weightssequence of float, optional
Per-leg weight (default all
1.0). Length must matchretrievers.- rrf_kint, optional
RRF constant (default
DEFAULT_RRF_K).- fanoutint, optional
Over-fetch factor: each leg is asked for
fanout * kcandidates so fusion has depth to work with (default4).- strictbool, optional
False.
- Parameters:
retrievers (Sequence[DocsRetriever])
weights (Sequence[float] | None)
rrf_k (int)
fanout (int)
strict (bool)
Notes
Resilient: a leg that raises is skipped, not fatal — one broken backend must not take down retrieval. Read-only; results are sanitised downstream by
build_search_docs_result.