Skip to content

HNSW

Hierarchical Navigable Small World — a vector index: vectors are connected in a multi-layer graph, through which search 'descends' to the nearest neighbors.

  • High speed;
  • Good search quality;
  • Supported in many vector databases (Qdrant, FAISS, Milvus).

Trade-offs

HNSW parameters allow balancing: more connections (M) — more accurate, but more memory; more layers (ef) — more accurate search, but slower.

See Also

← All terms