medium severityMilvus hybrid_search WeightedRanker

Unexpected ranking order changes in hybrid search results using WeightedRanker despite balanced weights (e.g., 0.5,0.5). Items with high variance scores (e.g., 0.1 and 0.9) rank lower than low-variance items (0.39, 0.6) post-normalization, reversing intuitive weighted sum expectations. Raw scores look correct individually, but fused ranking mismatches manual calculations.

Root cause

Milvus WeightedRanker/Reranker automatically normalizes raw similarity scores from different search paths (e.g., IP metric) to [0,1] using `0.5 + arctan(score)/π` before applying weights. This compresses score ranges nonlinearly, inverting relative rankings for certain distributions (e.g., low variance vs. high variance scores), as raw weighted sum would preserve original order but normalized does not. No disable option pre-2.6.x.

Milvushybrid searchWeightedRankerscore normalizationarctanranking inversion

Citations