01Chapter 1: Where chunking sits in a RAG pipelineThis chapter assumes you know basic Python and what an embedding is. It also assumes you know that vector similarity search finds the stored vectors closest to a query vector. You should have a general idea of retrieval-augmented generation (RAG): retrieve relevant text, then give it to a language m3 min read
02Chapter 2: Why we chunk: retrieval precision, recall, and noiseThis chapter assumes you know what an embedding is, how vector similarity search ranks results, and the retrieve-then-generate idea behind RAG. It also assumes basic Python. It explains why documents are split at all, and what goes wrong when the splits are too big or too small.3 min read
03Chapter 3: Tokens, embedding input limits, and context budgetsThis chapter assumes you know basic Python, what an embedding is, and how a RAG system retrieves and then generates. It also assumes you know that a token is the unit a language model reads. Here you will see why chunk size has to be measured in tokens, and which limits it must fit inside.3 min read
04Chapter 4: Choosing chunk size and overlapThis chapter assumes you know what an embedding is, how vector similarity search ranks results, and what a token is. Chunk size and overlap are the two settings you will tune most often, so it helps to know what each one trades away.3 min read
05Chapter 5: Fixed-size chunking with overlapFixed-size chunking cuts a document into pieces of a set length. It is the simplest strategy and the baseline that other strategies are measured against. This chapter assumes you know basic Python, what an embedding is, and what a token is.3 min read
07Chapter 7: Sentence-based chunkingThis chapter assumes you can read basic Python and know how fixed-size chunking works. You should also know that each chunk is embedded as one unit. Here you will build a chunker that never cuts a sentence in half.3 min read
08Chapter 8: Respecting document structure: headings, code, and tablesThis chapter assumes you can read Python and know what an embedding is. It also assumes you have seen fixed-size and recursive splitting from earlier chapters. Those splitters treat a document as a flat string. Real documents have headings, code blocks, and tables, and a splitter that ignores them p2 min read
09Chapter 9: Adding metadata and context to chunksThis chapter assumes you know what an embedding is, how vector similarity search works, and basic Python. It builds on the structure-aware splitter from the previous chapter.2 min read
10Chapter 10: Small chunks for search, larger parents for contextThis chapter assumes you know what an embedding is, how vector similarity search ranks results, and the basic retrieve-then-generate loop. It also assumes you have read the earlier chapters on chunk size, overlap, and recursive splitting.2 min read
11Chapter 11: Semantic chunking: splitting where meaning shiftsThis chapter assumes you have read the earlier chapters on fixed-size and recursive splitting. It also assumes you can compute cosine similarity between two embedding vectors.2 min read
12Chapter 12: Measuring chunking quality with recall@kThis chapter assumes you can read basic Python, know what an embedding and vector similarity search are, and have seen the chunkers from earlier chapters. You will build a small evaluation set and use it to compare chunking settings with numbers instead of intuition.3 min read
13Chapter 13: Choosing a strategy and avoiding common pitfallsThis chapter assumes you have read the earlier chapters. You should know what a token is, how embeddings and vector search work, and how fixed-size, recursive, structure-aware, semantic, and parent-child chunking work. Here you will turn those techniques into a decision.3 min read