liveBook · Manning

Vector compression

As explained in Building Reliable AI Systems

A technique for reducing the memory footprint of high-dimensional embeddings while preserving most of their semantic properties.

Large vector indexes can consume tens or hundreds of gigabytes, creating storage, latency, and cost bottlenecks. Vector compression reduces embedding memory while aiming to retain the information retrieval needs. section 4.6.2

Common approaches represent vectors more compactly:

  • Product quantization approximates vectors using smaller codebook-based representations. section 4.6.2
  • Scalar quantization stores floats in smaller data types such as int8; binary quantization reduces each dimension to one bit. section 4.6.2

Compressed first pass, precise reranking

Search compressed vectors to find candidate documents, then pass those candidates to a cross-encoder reranker. This multistage approach supports scale while recovering precision in the second stage. section 4.6.2

Compression is most useful for growing corpora or memory-constrained hardware, but may be unnecessary for small applications. FAISS can quantize existing vectors; Qdrant and Weaviate expose compression configuration options. section 4.6.2

How Building Reliable AI Systems covers it

How deep it goes
Describes product, scalar, and binary quantization and a reranking workflow, without detailing implementation code or algorithms.
Examples
Compares codebook-based product quantization, int8 scalar quantization, one-bit binary quantization, and compressed first-pass search followed by reranking.
What you can do after
Apply quantization with tools such as FAISS, Qdrant, or Weaviate, or use compressed embeddings for scalable vector storage.
How it connects
Connects embeddings and vector search with approximate similarity, multistage retrieval, and cross-encoder reranking.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Building Reliable AI Systems. The section links point to the parts of the book it draws on.