← Back to modules

Retrievers & Re-ranking — Core

Sparse (BM25) vs dense retrieval, hybrid search and RRF, bi- vs cross-encoders, ColBERT late interaction, SPLADE, query expansion (HyDE), and retrieval metrics.

Medium50 questions

Sample questions

1

What does BM25 primarily rank documents by?

  • The semantic similarity of dense sentence embeddings
  • The order in which documents were added to the index
  • The number of hyperlinks pointing to each document
  • Term-frequency and inverse-document-frequency of the query's words

Why

BM25 is a lexical scoring function over term frequency and IDF (with length normalization), rewarding documents that contain the query's rare, informative terms. It is not an embedding method, insertion-order, or a link-graph score like PageRank.

2

What is the defining characteristic of dense retrieval versus sparse (BM25) retrieval?

  • It matches by learned embedding similarity, not exact term overlap
  • It requires the query and document to share at least one word
  • It stores documents as compressed images
  • It ranks purely by document length

Why

Dense retrieval embeds queries and documents into vectors and matches by semantic similarity, so it can find relevant text with no shared words — unlike BM25's exact-term matching. It doesn't require word overlap, store images, or rank by length.

3

A user searches for a specific error code like 'ERR_2048'. Why might BM25 beat a dense retriever here?

  • BM25 embeds the code into a richer vector
  • BM25 exact-matches the rare token dense vectors blur
  • Dense retrievers cannot handle short queries at all
  • BM25 always outperforms dense retrieval on every query

Why

Exact identifiers and rare tokens are BM25's strength — it matches the literal term, whereas a dense model may map the code near semantically 'similar' but wrong text. BM25 doesn't embed, dense models handle short queries, and neither wins universally (hence hybrid search).

4

Hybrid search combines dense and sparse retrieval. Why is this often better than either alone?

  • It removes the need to embed the query at all
  • It guarantees the exact same results as BM25
  • It captures both semantic matches and exact-term matches
  • It doubles the embedding dimensionality automatically

Why

Dense retrieval finds meaning-based matches while sparse retrieval catches exact terms, rare tokens, and identifiers, so fusing them covers each other's blind spots. It still embeds the query, differs from pure BM25, and doesn't change dimensionality.

5

Reciprocal Rank Fusion (RRF) merges two ranked lists. What does it primarily use from each list?

  • The raw similarity scores added directly together
  • Each document's rank position, not its raw score
  • Only the single top result from each list
  • The document lengths to break ties

Why

RRF sums 1/(k + rank) across lists, using each document's rank position, which sidesteps the problem of combining incomparable score scales (e.g. cosine vs BM25). It doesn't add raw scores, keep only the top result, or use length.

Free account

Take the full module

These are the first few of 50 questions. A free account opens the rest as a scored drill.

  • Every question in this module
  • Instant feedback and supporting reading
  • Your score and progress, saved

Free · your email is used for progress only.