Retrieval & generation · Glossary term
What is HNSW?
An approximate-nearest-neighbor index that organizes vectors in layered proximity graphs and searches from coarse upper layers toward detailed lower layers.
Also called Hierarchical Navigable Small World.
Why does HNSW matter?
It is a common way to make high-recall vector search practical at scales where exhaustive comparison is too slow.
HNSW in practice
Tune construction and query parameters against latency, memory, and Recall@K targets, then rebuild the index when embedding versions change.
What is the common confusion about HNSW?
HNSW is an index algorithm, not a similarity metric, embedding model, or complete vector database.
Learn HNSW in the course
Lessons that name HNSW in a title or section
- Embeddings & Vector Representations
Text is discrete. Math is continuous. Every time you ask an LLM to find "similar" documents, compare meanings, or search beyond keywords, you're relying on a bridge between these two worlds.
Covered in Phase 11: LLM Engineering.
Related terms
- Approximate Nearest Neighbor (ANN)A search method that returns vectors likely to be among the nearest to a query without exhaustively comparing the query with every stored…
- Vector DatabaseA storage and indexing system that supports nearest-neighbor queries over vector representations, often with metadata filtering,…
- EmbeddingA learned mapping from discrete items (words, images, users) to dense vectors in continuous space, where similar items end up close together
- Recall@KFor one query, Recall@K is `|relevant items intersecting the top k| / |relevant items|`.
Sources
More terms in Retrieval & generation
This entry comes from glossary/terms.md on GitHub. Browse all 250 glossary terms.