01Chapter 1: From data to vectors: what embeddings areThis chapter assumes you can read basic Python, know what a vector and a dot product are, and have a general idea of what a machine learning model does. You do not need to know how to train a model.3 min read
02Chapter 2: Measuring similarity: cosine, dot product and Euclidean distanceThis chapter assumes you can read basic Python with NumPy, know what a dot product is, and have a general idea of what an embedding is. Here you will learn the three common ways to score how close two vectors are, and how to pick one for a given embedding model.2 min read
03Chapter 3: Exact nearest neighbor search with brute forceThis chapter assumes you can read basic Python and NumPy, and that you know what a dot product is. You should also know that an embedding is a vector, and that the previous chapter covered how metrics such as cosine similarity and Euclidean distance compare two vectors.3 min read
04Chapter 4: Why exact search stops scalingThis chapter assumes you can write the brute-force search from the previous chapter and know what a dot product is. You should also know that a database index narrows down which rows a query has to look at.3 min read
05Chapter 5: Approximate nearest neighbor search and recallThis chapter assumes you can write the brute-force search from the previous chapters. You should also know that a dot product on normalized vectors gives cosine similarity, and that exact search scores every stored vector for each query.3 min read
06Chapter 6: HNSW: navigating a layered graphThis chapter assumes you know what embeddings are, how cosine and Euclidean distance work, and why exact search becomes slow at scale. It also assumes you have seen approximate nearest neighbor (ANN) search and recall defined.2 min read
07Chapter 7: IVF: partitioning the space into clustersThis chapter assumes you know what approximate nearest neighbor (ANN) search and recall are, and that you can read short Python with NumPy. FAISS is a vector search library. You will use it here.2 min read
08Chapter 8: Compressing vectors with product quantizationThis chapter assumes you know what an IVF index is, how recall is measured against an exact baseline, and that a float32 vector of dimension d takes 4·d bytes.2 min read
09Chapter 9: What a vector database adds beyond an indexThis chapter assumes you know what embeddings are, how cosine and Euclidean distance work, and why approximate nearest neighbor (ANN) indexes such as HNSW exist. It covers what a vector database provides on top of an index.3 min read
10Chapter 10: Combining vector search with metadata filtersReal queries rarely ask only for "the most similar items". They ask for the most similar items that are in stock, written after 2023, or visible to this user. This chapter assumes you know what an ANN index is, how HNSW and IVF work at a high level, and basic SQL WHERE clauses.2 min read
11Chapter 11: Hybrid search: keywords plus vectorsThis chapter assumes you know what embeddings are, can read basic Python and SQL, and have seen how metadata filtering narrows a vector search. It covers why pure vector search sometimes fails, how keyword search complements it, and how to merge the two result lists.3 min read
12Chapter 12: Using a vector database for retrieval-augmented generationThis chapter assumes you know what embeddings are, how cosine similarity ranks vectors, and how a vector index returns approximate nearest neighbors. It covers how those pieces fit into retrieval-augmented generation (RAG).2 min read
13Chapter 13: Measuring recall and latency and tuning index parametersThis chapter assumes you know what an approximate nearest neighbor (ANN) index is, and that you have seen HNSW, IVF and product quantization. You should be comfortable running short Python scripts with NumPy and FAISS.2 min read
14Chapter 14: Updates, deletes, sharding and other operational concernsThis chapter assumes you know how HNSW and IVF indexes work, what recall means, and what a vector database adds beyond an index. Here we look at what happens after the first load: data changes, grows, and has to survive failures.3 min read