Skip to content

Embeddings and reranking

Vector names answer "which vector?" Vector roles answer "what input shape and embedding path?" QQL keeps those decisions separate.

FormRole
USING semanticResolve role from collection schema
USING semantic AS DENSEExplicit dense vector
USING lexical AS SPARSEExplicit sparse vector
USING colbert AS MULTIExplicit dense multivector
QQLOffline-explicit vector roleTry in playground
QUERY 'late interaction' FROM papers USING colbert AS MULTI LIMIT 10;

Token-level multivector storage uses MULTIVECTOR with a comparator. The example below keeps a dense vector for candidate generation and a 128 dimension multivector for late interaction.

QQLCreate multi-vector collection for ColBERTTry in playground
CREATE COLLECTION kb_articles (
dense VECTOR(384, COSINE),
colbert VECTOR(128, COSINE) WITH HNSW (m = 0) WITH MULTIVECTOR (comparator = 'max_sim')
);

Search a multivector space directly with USING ... AS MULTI.

QQLDirect ColBERT token-level searchTry in playground
QUERY 'late interaction vector retrieval'
FROM kb_articles
USING colbert AS MULTI
WHERE category = 'search'
LIMIT 10;

At scale, retrieve candidates with dense search, then rerank with late-interaction MaxSim over the prefetched set.

QQLTwo-stage prefetch and ColBERT rerankingTry in playground
WITH
candidates AS (QUERY 'late interaction vector retrieval' USING dense LIMIT 100)
QUERY RERANK TEXT 'late interaction vector retrieval' MODEL 'colbert-v2'
FROM kb_articles
USING colbert AS MULTI
PREFETCH (candidates)
LIMIT 10;
QQLHost pair scoringTry in playground
WITH
candidates AS (QUERY 'vector compression' USING dense LIMIT 50)
QUERY CROSS RERANK TEXT 'vector compression' MODEL 'bge-reranker-base' ON FIELD abstract
FROM papers
PREFETCH (candidates)
LIMIT 10;

Cross reranking reads candidate text from the payload, calls the host pair scoring capability, and reorders hits client-side. It does not use a Qdrant multivector target.

ArchitectureRetrieval latencyStorage footprintInteraction depthBest used for
Single dense vector1-5 msLow (1 vector per doc)Coarse chunk levelFirst-stage candidate generation
ColBERT late interaction10-25 msMedium (N vectors per doc)Fine-grained token MaxSimHigh-precision candidate reranking
Cross-encoder model50-200 msNone (re-evaluates text)Full cross-attentionFinal top-10 scoring and reranking