Skip to main content

Lesson 4 · 10 min

Vector databases — what they actually do

A vector DB is a specialized index for "find the k nearest vectors" at scale. Pick one once you actually need scale.

What it is, mechanically

A vector DB stores (id, vector, metadata) rows and offers one main operation: "given query vector q, return the top-k most similar vectors".

Behind the scenes: approximate nearest neighbor (ANN) indexes — HNSW, IVF, ScaNN. They sacrifice 1–5% recall for 10–1000x speed.