liveBook · Manning

Ivfflat

IVFFlat is an approximate nearest-neighbor vector index that partitions vectors into centroid-based inverted lists and compares vectors within selected lists.

How 2 Manning books explain it

Just Use Postgres!

An IVFFlat index is an approximate nearest-neighbor index that assigns vectors to inverted lists organized around cluster centroids.

How it is used
Optimizes vector similarity search for a Postgres movie recommendation service using approximate nearest-neighbor retrieval.
How deep it goes
Explains clustering, centroid assignment, query flow, indexing, execution plans, and probes without deep mathematical treatment.
Examples
Uses movie embeddings, the phrase “May the force be with you,” CREATE INDEX, EXPLAIN plans, and probe-adjusted query results.
What you can do after
Operate/configure pgvector IVFFlat indexes, run similarity searches, inspect plans, and adjust probes for recall.

Read how Just Use Postgres! explains ivfflat →

Designing AI Systems

IVFFlat is an approximate vector index that partitions vectors into clusters and searches selected clusters to accelerate similarity queries.

How it is used
Accelerates similarity search over growing embedding collections in a PostgreSQL-backed data service.
How deep it goes
Explains clustering, approximate recall, list sizing, and data requirements, but does not detail query-planner internals.
Examples
Uses a pgvector PostgreSQL schema with vector_cosine_ops and lists = 100 as the concrete implementation example.
What you can do after
Operate/configure a pgvector IVFFlat index and choose an initial cluster count for a growing embedding collection.

Read how Designing AI Systems explains ivfflat →

Also covered in

What to know first

Related concepts

Questions about ivfflat

What is ivfflat?

IVFFlat is an approximate nearest-neighbor vector index that partitions vectors into centroid-based inverted lists and compares vectors within selected lists.

Which Manning books explain ivfflat?

Just Use Postgres! and Designing AI Systems.

What should I know before learning ivfflat?

Manning books that teach ivfflat usually introduce similarity search, recall and schema first.

What is the difference between ivfflat and HNSW?

IVFFlat is an approximate nearest-neighbor vector index that partitions vectors into centroid-based inverted lists and compares vectors within selected lists. HNSW is a graph-based approximate nearest-neighbor indexing and search method that organizes data points in a hierarchy of navigable proximity graphs.

What is ivfflat a kind of?

Ivfflat is a kind of index type. An index type is a database indexing method defined by the structure and access strategy it uses to support data retrieval.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.