AI Visibility Guide
Chapter 11- Ranking and Reranking
Chapter Goal
In Chapters 7–10, we focused mainly on finding candidates.
We learned several ways to do that:
Lexical Retrieval
→ exact words and term statistics
Dense Retrieval
→ semantic similarity
Hybrid Retrieval
→ combines both
A simplified pipeline now looks like:
User Query
↓
Candidate Generation
↓
Candidate Set
↓
???
↓
Final Results
The missing question is:
Once we have candidates, how do we decide which ones are actually the best?
Suppose hybrid retrieval produces:
Document A
Document B
Document C
Document D
Document E
Finding these candidates is not enough.
The system must determine:
Which document is most relevant?
Which should appear second?
Which candidate only looks relevant superficially?
Which candidate best satisfies the user's actual intent?
This is the job of ranking.
Sometimes an initial retrieval system already assigns scores and produces an order.
But that first ordering can be improved by a more expensive model that examines a much smaller candidate set.
That second stage is called reranking.
The central pipeline of this chapter is:
Large Corpus
↓
Fast Retrieval
↓
Candidate Set
↓
Initial Ranking
↓
Reranking
↓
Final Ranked Results
By the end of this chapter, you should understand:
- what ranking is;
- what a ranker is;
- what a ranking score is;
- how ranking differs from retrieval;
- why retrieval systems use multiple stages;
- what first-stage ranking means;
- what reranking is;
- why reranking can be more computationally expensive;
- what a cross-encoder is;
- how cross-encoders differ from bi-encoders;
- why joint query–document processing can improve relevance estimation;
- what ranking features are;
- what Learning to Rank means;
- what pointwise, pairwise, and listwise ranking mean conceptually;
- how lexical, semantic, freshness, authority, and other signals can influence ranking;
- how ranking differs from factual verification;
- how reranking fits into hybrid retrieval and RAG;
- and why ranking quality matters for AI Visibility.
1. Candidate Generation Is Not the Final Decision
Recall the hybrid retrieval pipeline:
User Query
├──→ Lexical Retrieval
└──→ Dense Retrieval
↓
Fusion
↓
Candidate Set
Suppose the result is:
A
B
C
D
E
F
These documents are:
potentially relevant
not necessarily:
correctly ordered
Candidate generation answers:
Which documents are worth considering?
Ranking answers:
Which of those documents should come first?
This distinction is fundamental.
2. What Is Ranking?
Ranking is the process of ordering candidate items according to an estimated measure of relevance, usefulness, or another objective.
Candidate Set
↓
Evaluate Candidates
↓
Assign Scores
↓
Sort
↓
Ranked Results
For example:
Candidate Set:
A
B
C
D
After ranking:
1. C
2. A
3. D
4. B
The system has transformed:
unordered or weakly ordered candidates
into:
an ordered result list
3. What Is a Ranker?
A ranker is the component or model responsible for assigning ranking scores or producing an ordering.
Query
+
Candidate Document
↓
Ranker
↓
Relevance Score
For multiple candidates:
Query
+
A
B
C
D
↓
Ranker
↓
A → 0.76
B → 0.31
C → 0.91
D → 0.62
Then:
1. C
2. A
3. D
4. B
The exact meaning of the scores depends on the ranking system.
4. Ranking Score
A ranking score is a numerical value used to help determine result order.
For example:
Document A → 8.7
Document B → 4.2
Document C → 9.5
Therefore:
C > A > B
But remember:
Ranking Score
≠
Probability of Truth
and usually:
Ranking Score
≠
Universal Score
A score of:
9.5
in one ranker cannot automatically be compared with:
9.5
from another ranking system.
5. Retrieval vs. Ranking
Retrieval
Huge Corpus
↓
Find Potential Candidates
Question:
What should we consider?
Ranking
Candidates
↓
Evaluate and Order
Question:
Which candidates are best?
So:
Retrieval
→ reduces the search space
Ranking
→ orders what survived
6. Retrieval Often Already Produces an Initial Ranking
The distinction is conceptually useful, but real systems can overlap.
For example, BM25 retrieval does not merely find documents.
It also assigns scores:
Doc A → BM25 14.2
Doc B → BM25 10.3
Doc C → BM25 6.9
Dense retrieval similarly produces similarity scores:
Doc A → 0.91
Doc B → 0.84
Doc C → 0.66
So retrieval systems often produce an initial ranking.
Retrieval
↓
Candidates + Initial Scores
↓
Initial Ranking
The next question is whether that initial ranking is good enough.
Often, it is not.
7. First-Stage Ranking
The ranking produced during initial retrieval is often called first-stage ranking.
The first stage needs to process a very large search space.
Therefore it usually prioritizes:
speed
scalability
reasonable relevance
rather than maximum precision.
For example:
10,000,000 Documents
↓
BM25 / Dense / Hybrid Retrieval
↓
Top 500 Candidates
That first stage must be fast.
It cannot usually perform an extremely expensive analysis of all ten million documents.
8. Why Multi-Stage Ranking Exists
Suppose we have:
10,000,000 documents
An advanced relevance model takes:
50 milliseconds
to deeply evaluate one query–document pair.
Running it against all documents would be impractical.
Instead:
10,000,000 Documents
↓
Fast Retriever
↓
500 Candidates
↓
More Expensive Ranker
↓
50 Candidates
↓
Even Stronger Reranker
↓
Top 10
This is a multi-stage ranking pipeline.
Early Stages
→ cheap and broad
Later Stages
→ expensive and precise
9. What Is Reranking?
Reranking is the process of taking an existing candidate set or ranked list and evaluating it again using a stronger or different relevance model.
Initial Ranked Candidates
↓
Reranker
↓
Improved Ranking
For example:
Initial retrieval:
1. A
2. B
3. C
4. D
After reranking:
1. C
2. A
3. B
4. D
The candidates may remain the same.
What changes is:
their order
10. Why Reranking Can Be Better
Initial retrieval uses relatively limited evidence.
For example:
BM25
→ term statistics
or:
Dense Retrieval
→ precomputed embedding similarity
A reranker can examine the relationship between the query and candidate in more detail.
Instead of asking only:
Are these embeddings close?
it can ask something closer to:
How well does this exact document satisfy this exact query?
That deeper comparison can improve precision.
11. Bi-Encoder Review
Chapter 9 introduced the bi-encoder.
A bi-encoder processes query and document separately:
Query
↓
Encoder
↓
Query Vector
and:
Document
↓
Encoder
↓
Document Vector
Then:
Query Vector
↔
Document Vector
↓
Similarity Score
Its main advantage is efficiency.
Document vectors can be precomputed.
This makes bi-encoders excellent for:
large-scale candidate generation
But separate encoding creates a limitation.
12. The Limitation of Separate Encoding
When a document is embedded in advance, the embedding model does not know which future query will be asked.
It creates one general-purpose document representation.
Document
↓
One Dense Vector
That vector may need to represent many aspects of the document.
Then different queries compare against the same representation.
This is efficient.
But it limits how deeply the model can analyze:
this specific query
against
this specific document
This motivates another architecture:
the cross-encoder.
13. What Is a Cross-Encoder?
A cross-encoder processes the query and candidate document together.
Instead of:
Query → Vector A
Document → Vector B
Compare A and B
we do:
Query
+
Document
↓
Model
↓
Relevance Score
For example:
Query:
How can I stop automatic renewal?
Candidate:
To disable auto-renew, open Billing Settings...
The model receives both together.
It can directly examine their relationship.
14. Bi-Encoder vs. Cross-Encoder
Bi-Encoder
Query
↓
Vector
Document
↓
Vector
↓
Similarity
Advantages:
fast
scalable
document embeddings can be precomputed
Best suited for:
candidate generation
Cross-Encoder
Query + Document
↓
Joint Processing
↓
Relevance Score
Advantages:
deeper query–document interaction
more precise relevance estimation
But:
more computationally expensive
Best suited for:
reranking smaller candidate sets
15. Why Cross-Encoders Are More Expensive
Suppose we have:
1,000,000 documents
With a bi-encoder:
Document Embeddings
→ already stored
New Query
→ embed once
Then
→ vector search
With a cross-encoder:
Query + Document 1
→ model
Query + Document 2
→ model
Query + Document 3
→ model
...
Each query–document pair requires processing.
So running a cross-encoder over millions of documents is usually expensive.
But running it over:
Top 50
Top 100
Top 500
candidates can be practical.
16. Joint Query–Document Interaction
Why can cross-encoders rank more precisely?
Because query and document tokens can interact during model processing.
Query Tokens
↕
Document Tokens
↓
Joint Contextual Processing
↓
Relevance Judgment
Suppose the query is:
Apple repair in Toronto
Candidate A:
Apple iPhone repair services in Toronto.
Candidate B:
How to repair apple trees in Ontario.
A stronger joint model can use context to better distinguish:
Apple company
from:
apple fruit/tree
17. Reranking Example
Suppose hybrid retrieval returns:
1. Apple repair guide
2. Toronto phone repair shop
3. Apple tree maintenance
4. iPhone and Mac repair Toronto
The initial ranking may be noisy.
A cross-encoder reranker examines each candidate with:
Query:
Apple repair Toronto
and might produce:
iPhone and Mac repair Toronto → 0.96
Toronto phone repair shop → 0.81
Apple repair guide → 0.63
Apple tree maintenance → 0.08
New ranking:
1. iPhone and Mac repair Toronto
2. Toronto phone repair shop
3. Apple repair guide
4. Apple tree maintenance
The reranker corrected the initial ordering.
18. Reranking Does Not Usually Search the Whole Corpus
This distinction matters.
A reranker normally receives:
existing candidates
It does not usually perform:
full corpus retrieval
Retriever
→ finds candidates
Reranker
→ reevaluates candidates
If the correct document never reaches the candidate set:
Reranker
cannot rescue it
This is why retrieval recall remains important.
19. Retrieval Recall and Ranking Precision
This creates a useful division of responsibility.
Early retrieval should avoid missing useful documents.
So it often emphasizes:
recall
Later reranking tries to put the best documents at the top.
So it often emphasizes:
precision at the top
Retriever
→ Don't miss good candidates
Reranker
→ Put the best candidates first
This is one of the most useful mental models for multi-stage retrieval.
20. Ranking Can Use More Than Text Similarity
A ranking system does not have to use only:
BM25
or:
embedding similarity
It may combine many signals.
Examples:
lexical relevance
semantic relevance
freshness
document quality
authority
location
language
popularity
personalization
structured metadata
The exact signals depend on the application.
For example, local search might strongly care about:
distance
location
business category
while news search may care heavily about:
freshness
21. Ranking Features
A ranking feature is an input signal used to help determine ranking.
Suppose the query is:
Persian dentist Toronto
Possible features could include:
BM25 score
dense similarity
city match
category match
document freshness
business rating
distance
Candidate
↓
Multiple Features
↓
Ranking Model
↓
Score
The system can learn or define how much each feature matters.
22. Retrieval Score vs. Ranking Features
A retrieval score can itself become one ranking feature.
For example:
BM25 Score
Dense Score
Freshness Score
Authority Score
↓
Final Ranker
So BM25 does not need to disappear after candidate generation.
Its score can continue to contribute later.
The same applies to dense similarity.
23. What Is Learning to Rank?
Learning to Rank, often abbreviated LTR, refers to machine-learning approaches that learn how to order results using training data.
Instead of manually specifying:
BM25 × 0.4
Freshness × 0.2
Authority × 0.4
a model can learn useful relationships from examples.
Queries
+
Candidate Documents
+
Relevance Labels / User Signals
↓
Training
↓
Ranking Model
Then:
New Query
+
Candidates
↓
Ranking Model
↓
Ordered Results
24. Where Do Ranking Labels Come From?
Training data may contain relevance judgments such as:
Query
Document
Relevance
For example:
Query:
Persian dentist Toronto
Document A → Highly Relevant
Document B → Somewhat Relevant
Document C → Irrelevant
Labels may come from sources such as:
human relevance judgments
expert annotations
historical user interactions
click data
task-specific feedback
But user behavior data can contain bias and noise.
For example:
clicked
≠
necessarily most relevant
So training signals must be interpreted carefully.
25. Pointwise Ranking
One conceptual approach is pointwise ranking.
The model evaluates each query–document pair independently.
Query + Document A
↓
Score 0.91
Query + Document B
↓
Score 0.63
Query + Document C
↓
Score 0.20
Then results are sorted by score.
The model asks something like:
How relevant is this candidate?
26. Pairwise Ranking
In pairwise ranking, the model focuses on comparing two candidates.
For this query:
Is A better than B?
Then:
A > B
or:
B > A
Training can use many such comparisons to learn a useful ranking function.
The focus is:
relative preference
rather than an isolated score.
27. Listwise Ranking
In listwise ranking, the ranking problem is treated more directly as ordering an entire group of candidates.
Query
+
[A, B, C, D]
↓
Ranking Model
↓
[C, A, D, B]
The objective concerns the quality of the result list itself.
You do not need the mathematical details here.
The important distinction is:
Pointwise
→ score each item
Pairwise
→ compare items
Listwise
→ optimize the ordered list
28. Cross-Encoder Reranking vs. Learning to Rank
These concepts can overlap but are not identical.
A cross-encoder describes a model architecture:
Query + Document
↓
Joint Model
↓
Score
Learning to Rank describes a broader training approach for ordering results.
A ranking system could use:
traditional LTR
neural rerankers
cross-encoders
specialized ranking models
depending on the application.
Cross-Encoder
≠
Learning to Rank
although a cross-encoder can be trained for ranking.
29. Reranking After Hybrid Retrieval
Now connect Chapter 10 directly to Chapter 11.
Hybrid retrieval:
BM25
+
Dense Retrieval
↓
Fusion
↓
200 Candidates
Then:
200 Candidates
↓
Cross-Encoder / Reranker
↓
Top 20
This is a common conceptual architecture:
Broad Retrieval
↓
Strong Candidate Coverage
↓
Precise Reranking
↓
High-Quality Top Results
30. Why Top Results Matter So Much
Suppose the correct document is ranked:
#2
versus:
#87
Technically, the retrieval system found it in both cases.
But practically, those outcomes are very different.
Users may inspect only:
top few results
and downstream AI systems may only pass:
top 5
top 10
top 20
documents into later stages.
Being Retrieved
≠
Being Highly Ranked
This distinction becomes important for AI Visibility.
31. Ranking and the Context Window
Suppose a RAG system retrieves:
100 passages
but can only place:
8 passages
into the LLM context.
Then ranking determines:
which 8 survive
100 Candidates
↓
Ranking / Reranking
↓
Top 8
↓
LLM Context
So ranking can directly influence which evidence the LLM sees.
32. Ranking Errors Can Become Generation Errors
Suppose:
Passage A
→ correct and highly relevant
Passage B
→ partially relevant but outdated
If ranking produces:
B > A
and only B enters the context, the LLM may generate a worse answer.
Ranking Error
↓
Wrong Evidence Selected
↓
Possible Generation Error
The LLM cannot use evidence it never receives.
33. Relevance Is Not the Only Ranking Objective
Depending on the system, final ranking may optimize for more than pure topical relevance.
A system may also care about:
freshness
authority
diversity
geographic suitability
safety
personalization
source quality
For example, consider:
latest tax rules Netherlands
A highly relevant article from:
2019
may be less useful than an equally relevant document from:
2026
Freshness therefore becomes important.
35. Relevance vs. Freshness
Highly Relevant
≠
Current
A page may perfectly discuss:
subscription pricing
but contain pricing from three years ago.
A modern search system may need to consider:
relevance
+
freshness
especially for time-sensitive queries.
36. Ranking vs. Factual Verification
Ranking answers:
Which candidate appears most useful for this query?
Factual verification asks:
Is the information actually correct?
Those are different problems.
A false document can still be:
highly relevant
well-written
semantically similar
lexically precise
Rank 1
≠
Guaranteed Truth
This distinction will matter throughout the rest of the course.
37. Diversity in Ranking
Sometimes the top results can be too similar.
Suppose a search system returns:
1. Article A
2. Copy of Article A
3. Syndicated Article A
4. Another version of Article A
5. Article B
Even if all are relevant, the result set may provide little diversity.
Some systems therefore try to balance:
relevance
+
diversity
Top Results
should not always mean
Near-Duplicates of the Same Information
This can be useful in search and evidence gathering.
38. Reranking Can Be Query-Aware in Greater Detail
Initial retrieval often uses compact representations.
A reranker can analyze details such as:
negation
exact intent
specific relationships
entity roles
question type
important constraints
For example:
Query:
Which plans do not include API access?
Candidate A:
The Starter plan includes API access.
Candidate B:
The Free plan does not include API access.
Both discuss:
plan
API access
But Candidate B directly satisfies the query.
A strong reranker can better capture that distinction.
39. Reranking Is Still Not Reasoning Over Everything
A reranker can be more sophisticated than the retriever.
But it still has limits.
For example, it may not fully resolve:
conflicting sources
complex multi-document reasoning
factual disputes
source credibility
temporal inconsistencies
Better Reranking
≠
Complete Answer Verification
Its main task remains:
better candidate ordering
40. LLM-Based Reranking
Modern systems can also use an LLM or LLM-like model to evaluate candidate relevance.
Query
+
Candidate
↓
LLM-Based Relevance Evaluation
↓
Score / Preference
Or:
Query
+
Several Candidates
↓
LLM
↓
Ordered Candidates
This can capture complex instructions and relevance relationships.
But it can also be:
slower
more expensive
less deterministic
than simpler rankers.
So LLM reranking is another option, not automatically the best choice for every system.
41. A Complete Simplified Ranking Pipeline
Suppose a support system contains:
5,000,000 passages
The user asks:
How can I cancel automatic renewal on my yearly subscription?
Step 1 — Candidate Generation
Hybrid retrieval runs:
BM25
+
Dense Retrieval
↓
500 Candidates
Step 2 — Fusion
RRF or another fusion method combines the retrieval lists.
500 Candidates
↓
Hybrid Ordering
Step 3 — First Ranking Cut
The system keeps:
Top 100
Step 4 — Cross-Encoder Reranking
For each candidate:
Query + Passage
↓
Cross-Encoder
↓
Relevance Score
Example:
Auto-Renew Settings → 0.97
Annual Subscription FAQ → 0.88
Refund Policy → 0.61
Payment Failure Guide → 0.24
Step 5 — Final Ranking
1. Auto-Renew Settings
2. Annual Subscription FAQ
3. Refund Policy
4. Payment Failure Guide
Step 6 — Top Results Continue
If this is a search engine:
Top Results
→ shown to user
If this is RAG:
Top Passages
→ inserted into LLM context
The full pipeline is:
Corpus
↓
Candidate Generation
↓
Hybrid Retrieval
↓
Initial Ranking
↓
Reranking
↓
Top Evidence
↓
Search Results or LLM Context
42. Ranking in Traditional Search vs. AI Search
Traditional search may ultimately display:
10 blue links
AI search may instead use top-ranked sources as evidence.
Traditional Search
Candidates
↓
Ranking
↓
Pages Shown to User
versus:
AI Search / RAG
Candidates
↓
Ranking
↓
Evidence Selection
↓
LLM Generation
The ranking layer is important in both.
But in AI systems, ranking may influence not just:
what the user clicks
but also:
what the model sees
43. Ranking and AI Visibility
Now we can make an important connection to AI Visibility.
A page may be:
crawlable
indexed
retrievable
and still never influence an AI answer.
Why?
Because it may repeatedly lose during ranking.
Page Exists
↓
Indexed
↓
Retrieved as Candidate
↓
Ranked Too Low
↓
Not Selected as Evidence
↓
No Influence on Final Answer
So AI Visibility is not only about:
being present in the corpus
or:
being retrievable
It can also depend on:
winning later ranking stages
We will develop this idea much further later in the course.
44. Common Misunderstandings
Misunderstanding 1: Retrieval and ranking are the same thing
Not exactly. Retrieval finds candidates; ranking determines their order.
Misunderstanding 2: Retrieval results have no ranking
Incorrect. BM25 and dense retrieval often produce an initial ranking themselves.
Misunderstanding 3: Reranking means searching the corpus again
Usually not. Reranking typically evaluates candidates already retrieved.
Misunderstanding 4: A reranker can recover a document that was never retrieved
Incorrect. If the document never reaches the candidate set, the reranker usually cannot evaluate it.
Misunderstanding 5: Cross-encoders are ideal for searching millions of documents directly
Usually not. Their deeper joint processing makes them better suited to smaller candidate sets.
Misunderstanding 6: Bi-encoders are worse models
Incorrect. They solve a different problem: efficient large-scale retrieval.
Misunderstanding 7: Cross-encoder and Learning to Rank mean the same thing
Incorrect. One describes a model architecture; the other is a broader ranking methodology.
Misunderstanding 8: Ranking only considers textual similarity
Incorrect. Ranking can use many features, including freshness, authority, metadata, location, and other signals.
Misunderstanding 9: Rank 1 means the information is true
Incorrect. Ranking estimates usefulness or relevance, not factual truth.
Misunderstanding 10: More complex reranking always improves the system
Incorrect. Quality must be evaluated against latency, cost, and actual retrieval performance.
Misunderstanding 11: If a document was retrieved, its job is done
Incorrect. A retrieved document may rank too low to ever reach the user or LLM context.
45. How the Concepts Connect
Chapter 7 gave us:
Corpus
↓
Candidate Generation
↓
Ranking
↓
Results
Chapter 8 showed one candidate-generation method:
Lexical Retrieval
↓
BM25
Chapter 9 added:
Dense Retrieval
↓
Vector Similarity
Chapter 10 combined them:
Lexical
+
Dense
↓
Hybrid Retrieval
↓
Candidate Set
Chapter 11 now adds deeper ordering:
Hybrid Candidate Set
↓
Initial Ranking
↓
Reranking
↓
Top Results
A common modern retrieval architecture can therefore be represented as:
Corpus
↓
Indexes
↓
User Query
↓
Lexical + Dense Retrieval
↓
Fusion
↓
Candidate Set
↓
Cross-Encoder / Ranking Model
↓
Reranking
↓
Top-K Results
The next major question is:
How do we know whether this retrieval and ranking system is actually good?
That leads directly into Chapter 12:
Retrieval Evaluation and Ranking Metrics.
Mental Model
Imagine a hiring process.
A company receives:
100,000 applications
It would be too expensive for senior interviewers to deeply evaluate all of them.
So the first stage performs broad filtering:
100,000 Applications
↓
Fast Screening
↓
1,000 Candidates
This is similar to:
retrieval
Then a stronger screening process reduces them further:
1,000
↓
Detailed Review
↓
100
Then interviews produce:
100
↓
Deep Evaluation
↓
Top 10
This is similar to:
reranking
The early system needs to avoid throwing away strong candidates.
The later system can spend more effort evaluating the survivors.
Retriever
→ broad search
Ranker
→ ordering
Reranker
→ deeper ordering of fewer candidates
The same principle applies to search.
You cannot afford to deeply analyze every document in the corpus.
Instead:
Huge Corpus
↓
Cheap Broad Retrieval
↓
Small Candidate Set
↓
Expensive Precise Evaluation
↓
Best Results
And the simplest reliable definition is:
Ranking determines the order of retrieved candidates, while reranking applies a stronger and usually more expensive evaluation to a smaller candidate set in order to improve the final ordering.
Chapter 11 Recap
- Ranking
-
Ordering candidate results according to estimated relevance or usefulness.
Candidates ↓ Scores ↓ Ordered Results - Ranker
-
A component or model that evaluates candidates and produces ranking scores or an ordering.
- Ranking Score
-
A numerical signal used to order results.
Higher Score → usually higher rankwithin that ranking system.
- Retrieval vs. Ranking
-
Retrieval → What should we consider? Ranking → Which candidates should come first? - First-Stage Ranking
-
The initial ordering produced by the retrieval system.
Examples:
BM25 ranking dense similarity ranking hybrid fusion ranking - Multi-Stage Ranking
-
Using progressively stronger models on progressively smaller candidate sets.
Large Corpus ↓ Fast Retriever ↓ Candidates ↓ Stronger Ranker ↓ Smaller Set ↓ Reranker ↓ Top Results - Reranking
-
Reevaluating an existing candidate set using a stronger or different relevance model.
Initial Ranking ↓ Reranker ↓ Improved Ranking - Bi-Encoder
-
Processes query and document separately.
Query → Query Vector Document → Document Vector ↓ SimilarityStrength:
efficient large-scale retrieval - Cross-Encoder
-
Processes query and document together.
Query + Document ↓ Joint Processing ↓ Relevance ScoreStrength:
more precise query–document evaluationCost:
more computation - Retriever vs. Reranker
-
Retriever → broad candidate generation Reranker → deeper evaluation of retrieved candidates - Ranking Features
-
Signals used by a ranking system.
Examples:
BM25 dense similarity freshness authority location metadata - Learning to Rank — LTR
-
Machine-learning methods that learn how to order results from relevance data or behavioral signals.
Training Data ↓ Learn Ranking Function ↓ Rank New Candidates - Pointwise Ranking
-
Query + Candidate ↓ Individual Score - Pairwise Ranking
-
A vs. B ↓ Which is better? - Listwise Ranking
-
[A, B, C, D] ↓ Optimize Entire Ordered List - Retrieval Recall vs. Ranking Precision
-
A useful division of responsibilities:
Retriever → avoid missing relevant information Reranker → put the strongest information at the top - Ranking and RAG
-
Retrieved Passages ↓ Ranking / Reranking ↓ Top Passages ↓ LLM ContextThe LLM only has access to evidence that survives this selection.
- Ranking Is Not Truth Verification
-
High Rank ≠ Guaranteed TruthA ranking system estimates usefulness or relevance.
The complete Chapter 11 pipeline is:
Corpus
↓
Lexical / Dense Indexes
↓
User Query
↓
Candidate Generation
↓
Lexical + Dense Retrieval
↓
Fusion
↓
Initial Ranked Candidates
↓
Stronger Ranker / Cross-Encoder
↓
Reranking
↓
Top-K Results
↓
Search Results or LLM Context
We now know how information moves from:
millions of possible documents
to:
a small ordered set of strong candidates
The next question is:
How do we measure whether retrieval and ranking are actually working well?
That leads into Chapter 12:
Retrieval Evaluation and Ranking Metrics.
The Single Most Important Idea from Chapter 11
Retrieval finds a manageable set of candidates, ranking orders those candidates, and reranking uses a stronger—usually more expensive—model to evaluate a smaller set more precisely. This multi-stage design allows modern search and RAG systems to balance scalability with high-quality relevance at the top of the result list.