Module resources
Embeddings and vector search
Checked sources to go further than the lessons. Back to the module.
Recommended learning sequence
Work through these in order.
The Illustrated Word2vec (opens in a new tab)
Start with the idea behind the module: a picture-led post showing items as vectors, comparing them with cosine similarity and learning embeddings from text, before any index appears.
Vector embeddings (opens in a new tab)
Then the practical side: a vendor guide to dimensions, normalization and when cosine and Euclidean rank alike. Repeated from lesson 1 on purpose, to fix the order.
Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks (opens in a new tab)
Read the paper that made sentence embeddings practical to compare at scale, which motivates why a search index is needed at all. Repeated from lesson 1 on purpose.
Getting started (Faiss wiki) (opens in a new tab)
Hands-on next: build an exact index and get ground-truth neighbours, the baseline you measure approximate search against in lesson 2. Repeated from the lesson further lists on purpose.
Now the algorithm behind the most common index in lesson 2. You know what exact search costs, so the layered-graph idea has something to fix. Repeated on purpose: it is a lesson 2 source, placed here to fix the reading order.
Faiss: A library for efficient similarity search (opens in a new tab)
An engineering view of why a purpose-built similarity-search library was needed and what it was measured on.
Product Quantization: Compressing high-dimensional vectors by 97% (opens in a new tab)
Finish hands-on: the walk-through builds PQ and IVFPQ indexes in Faiss and compares memory, recall and speed against a flat index, so you see the trade-off in numbers.
All resources
Further reading
Product Quantization: Compressing high-dimensional vectors by 97% (opens in a new tab)
A worked walk-through of product quantization with Faiss, with memory, recall and speed numbers for flat, PQ and IVFPQ indexes. Extends the quantization section of lesson 2. Written by a vector-database vendor.
Research papers
Efficient Estimation of Word Representations in Vector Space (opens in a new tab)
The word2vec paper that popularised learned word vectors and similarity between them. It shows where the idea of 'close in vector space means close in meaning' comes from, a background to lesson 1.
Billion-scale similarity search with GPUs (opens in a new tab)
The research paper behind Faiss on GPUs: brute-force, approximate and compressed search at billion scale. Read it for how far exact search can be pushed with hardware. This is the arXiv version, and it goes deeper than this module needs.
Hands-on
Qdrant: vector similarity search engine and vector database (opens in a new tab)
Helps you choose a store for lesson 2: a vector database you can run locally with Docker, with payload filtering, so you can compare it with pgvector and a managed service on your own data. Repeated from the lesson 2 sources on purpose.
Books
Speech and Language Processing (3rd edition draft) (opens in a new tab)
The Embeddings chapter (chapter 5) is a rigorous textbook treatment of vector representations and similarity, at a deeper level than lesson 1. Read that chapter, not the whole draft.
Case studies
Faiss: A library for efficient similarity search (opens in a new tab)
The team behind Faiss explains why existing databases and libraries did not fit billion-scale vector search. Includes recall and query-time numbers from their own benchmarks.
Introducing Voyager: Spotify's New Nearest-Neighbor Search Library (opens in a new tab)
A production story: Spotify built Voyager on hnswlib, intended to succeed Annoy as its recommended nearest-neighbour library for production use. It shows recall, speed and memory as trade-offs a team weighs, but the performance claims are Spotify's own.
Datasets
MTEB: Massive Text Embedding Benchmark (opens in a new tab)
A benchmark of 8 embedding tasks and 58 datasets, whose authors found no single embedding method best on every task. Supports the point that you test an embedding model on your own data before choosing it.
A retrieval benchmark of 18 datasets. It reports that BM25 stays a strong baseline against dense models in zero-shot tests, which is a reason to compare dense search with keyword search and consider hybrid.