



Combining dense vector embeddings with sparse representations in a single unified model. Captures both semantic meaning (dense) and exact term matching (sparse) for superior retrieval performance.
Hybrid embeddings combine dense vectors (capturing semantics) with sparse vectors (capturing keywords) in a unified representation, providing best-of-both-worlds retrieval.
# Qdrant with named vectors
client.upsert(
collection_name="hybrid_collection",
points=[
{
"id": 1,
"vector": {
"dense": [0.1, 0.2, ...], # 384 dims
"sparse": {1: 0.5, 42: 0.3, ...} # vocab indices
},
"payload": {"text": "..."}
}
]
)
# Search both
results = client.search(
collection_name="hybrid_collection",
query_vector=("dense", query_dense),
sparse_vector=("sparse", query_sparse),
fusion="rrf" # Reciprocal rank fusion
)
Depends on vector database and embedding models used.
Loading more......