ModelRefs / HNSW (Hierarchical Navigable Small World) — AI Glossary
HNSW (Hierarchical Navigable Small World) — AI Glossary
A graph-based approximate nearest-neighbor index that provides sub-millisecond ANN search at high recall.
Overview
HNSW is the default index in Qdrant, Weaviate, Milvus, Chroma, and pgvector. ef_construction and M parameters trade build time vs query recall. The probabilistic multi-layer graph enables logarithmic-time search.
Reference details
| Topic | rag |
|---|---|
| Last reviewed | 2026-06-24 |
Related terms
Commonly confused with
One approximate-nearest-neighbour index family among several. Against IVF, the difference is the failure mode as much as the speed: IVF partitions and can miss a neighbour in an unprobed cell, whereas a graph walk can end in a local minimum. HNSW generally gives better recall at a given latency and costs more memory for the graph, which is the trade to measure on your own data.
Continue your research
Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to HNSW (Hierarchical Navigable Small World) — AI Glossary.
Frequently asked questions
What is HNSW (Hierarchical Navigable Small World)?
A graph-based approximate nearest-neighbor index that provides sub-millisecond ANN search at high recall.
What concepts are related to HNSW (Hierarchical Navigable Small World)?
Closely related concepts include vector database, embedding.