Database / Weaviate Vector database Interview questions
Explain the internal working of Weaviate's rescoring mechanism for quantized vectors?
Rescoring is what lets Weaviate get most of quantization's memory savings without accepting the full recall cost that using compressed vectors alone throughout the entire search would otherwise incur.
The initial pass searches the compressed representation, which is small enough to scan quickly and, for graph-based indexes like HNSW, cheap enough to traverse efficiently even at large scale. Rather than returning that pass's results directly, Weaviate over-fetches a larger shortlist than the client actually requested, then looks up the original, full-precision vectors for just those shortlisted candidates (which Weaviate retains specifically to support this step) and recomputes their exact distances to the query vector.
Because the expensive, full-precision computation only ever touches the small shortlist rather than the whole dataset, this two-pass approach keeps overall query cost close to what pure compressed search alone would cost, while the final ranking reflects genuine full-precision distances for the results that actually matter, recovering most of the accuracy a naive, rescoring-free compressed search would otherwise sacrifice.
More Related questions...