Vector Search in Retrieval-Augmented Generation
Lessons in this section
- 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.
- 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.
- 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.