Construction · simplified
This index wires each node to its M nearest neighbors per layer. Real HNSW inserts points one at a time with a pruning heuristic and usually allows 2M links on the base layer.
Layers · conceptual
Layer membership is random with a fixed level multiplier here. Production defaults tie that multiplier to M. Capped at 4 layers for legibility.
Honest counts
Hops, distance checks, recall, and visited counts are measured on the rendered graph. Animation pace is for legibility, not latency. Production systems add deletions, filters, quantization, and memory tradeoffs, and results always depend on data geometry and implementation.