- Flat (brute force)
- IVF — Inverted File Index
- HNSW — Hierarchical Navigable Small World
- PQ — Product Quantization (and the IVF-PQ combo)
- ScaNN — Google's, used in Vertex AI Vector Search
- DiskANN — when you need scale beyond RAM
The mental cheat sheet
- Small corpus (<100K): flat is fine, don't overthink it
- Medium (100K - 10M), latency-critical, RAM-heavy: HNSW
- Large (10M - 100M), memory-budget-conscious: IVF-PQ or ScaNN
- Massive (>100M, billions): ScaNN, DiskANN, or sharded HNSW
- Need fast updates on a small corpus: flat or HNSW with relaxed
M
- Static corpus, build once query forever: anything's fine, pick by recall/latency