Embeddings and Vector Search

Created by Abhyuday DesaiPublished , v1Runs 8 min 8 sec
0 views

About this video

In Episode 01 of Retrieval Explained, we build a vector search one step at a time, with code we run and the numbers it prints. A small model running on the laptop turns a question about resetting a password into a vector of 384 numbers. We compare two vectors by the angle between them, then rank passages by that score, first by checking every passage and then with an HNSW index that checks only some of them. A last question, whether a community pool is open in winter, shows what this kind of search cannot do on its own.

You'll learn how to:

  • Turn text into an embedding with a local model, and see why the meaning is in the whole vector rather than in any one number
  • Read cosine similarity as the angle between two arrows, and see why normalizing takes length out of the score
  • Write exact nearest neighbor search as one matrix product and a sort
  • Build an HNSW index, and measure recall: how often it finds the true neighbors, and what a wider search costs
  • See why the most similar passage is not always one that answers the question

This video is for developers starting on retrieval for AI applications who are comfortable reading Python. The code runs from the companion repo, with no API key.

What changed

  1. v104 Oct 2026abhydesai8 min 8 secb9e8014

    First published version.

    0 views0 likes on this version