RAG & Retrieval·Question 25 of 100Intermediate

Explain the retrieval-architecture spectrum: bi-encoders, cross-encoders, and late interaction (ColBERT).

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

The spectrum is defined by when query and document interact, which dictates what you can precompute - and therefore cost, latency, and quality.

Full worked answer

The spectrum is defined by when query and document interact, which dictates what you can precompute - and therefore cost, latency, and quality.

Bi-encoder (no interaction): query and document each compressed to one vector independently; relevance = one dot product. Documents embed once at index time; query time is one encoder pass plus ANN search. Scales to billions, but the document vector was frozen before the query existed - no token-level matching, weak on negation, exact terms, and coreference. Storage: one vector per chunk (~1-12KB).

Cross-encoder (full interaction): concatenate query+document, run a full transformer, output a relevance score. Every query token attends to every document token - the quality ceiling of the three, and its scores are meaningful enough to threshold on. But nothing is precomputable: one forward pass per candidate per query, so it only works as a reranker over ~50-200 candidates (50-300ms typical), never as first-stage retrieval over millions.

Late interaction - ColBERT (deferred token-level interaction): encode documents into per-token embedding matrices offline; at query time, encode the query into token vectors and score via MaxSim - for each query token take its max similarity over all document tokens, then sum. You get token-level matching (a rare term in the query can find its exact counterpart) while document encoding stays precomputable and the scoring op is cheap enough to serve at scale with specialized indexes (PLAID-style). The price is storage: hundreds of vectors per chunk instead of one - 10-100× even after aggressive compression - plus thinner infra support, though several mainstream engines (Vespa, Qdrant and Weaviate among them) now ship native multi-vector fields.

Production answer: bi-encoder (+BM25) for recall → cross-encoder for precision covers most systems. Reach for ColBERT when first-stage recall is the bottleneck on token-sensitive corpora (code, technical docs) and reranking can't fix what never got retrieved.

What a good answer covers

  • The spectrum is defined by when query and document interact, which dictates what you can precompute -…
  • Bi-encoder (no interaction)
  • Documents embed once at index time; query time is one encoder pass plus ANN search
  • Scales to billions, but the document vector was frozen before the query existed - no token-level…
  • Storage: one vector per chunk (~1-12KB)

Key terms: when query and document interact · Bi-encoder · Cross-encoder · per candidate per query · Late interaction - ColBERT · per-token embedding matrices · MaxSim

Interviewer follow-ups to expect

  1. Why is MaxSim robust to document length in a way single-vector pooling isn't?

  2. Estimate storage for 10M chunks under each architecture. Where would a "listwise" LLM reranker fit on this spectrum?

Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep