Expand description
Optional second-stage re-scoring of a fused recall pool (bring your own
cross-encoder/LLM). Never wired in by default — see rerank::Reranker.
Optional second-stage re-scoring of a MemoryService::recall_fused
candidate pool, the layer that lifts a ranking miss (a relevant fact deep
in the pool, below the fusion cutoff) into the final k — the lever
validated on the LoCoMo ceiling diagnostic (multi-hop recall@8 = 50%,
recall@64 = 89%: the gold fact is IN the pool, just outranked).
Mirroring the crate::embedder/crate::extract pattern, the
plug-point is dependency-free (bring your own cross-encoder or LLM by
implementing Reranker) and never wired in by default: a reranker
measurably helps ranking-bound corpora but can hurt on out-of-distribution
conversational queries (the LoCoMo panel’s own finding) — opt-in only,
never a silent default.
Enums§
- Rerank
Error - Failure produced by a
Rerankerbackend (e.g. a network-backed model that cannot be reached, or output that cannot be mapped back to candidates).
Traits§
- Reranker
- Re-scores or reorders a fused candidate pool against
query.
Type Aliases§
- DynReranker
- A boxed, object-safe reranker. Lets a non-generic caller (e.g. the Node
binding, wrapping a JS callback) hold
Box<dyn Reranker + Send + Sync>without threading a generic parameter throughMemoryService.