← All questions
RAGVery Hard· Recall· LambdaRank· Metric Selection

We are moving this reranker from a search surface score...

Concede the correct half: the architecture, the pair construction, and the lambda factorization are metric-agnostic and do carry over. Then locate the break. Recall@100 has no position discount, so for any swap with both documents above rank 100, or both below, the change in recall is zero; only boundary-crossing swaps change it. Substituting this for the NDCG gradient annihilates almost all of it. Propose the middle: keep the NDCG gradient, truncated at 100, dense over the region that matters and zero outside it. Also, consider if the generator is order-sensitive, as lost-in-the-middle effects make position inside the context matter.

Code playground (Python)