bm25-bert ranks the top 20 BM25 candidates with a blend but reports the pure cosine as the score
DecisionVerified 1 Oct 2026Holds project: rkb
Decision. The context, the choice, why, and the options that were turned down.
Context#
The bm25-bert backend reranks BM25 candidates with an embedding model. The hooks threshold the reported relevance to decide that no lesson fits.
Decision#
Rerank only the top 20 BM25 candidates. Rank them with a blend of the embedding cosine and a BM25-rank term. Report the pure embedding cosine as the relevance score. Never threshold on the blended score. Keep ranking order and injection score as two separate values. Keep plain bm25 as its own backend, so the two compare on the same labeled failures.
Why#
Mixing the BM25 rank into the score gave a better ranking. It also wrecked the "no lesson fits" signal that the hooks need for abstention.
Rejected options#
One blended number used for both order and thresholds.
Also found by searching
- why does the bm25-bert relevance score not match the ranking order
- can I threshold the hook on the blended bm25-bert score
- how many candidates does bm25-bert rerank
- why keep plain bm25 as a backend next to bm25-bert