Skip to main content

rbc

Function rbc 

Source
pub fn rbc<I: Clone + Eq + Hash>(
    results_a: &[(I, f32)],
    results_b: &[(I, f32)],
) -> Vec<(I, f32)>
Expand description

Rank-Biased Centroids (RBC) fusion.

Handles variable-length lists gracefully by using a geometric discount that depends on list length. More robust than RRF when lists have very different lengths.

Formula: score(d) = Σ (1 - p)^rank / (1 - p^N) where:

  • p is the persistence parameter (default 0.8, higher = more top-heavy)
  • N is the list length
  • rank is 0-indexed

From Bailey et al. (2017). Better than RRF when lists have different lengths.