Database / Qdrant Vector DB Interview questions
What is oversampling and rescoring in quantized search?
Oversampling and rescoring is a two-stage retrieval pattern that recovers most of the accuracy lost to quantization: first retrieve more candidates than actually needed using the fast, compressed representation, then re-rank just that smaller candidate set using the original, full-precision vectors.
results = client.query_points( collection_name="documents", query=query_vector, limit=10, search_params=models.SearchParams( quantization=models.QuantizationSearchParams( rescore=True, oversampling=2.0, ) ), )
The oversampling parameter controls how many extra candidates to pull in before rescoring — an oversampling factor of 2.0 with a requested limit of 10 means the quantized first pass retrieves roughly 20 candidates, which are then rescored against their original, uncompressed vectors before the final top 10 are selected and returned.
This pattern is exactly why Qdrant keeps original vectors available by default even when quantization is enabled: rescoring needs the uncompressed data to be accurate, so the memory savings from quantization mainly come from where the compressed representation is stored (kept in fast RAM for the initial pass) versus where the originals live (which can be placed on disk, since they're only touched for a much smaller rescoring step rather than the full initial search).
More Related questions...