MemotivaLLM Engineer Interview Questions: Embeddings, Vector Search, and Cosine Similarity Explained

What is HNSW and how does it work?

LLM Engineer Interview Questions: Embeddings, Vector Search, and Cosine Similarity Explained

Audio flashcard · 0:21

Nortren·

What is HNSW and how does it work?

0:21

HNSW stands for Hierarchical Navigable Small World. It is a graph-based ANN algorithm that builds a multi-layer graph where higher layers have fewer nodes and longer connections. Search starts at the top layer and descends, navigating to closer and closer neighbors. HNSW offers excellent recall and low latency and is used by most production vector databases including Qdrant, Weaviate, and Milvus.
arxiv.org