02Chapter 2: Measuring similarity: cosine, dot product and Euclidean distanceThis chapter assumes you know what an embedding is (a list of numbers that represents a piece of data), can read basic Python and NumPy, and remember the dot product from introductory linear algebra. It covers the three metrics that almost every vector database offers, how they relate, and how to pi6 min read
03Chapter 3: Exact nearest neighbor search with brute forceThis chapter assumes you can read basic Python and NumPy, know what a dot product is, and know roughly what an embedding is. The previous chapters covered embeddings and similarity metrics. Here you will build the simplest correct vector search and learn why every later index is judged against it.5 min read
04Chapter 4: Why exact search stops scalingThis chapter assumes you can write basic Python with NumPy, know what a dot product is, and know that an embedding is a vector produced by a model. It also assumes you have read the previous chapter, where brute-force search was a single matrix product. Here you will see why that approach breaks dow6 min read
05Chapter 5: Approximate nearest neighbor search and recallThis chapter assumes you can write basic Python, know what an embedding is, and have seen exact nearest neighbor search (a brute-force scan of every vector). You should also know that a database index trades extra work at write time for faster reads. Here you will learn what approximate search gives6 min read
06Chapter 6: HNSW: navigating a layered graphThis chapter assumes you know what an embedding is, how cosine and Euclidean distance work, and why exact search becomes too slow at scale. You should also know what recall means for an approximate index. You should be able to read short Python and SQL.6 min read
07Chapter 7: IVF: partitioning the space into clustersThis chapter assumes you have read the previous chapters on approximate search and recall. It also assumes you can read Python and SQL, and that you know k-means clustering at a basic level. By the end you should be able to explain how an inverted file (IVF) index works, set its two main parameters,5 min read
08Chapter 8: Compressing vectors with product quantizationEarlier chapters showed that HNSW and IVF cut the number of distance computations per query. They do not shrink the vectors. A graph or cluster index still has to keep every full-precision vector in memory. This chapter covers product quantization (PQ), which shrinks the vectors themselves, usually 6 min read
09Chapter 9: What a vector database adds beyond an indexThis chapter assumes you know how an approximate nearest neighbor (ANN) index such as HNSW or IVF works, what recall means, and how a database index speeds up queries. It also assumes basic Python and SQL. By the end, you should be able to say which parts of a vector search system come from the inde7 min read
10Chapter 10: Combining vector search with metadata filtersThis chapter assumes you know how an approximate nearest neighbor (ANN) index such as HNSW or IVF works, and that you can read basic Python and SQL. It covers why a filter and a vector index interact badly, the three ways systems combine them, and how to choose a strategy for your data.7 min read
11Chapter 11: Hybrid search: keywords plus vectorsThis chapter assumes you know how embeddings and similarity metrics work, and what a nearest neighbor query returns. You should also be comfortable reading short Python and SQL. Earlier chapters covered dense vector indexes. This chapter shows how to combine them with keyword search.6 min read
12Chapter 12: Using a vector database for retrieval-augmented generationRetrieval-augmented generation (RAG) gives a language model facts it was not trained on. The system looks up relevant text in your own data, then puts that text in the prompt. This chapter assumes you know what an embedding is, how cosine similarity ranks vectors, and that a vector index returns app6 min read
13Chapter 13: Measuring recall and latency and tuning index parametersThis chapter assumes you know what an embedding is, how cosine, dot product and Euclidean distance work, and how HNSW, IVF and product quantization organize vectors. It also assumes you can read basic Python and SQL. Here you will measure how well an approximate index performs and then adjust its pa7 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 how metadata filtering interacts with an index. It covers what happens after the first load: data changes, the index ages, the dataset outgrows one machine, and you have to keep the system running.8 min read
15Chapter 15: Choosing between libraries, extensions and dedicated databasesThis chapter assumes you have read the earlier chapters. You should know how embeddings, distance metrics, HNSW and IVF indexes, metadata filtering and recall measurement work. You should also be comfortable with basic Python and SQL. The goal here is to turn those pieces into a decision. You will c7 min read