Database / Weaviate Vector database Interview questions
What is quantization/compression in Weaviate, and why is it used?
Quantization compresses a vector's representation, reducing each dimension from full 32-bit floating point precision down to a smaller number of bits, trading a controlled amount of precision loss for a significantly smaller memory footprint and, in some cases, faster comparison speed.
| Technique | Requires training? |
| PQ (Product Quantization) | Yes, trains custom segments on sample data. |
| SQ (Scalar Quantization) | Yes, trains on a sample (default 100,000 objects per shard). |
| BQ (Binary Quantization) | No training required. |
| RQ (Rotational Quantization) | No training required; recommended default starting point. |
Since compression inherently loses some information, Weaviate mitigates the resulting recall impact through rescoring: alongside the compressed vectors used for the fast initial search pass, Weaviate also keeps the original uncompressed vectors and re-ranks the top candidates from the compressed search using the full-precision vectors, recovering much of the recall that raw compressed-only search would otherwise sacrifice.
More Related questions...