PrepCity

Vector indexes: exact, HNSW and IVF

Open the lab

By the last page, this is the design you will have built.

Lesson · 10 pages · about 7 min

Vector indexes: exact, HNSW and IVF

Finding the nearest vectors by measuring every one is exact but slow. See inside the two indexes databases use instead, HNSW and IVF, and how to check they still find the right answers.

Words you’ll learn

  • Chunk
  • PostgreSQL
  • Embedding
  • Database
  • HNSW
  • IVF index
  • k-means
  • Query planner
  • Approximate search
  • Recall

Page by page