Skip to content
AgenticAIWiki

← Chapter 22. Vector database internals

Walking an HNSW graph

Layer 0: every vector, short linksBDEGHEach vector is a node. Every node is in layer 0.

Swipe to change step

Step 1 of 8. Comparing a query with every vector is exact but slow at scale. An approximate index narrows the search. In HNSW, each vector becomes a node linked to its near neighbours. B. D. E. G. H. arrow from B to D. arrow from D to E. arrow from E to G. arrow from G to H.

Keys: → or J next, ← or K back, Home and End jump, Space toggles auto-play when the diagram has focus.