179 questions
No questions match those filters.
What is product quantization and why does it matter for...
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansA raw embedding vector — say 768 dimensions of 32-bit floats — costs about 3KB per vector, and at a billion vectors that’s roughly 3 terabytes just for the raw vectors, before any index structure on top. That’s often simply not affordable to hold in memory, and memory residency matters enormously for search latency.
Product quantization compresses each vector by splitting it into several sub-vectors, and for each sub-vector segment, learning a small codebook of representative centroids (via clustering) that the actual sub-vector gets replaced with the index of its nearest centroid — a tiny code, often just a few bytes, instead of the full floating-point sub-vector. Reconstructing an approximate version of the original vector is just looking up each segment’s codebook entry. This gives a large compression factor — often 10-30x smaller than the raw vectors — at a modest, tunable accuracy cost that depends on codebook size and number of segments.
It matters for economics specifically because it’s frequently the difference between an index fitting entirely in memory (fast) versus needing to spill to disk (dramatically slower), which is why production vector databases at real scale almost always use some form of quantization rather than storing raw vectors.