Multi Stage Retrieval
Module 3: Multi-Stage Retrieval with Universal Query API
Create a collection with three named vectors: a fast single-vector (BGE) for candidate retrieval, a high-quality multi-vector (ColBERT) for reranking, and a sparse vector (BM25) for keyword matching.
Define 25 documents across various topics. The first 10 are about quantum computing applications, while the rest cover unrelated topics to test retrieval precision.
Index all documents with embeddings for all three vector types simultaneously.
Run a two-stage query: first retrieve 500 candidates using fast single-vector search, then rerank the top results with ColBERT's MaxSim for higher precision.
Multi-stage with Hybrid Prefetch
You can also use multiple retrieval methods in the prefetch stage, combining both dense and sparse vectors, and then rerank them with multi-vectors.
Filtering with Propagation
Filters in the main query are automatically propagated to all prefetch stages.