02Chapter 2: What an embedding is: text as a point in vector spaceThis chapter assumes you know basic Python, what a dot product and a vector length are, and roughly what a neural network does. It builds the core idea that the rest of the tutorial relies on.3 min read
03Chapter 3: Measuring closeness: cosine similarity, dot product, and Euclidean distanceThis chapter assumes you know basic Python, can compute a dot product and a vector length, and know that an embedding is a list of numbers representing a text. Here you will learn the three common ways to score how close two embeddings are, and how to pick one.3 min read
05Chapter 5: Generating embeddings with a pretrained modelThis chapter assumes you know basic Python, what a vector and a dot product are, and roughly what a neural network does. You do not need to train anything. You will load a pretrained embedding model, encode sentences, and check that the output behaves as expected.2 min read
06Chapter 6: The semantic search pipeline: embed, index, query, rankThis chapter assumes you know basic Python, what a dot product and a vector length are, and that a pretrained model can turn text into a fixed-size vector. You have already seen how to generate embeddings and how cosine similarity works. Here you put those pieces together into a working search.3 min read
07Chapter 7: Exact top-k search with matrix operationsThis chapter assumes you know basic Python and NumPy, and that you can compute a dot product and a vector length. It also assumes you have met cosine similarity and know how to produce embeddings with a pretrained model. Here you turn those pieces into a working search.3 min read
08Chapter 8: Chunking long documents for embeddingThis chapter assumes you can write basic Python, know what an embedding is, and have generated embeddings with a pretrained model. Chunking is the step between your raw documents and the embedding model.3 min read
09Chapter 9: Scaling up: approximate nearest-neighbor search (IVF, HNSW)This chapter assumes you can run the exact top-k search from the previous chapters and that you have NumPy and faiss-cpu installed. You should also be comfortable with unit-length vectors and cosine similarity.2 min read
10Chapter 10: Vector databases and libraries: what they add beyond an indexThis chapter assumes you know what an approximate nearest-neighbor (ANN) index does, as covered in the previous chapter. It also assumes you can read basic Python. The goal is to explain what a vector database provides that a bare index does not, so you can decide which one your project needs.2 min read
11Chapter 11: Hybrid search: combining BM25 and vector resultsThis chapter assumes you can run basic Python, know what an embedding is, and have built a top-k vector search like the one in the earlier chapters. You should also know the basic idea of keyword search.3 min read
12Chapter 12: Improving precision with cross-encoder rerankingThis chapter assumes you can build the semantic search from the earlier chapters: embed documents, embed a query, and take the top-k by cosine similarity. It also assumes you know recall@k and MRR.2 min read
13Chapter 13: Measuring retrieval quality: recall@k, MRR, and nDCGThis chapter assumes you can build a basic semantic search (embed documents, embed a query, rank by cosine similarity) and read short Python functions. Tuning chunk size, models, or indexes without a measurement is guesswork, so you need a small labeled test set and a few metrics.2 min read
14Chapter 14: Common pitfalls: normalization, query and document prefixes, model changes, domain mismatchThis chapter assumes you can run the earlier search code: you know how to embed text with a pretrained model, compute cosine similarity, and rank documents by score. The four pitfalls below break a working pipeline without raising an error. The code runs, the scores look plausible, and the results a3 min read