15. ML systemsEmbeddings and vector search
Embeddings and vector search
Embeddings and vector search are how computers find things by meaning rather than by matching exact words. An embedding model turns a piece of text, an image or a product into a list of numbers, a point in a space with hundreds of dimensions, placed so that similar things land near each other: “cheap flights” sits close to “budget airfare”. Searching then means finding the points nearest your query. Checking every point is too slow at millions of items, so vector databases use approximate methods like HNSW, a layered graph you descend from coarse long-range links to fine local ones, trading a little accuracy for a huge speedup. This powers semantic search, recommendations and RAG.
In this lesson: A 3D embedding space, and HNSW as a layered graph you watch search descend.