Vector Search in Retrieval-Augmented Generation

Lessons in this section

  1. Vector Embeddings

    How text becomes vectors that capture meaning: dense vectors and dimensions, embedding models and how to choose them, L2 normalization, mean vs CLS pooling, and running small quantized models in the browser.

  2. Similarity Search

    Finding the nearest vectors: cosine, dot product and Euclidean distance, top-k selection, a flat in-memory index, and visualizing vector space with PCA, query projection and clusters.

  3. Vector Indexing

    Storing and searching vectors at scale: vector database basics, persistence, flat vs approximate search, recall, IVF and HNSW indexes and their settings, and how to choose an index.