Storing and searching millions of embeddings at speed
Click anywhere inside the 2D vector space below to place a Query Vector ($\vec{q}$). Watch how different indexing structures prune the search space to find Top-$K$ nearest neighbors in sub-millisecond time.
| Index Type | Build Time | Query Latency | RAM Overhead | Best Used For |
|---|---|---|---|---|
| HNSW | Slow ($O(N \log N)$) | Ultra-Fast (<2ms) | High (+150% RAM) | Low-latency real-time RAG (<10M vectors) |
| IVF-PQ | Moderate (k-means) | Fast (<10ms) | Minimal (-80% RAM) | Billion-scale web search (e.g. Pinecone, Milvus) |
| Flat (Brute Force) | Instant (0s) | Linear $O(N)$ (Slow) | Zero overhead | Small collections (<50k vectors) with 100% recall |