01Chapter 1: Where reranking fits: first-stage retrievalA reranker never searches the whole collection. It reorders a short list that another system has already produced. This chapter describes that first system, called first-stage retrieval, and shows why the reranker depends on it.3 min read
02Chapter 2: Why bi-encoder similarity is not enoughThis chapter assumes you know basic Python, text embeddings, vector similarity search, and the terms query, document, and relevance. It explains what a bi-encoder cannot represent. That limit is the reason rerankers exist.2 min read
03Chapter 3: How a cross-encoder reads query and passage togetherThis chapter assumes you know what text embeddings are, how vector similarity search works, and roughly what a transformer is. It builds on the previous chapter, where a bi-encoder's single-vector similarity missed fine-grained matches between a query and a passage.2 min read
04Chapter 4: Building a retrieve-then-rerank pipelineThis chapter assumes you can write basic Python, know what text embeddings and vector similarity search are, and have a general idea of what a transformer model is. It also assumes you know the retrieval terms query, document, and relevance.2 min read
05Chapter 5: Reading cross-encoder scoresThis chapter assumes you have built the retrieve-then-rerank pipeline from the previous chapter. You should be comfortable with NumPy arrays and with what a logit is (an unbounded number a model produces before any squashing function).2 min read
06Chapter 6: Measuring whether reranking helpsThis chapter assumes you can run the two-stage pipeline from the previous chapters and know what a query, a document, and a relevance label are. Here you will check whether the reranker improves results over the first stage alone.2 min read
07Chapter 7: How many candidates to rerankThis chapter assumes you can run the two-stage pipeline from the previous chapters. You should also know recall@k and MRR from the evaluation chapter. Here you will choose the candidate depth: the number of passages the first stage hands to the cross-encoder.2 min read
08Chapter 8: Input length, truncation, and chunkingThis chapter assumes you have built the retrieve-then-rerank pipeline from the earlier chapters and know what a token is. It covers what happens when a passage is too long for the cross-encoder, and how to handle it.3 min read
09Chapter 9: Latency, batching, and costThis chapter assumes you can run the retrieve-then-rerank pipeline from the earlier chapters. You should know what a bi-encoder and a cross-encoder are, and you should be comfortable with Python and sentence-transformers.3 min read
10Chapter 10: Failure modes and debuggingThis chapter assumes you have built a retrieve-then-rerank pipeline, can read cross-encoder scores, and know recall@k and MRR. It shows how to find which stage is failing when results look wrong.2 min read
11Chapter 11: Combining lexical and dense retrieval before rerankingThis chapter assumes you can run Python, know what a bi-encoder embedding is, and have built the retrieve-then-rerank pipeline from earlier chapters. Here you will improve the candidate pool that the cross-encoder sees.2 min read
12Chapter 12: Training data and hard negativesThis chapter assumes you know how a cross-encoder scores a query and passage together, how a bi-encoder retriever builds a candidate pool, and the basic vocabulary of query, passage, and relevance. You do not need to train a model to follow it.3 min read
13Chapter 13: Training objectives for rerankersThis chapter assumes you know how a cross-encoder scores a (query, passage) pair, what hard negatives are, and basic PyTorch tensors. The training objective, also called the loss, decides what the model learns from those pairs. Three families are common: pointwise, pairwise, and listwise.2 min read
14Chapter 14: Choosing and adapting a reranker modelThis chapter assumes you can run the two-stage pipeline from earlier chapters, know recall@k, MRR and nDCG, and have a rough idea of latency per candidate. Here you decide which cross-encoder to use and whether to adapt it.2 min read
15Chapter 15: Cross-encoders versus LLM-based rerankersThis chapter assumes you have built a retrieve-then-rerank pipeline with a cross-encoder, know how candidate depth affects latency, and can read recall@k, MRR, and nDCG. It compares the cross-encoder you already know with rerankers built on large language models (LLMs), and gives criteria for choosi3 min read