1.  [](/)
2.  [Diagrams](/diagrams)
3.  Three Ways to Score a Query Against a Document

[Back to Diagrams](/diagrams)MUVERA / Multi-Vector

# Three Ways to Score a Query Against a Document

Bi-encoder, cross-encoder, late interaction: when the query is allowed to see the document.

![Every relevance score in retrieval comes from one of three architectures, and they differ on exactly one axis: when the query is allowed to see the document. A bi-encoder never lets them meet until the end, encoding query and document separately into one vector each and scoring by cosine, so document vectors are computed once at index time and search is an ANN lookup, but the encoder had to guess what mattered before the question existed. A cross-encoder lets them meet immediately, concatenating query and document so every query token attends to every document token, which is worth 5 to 15% on benchmarks but costs quadratic time per pair and can only rerank a shortlist. Late interaction keeps a vector per token, computes the interaction at query time with MaxSim (each query token takes its best match in the document, then sum), and pays for it in storage: hundreds of vectors per document instead of one.](/diagrams/late-interaction.webp)Full screen

Bi-encoder, cross-encoder, late interaction: when the query is allowed to see the document.

Every relevance score in retrieval is produced by one of three architectures, and they differ on exactly one axis: when the query is allowed to see the document.

A bi-encoder never lets them meet until the very end. Query and document go through the encoder separately and come out as one vector each, and the score is the cosine between them. Because the document side is encoded before anyone knows what will be asked, the encoder has to guess what matters. Two sentences about EMEA inside a 500-word chunk get diluted by everything around them. What you buy for that loss is enormous: every document vector is computed once at index time, and search is an ANN lookup over the whole corpus.

A cross-encoder lets them meet immediately. Query and document are concatenated into one sequence and run through the transformer together, so every query token attends to every document token at every layer. That is where term weighting and negation handling come from, and it is worth roughly 5 to 15% on standard benchmarks. It also means there is nothing to precompute: the cost is quadratic in sequence length per pair, and scoring a million documents at 5ms each is 83 minutes per query. A cross-encoder can only ever be a reranker over a shortlist someone else produced.

Late interaction is the third option and the one people skip. Both sides are encoded independently, so the document side is still precomputable, but you keep a vector per token instead of collapsing to one. At query time each query token takes its best match among the document's token vectors and those maxima are summed. That is MaxSim. The interaction is real and it happens at query time, but it happens over cached vectors rather than a forward pass.

The bill is storage. One vector per document becomes hundreds, which is why the multi-vector literature is largely about making that affordable: pooling, projection down to smaller dimensions, quantization, and fixed-length encodings that let you use ordinary ANN infrastructure. That is the problem MUVERA and the ColBERT/ColPali line are solving, and this trichotomy is the thing they assume you already know.

## Where this diagram appears

*   [Guide: Late-Interaction Retrieval →](/guides/late-interaction-retrieval)
*   [Research: MUVERA →](/research/muvera)
*   [Research: ColBERT and ColPali →](/research/colbert-colpali)

Run this on your own data

Mixpeek turns video, images, audio, and documents in your object storage into searchable, timestamped results through one API.

[Search your own data](https://studio.mixpeek.com/namespaces/create?mode=managed&utm_source=homepage&utm_medium=diagram_detail&utm_campaign=mvs_onramp)

## Related diagrams

[

![An ordinary embedding model spreads information across all dimensions with no ordering guarantee, so dimension 900 may carry as much signal as dimension 5 and truncating the vector discards random pieces of meaning. Matryoshka Representation Learning changes the objective so the model packs the most general information into the front of the vector and progressively finer detail toward the back, which makes every prefix a complete usable coordinate. The nesting is drawn as five bars that all start at dimension 0 and grow: the first 64 dimensions carry coarse semantics, enough to tell a cat photo from a car photo; 128 is the prefix the retrieval cascade indexes the whole corpus at; 256 gives mid resolution, enough to separate breeds of cat or a refund request from a refund confirmation; and the full 1024 gives fine resolution for ranking near-duplicates. The mechanism is a modified loss rather than a special architecture: one forward pass produces one d-dimensional output, the training loss is computed independently at each prefix size in the set 64, 128, 256, 512, 1024, and those losses are summed, so the front of the vector has to work on its own. What it buys is a retrieve-coarse, rerank-fine cascade: index 10,000,000 items at a 128-dimension truncation costing 5.1 GB instead of the full 41 GB, retrieve a top-200 shortlist with the truncated query, fetch the full 1024-dimension vectors for those 200 candidates only, and return a final top 10.](/diagrams/matryoshka-representation-learning.webp)

Matryoshka Representation Learning: One Vector, Five Resolutions



](/diagrams/matryoshka-representation-learning)