BM25 from scratch in Python: 27 lines, score-identical to rank_bm25 and up to 1.7x faster
A from-scratch BM25 matched rank_bm25 on 500 queries (max score difference 1.8e-13) and ran 1.7x faster on short queries. The idf formula changed 14 top-1 results.
Reciprocal Rank Fusion k=60: what the constant does, measured on real BM25 + vector runs
Swept RRF k from 0 to 1000 on 1,119 FastAPI doc queries: k=1 scored 4.1 MRR points above k=60 (0.733 vs 0.692). Past k=100 nothing changes.
Hybrid search in Python: BM25 + vectors with Reciprocal Rank Fusion, alpha swept 0 to 1
Tested BM25+RRF on 2,713 FastAPI doc chunks: BM25 beat vectors by 49 MRR points on identifiers; vectors beat BM25 by 24 on paraphrases. alpha=0.8 balanced both.