Zvec Logo

Multi-Vector Search

Zvec supports multi-vector queries, allowing you to combine different embeddings in a single search.

When querying multiple vector embeddings, Zvec retrieves top candidates from each vector space independently.
Since similarity scores from different vector spaces might not be directly comparable, a re-ranker is required to fuse and and re-rank the results into a unified, relevance-ordered list.


Prerequisites

This guide assumes:

  • You have opened a collection with multiple vector fields
  • You're familiar with the basic vector querying concepts. If not, please review the single-vector search guide


To run a multi-vector search, pass a list of VectorQuery objects to the query() method and specify a fusion strategy via the reranker parameter.

In multi-vector search, topk takes on a different meaning compared to single-vector queries:

  • topk (in query()): Controls how many candidate documents are retrieved from each vector field before re-ranking. A larger topk gives the re-ranker more candidates to work with, potentially improving final quality but increasing computational cost.
  • topn (in ReRanker): Controls how many final documents are returned after score fusion and re-ranking. This is your final result set size.

Re-ranking Strategies

Zvec provides different re-ranking strategies to combine scores from multiple vector fields.

Re-rankerWeightedReRankerRrfReRanker (Reciprocal Rank Fusion)
ApproachCombines normalized similarity scores using custom weightsFuses results based only on ranking positions — no scores needed
The RRF score at rank r is: RRF(r)=1k+r+1\text{RRF}(r) = \frac{1}{k + r + 1}
Best for• Scores are reasonably comparable across vector fields
• You know the relative importance of each embedding type
• Scores come from different metrics or scales
• You prefer a simple, robust, tuning-free method
Parametersweights: Dictionary mapping vector names to their relative importance
metric: The similarity metric used for score normalization
rank_constant (k): Controls how quickly rank influence decreases. Higher values reduce the dominance of top-ranked results.