passdrill
AI & LLM Engineering · RAG & Embeddings · Card 016/022 hard

A standard bi-encoder embeds an entire query into one fixed-length vector and an entire passage into another single fixed-length vector, then compares just those two vectors. ColBERT instead keeps a separate embedding for every token in the query and every token in the passage, and scores a query-passage pair with the MaxSim operation: for each query token, take its highest similarity to any token in the passage, then sum those per-token maximums across the whole query. What does this token-level 'late interaction' design let ColBERT capture that a single-vector bi-encoder cannot?

  1. It lets ColBERT skip computing passage representations in advance, since MaxSim can only be computed once the query is known, which removes the need for a pre-built index entirely
  2. It lets fine-grained matches on individual important terms surface in the score, because each query token can find its own best-matching passage token independently, instead of the whole query and the whole passage first being compressed into single vectors that can blur or lose the contribution of any one specific term
  3. It lets ColBERT skip the embedding model entirely and compare passages using exact string matching on the token text, since the highest-similarity token is always the token with the identical spelling
  4. It lets the passage side of the comparison be computed after the query arrives, rather than in advance, which reduces indexing time at the cost of slower per-query search
Next card → Shuffle