Handbook · 25 chapters · ~53 min
Vector Database Handbook
Everything you need to understand vector databases completely — what vectors and embeddings are, how similarity search works, how HNSW, IVF and quantization make it fast, how to model, filter and combine search, how to choose a database, and how to run one in production. No maths background required.
Start reading →The basics
01 · 3 minWhat is a vector database?The problem it solves, in plain words — and when you actually need one.02 · 2 minVectors and embeddingsWhat a vector is, how embedding models turn meaning into numbers, and what dimensions mean.03 · 2 minMeasuring similarityCosine similarity, dot product and Euclidean distance — worked out by hand.04 · 2 minNearest-neighbour searchBrute-force search, why it stops scaling, and the exact-vs-approximate trade-off.
How it works inside
05 · 2 minApproximate search, the big pictureHow ANN indexes avoid checking everything — and the speed, accuracy and memory triangle.06 · 3 minHNSW — the graph indexHow Hierarchical Navigable Small World graphs find neighbours in a few hops.07 · 2 minIVF — the clustering indexInverted file indexes: split vectors into clusters, then search only the closest few.08 · 2 minQuantization — making vectors smallerScalar, product and binary quantization, with the memory maths worked out.09 · 2 minOther index typesFlat, DiskANN, LSH, tree-based and GPU indexes — and when each makes sense.
Using a vector database
10 · 2 minThe data modelCollections, records, IDs, vectors and metadata — and how to design them.11 · 3 minIngestion, updates and deletesGetting data in, keeping it fresh, and why deletes are trickier than they look.12 · 2 minMetadata filteringPre-filtering vs post-filtering, filtered HNSW, and avoiding empty results.13 · 2 minHybrid searchCombining vector (dense) and keyword (sparse) search, fusing results and reranking.14 · 2 minMulti-tenancyServing many customers from one system without leaking data between them.
Hands-on
Choosing & running
17 · 2 minThe vector database landscapeDedicated databases, extensions to databases you already run, and libraries.18 · 2 minChoosing a vector databaseA practical decision guide — questions to ask and how to run a fair evaluation.19 · 2 minSizing and scalingEstimating memory and cost, then scaling with replicas and shards.20 · 2 minPerformance tuningA step-by-step method to hit your recall and latency targets.21 · 2 minEvaluating search qualityRecall, precision, MRR and nDCG — measuring whether search actually works.22 · 2 minRunning it in productionBackups, monitoring, security, upgrades and re-embedding — the operational checklist.
Reference
More handbooks by Bipin Singh: browse the library →