Skip to main content

Module retrieval

Module retrieval 

Source

Functions§

recency_score
Compute a recency score using exponential decay. Returns a value in [0, 1] where 1 = just created, 0 = very old. half_life_hours controls decay rate (e.g., 168 = 1 week half-life).
reciprocal_rank_fusion
Reciprocal Rank Fusion: combines multiple ranked lists into a single fused ranking. Each item’s score = sum over all lists of 1/(k + rank_in_list). Items not present in a list are not penalized.
weighted_reciprocal_rank_fusion
Weighted Reciprocal Rank Fusion: combines multiple ranked lists with per-list weights. Each item’s score = sum over all lists of weights[i] / (k + rank_in_list + 1.0). If weights is empty or shorter than ranked_lists, uses 1.0 as default weight.