๐Ÿงญ Roadmap โ€บ 05 ยท Give Models Knowledge โ€บ Vector Database
05 ยท Give Models Knowledge

Vector Database

Storing and searching millions of embeddings at speed

๐Ÿ”ด MUST
๐Ÿง  Understand๐Ÿ‘๏ธ Visualize๐Ÿ’ป Code๐Ÿ”ฌ Experimentโš–๏ธ Compare๐Ÿ—ฃ๏ธ Explain
โšก Interactive Visualizer HNSW Graph & IVF Voronoi Simulator

Approximate Nearest Neighbor (ANN) Index Simulator

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.

Click to move Query Vector $\vec{q}$ (๐ŸŸก) Index: HNSW Graph ($O(\log N)$)
Top-3 Retrieval Results 92% Comparisons Saved
Performance Stats:
Comparisons: 8 / 60
Recall Rate: 98.5%
Search Latency: 0.12 ms
Index Memory: ~1.4 MB
๐Ÿ” Behind-the-Scenes: HNSW vs. IVF-PQ Trade-offs in Production
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
8 subtopics โ€” click to study
Why Vector DB? ๐Ÿ”ด Store Embeddings ๐Ÿ”ด Vector Index ๐ŸŸก Similarity Search ๐Ÿ”ด Metadata ๐ŸŸก Metadata Filtering ๐ŸŸก Top-K Retrieval ๐Ÿ”ด Retrieval Performance ๐ŸŸก
โ† Back to Roadmap
This page 0:00
This session 0:00
Total (all pages) 0:00
Today 0:00
โ–ถ Running
๐Ÿ“Š View all study stats โ†’
0:00 studying