Zenaique
Glossary · RAG

HNSW (Hierarchical Navigable Small World)

Also known as: Hierarchical Navigable Small World

A graph-based ANN index with log-time approximate search, excellent recall/latency trade-off.

An approximate nearest neighbor index that builds a multi-layer graph where higher layers act as expressways for fast greedy search. The dominant ANN algorithm for in-memory vector search at scale.

In practice

Most production vector stores (FAISS, Qdrant, Weaviate, Pinecone) use HNSW under the hood. Expect questions on its M, efConstruction, and ef params.

How it compares

HNSW is one ANN index algorithm; vector databases are the systems that bundle it with storage and APIs.

Related topics

Related terms