Hierarchical Navigable Small Worlds

import Figure from "@/components/Figure.astro"; You might have heard of this algorithm during the RAG-mania of late. But not many sources on the web go into the inner workings and intuition building, which I would like to cover here. Hierarchical Navigable Small Worlds (HNSW) is a top-performing and popular approximate nearest neighbor search algorithm. To find the exact nearest neighbor given a…