Lesson 3.2

Re-ranking results

Retrieve fifty candidates with a fast method, then re-score them with a model that reads the query and the passage together.

5mAdvanced4.9k students

Overview

Cheap recall, then expensive precision

Retrieve fifty candidates with a fast method, then re-score them with a model that reads the query and the passage together. That two-stage shape gives you accuracy you could not afford across the whole corpus.

A cross-encoder is far more accurate than vector similarity because it can attend to the query while reading the passage — and far too slow to run over everything, which is exactly why it belongs in stage two.

Keeping fewer, better passages usually beats keeping more. Irrelevant context does not just waste tokens, it actively distracts the generation step.

In this lesson you will:

  • Retrieve widely, then rank precisely
  • Understand the cross-encoder trade-off
  • Pick how many results to keep

Resources

Previous Lesson
Next Lesson
Re-ranking results — Retrieval-Augmented Generation in Practice — Vertex