Fine-Tuning, and When Not ToLesson 59 of 84

Module 7 · Fine-tuning beyond a chat model

Training a reranker

In this lesson

  • 8 min read
  • 6 reading sections
  • Knowledge check
  • Lesson 2 of 9 in this chapter

This chapter’s goalAdapt an embedding model, a reranker, a text classifier, a speech model, a vision-language model or an image generator, and name in each case what differs from fine-tuning a text LM and which cheaper technique should be tried first.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available
Reranking, measured on the same candidatesBi-encoder plus BM25 alone0.61Plus an off-the-shelfreranker0.74Plus a reranker fine-tunedon your data0.79NDCG@10The off-the-shelf cross-encoder delivered most of the gain and cost nothing. Measure the pretrainedone before you train your own, and mine your negatives from your retriever’s real output rather thanat random.
The off-the-shelf cross-encoder delivered most of the gain and cost nothing. Measure the pretrained one before you train your own, and mine your negatives from your retriever's real output rather than at random.

Figure

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 7Free · no account needed
Lesson steps

Why a cross-encoder is better

An embedding model encodes the query and the passage separately, into two vectors that are compared afterwards. Whatever the passage says about the query has to survive being compressed into a fixed vector before the query is ever seen.

A cross-encoder puts both into the model at once ([query] [SEP] [passage]) and produces one relevance score. Every token of the query can attend to every token of the passage. That is why rerankers beat bi-encoders consistently, often by a wide margin on the harder queries.

The price is that the score cannot be precomputed. A bi-encoder embeds your corpus once, and a query is one vector comparison against an index. A cross-encoder must run the model once per candidate, at query time.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the Running Models Yourself exam.

Stuck on something?Ask Rafael, your AI tutor

How to cite: Addaly (2026) ‘Training a reranker’, in Fine-Tuning, and When Not To. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/fine-tuning/training-a-reranker (Accessed: 29 November 2026).