02Chapter 2: Why we chunk: retrieval precision, recall, and noiseThis chapter assumes you know basic Python, what an embedding is, how vector similarity search ranks results, and the retrieve-then-generate idea behind RAG. It also assumes you know what a token is. The chapter explains the reasons for splitting documents, so that later chapters on size, overlap, a7 min read
03Chapter 3: Tokens, embedding input limits, and context budgetsThis chapter assumes you know what a token is in a language model, what an embedding is, and how vector similarity search ranks results. It also assumes you can read basic Python. Earlier chapters showed where chunking sits in a RAG pipeline and why we chunk at all. This chapter covers the hard nume7 min read
04Chapter 4: Choosing chunk size and overlapThis chapter assumes you know basic Python, what an embedding is, how vector similarity search ranks results, and what a token is. Earlier chapters covered where chunking sits in a RAG pipeline, why we chunk, and the token limits that apply. Here you will decide how big chunks should be and how much7 min read
05Chapter 5: Fixed-size chunking with overlapThis chapter covers the simplest chunking strategy: cut a document into pieces of roughly equal length, and let neighboring pieces share some text. It is the baseline that the later strategies in this tutorial are compared against.7 min read
06Chapter 6: Recursive splitting on natural separatorsFixed-size chunking cuts text wherever the counter runs out, even in the middle of a sentence. Recursive splitting tries to cut at natural boundaries first. It prefers paragraph breaks, then line breaks, then sentence ends, then spaces, and it falls back to a finer boundary only when a piece is stil6 min read
07Chapter 7: Sentence-based chunkingThis chapter assumes you know basic Python, what an embedding is, and how a retrieval-augmented generation (RAG) pipeline retrieves chunks and then generates an answer. It also assumes you have read the chapters on chunk size and overlap and on fixed-size chunking.7 min read
08Chapter 8: Respecting document structure: headings, code, and tablesThis chapter assumes you know basic Python, what an embedding is, and how the fixed-size and recursive splitters from the previous chapters work. Those splitters see text as a stream of characters. Real documents are not streams. They have headings that scope the text below them, code that breaks wh7 min read
09Chapter 9: Adding metadata and context to chunksThis chapter assumes you can read basic Python and know what an embedding is. It also assumes you have seen the Markdown splitter from the structure-aware chapter, which returns sections as dictionaries with headings and text. Here you attach information to each chunk so that it still makes sens6 min read
10Chapter 10: Small chunks for search, larger parents for contextThis chapter assumes you can write basic Python and know what an embedding is. It also assumes you know how top-k vector search works and have seen fixed-size or recursive chunking from earlier chapters. You should also know what a token is.6 min read
11Chapter 11: Semantic chunking: splitting where meaning shiftsThis chapter assumes you can read basic Python and know what an embedding is. It also assumes you know that cosine similarity measures how close two embeddings are, and that you have seen fixed-size and recursive chunking from earlier chapters.5 min read
12Chapter 12: Measuring chunking quality with recall@kThis chapter assumes you know basic Python, what an embedding is, how vector similarity search ranks results, and what a token is. You should also have read the earlier chapters on chunk size, overlap, and the fixed-size and recursive splitters. Here you will learn how to compare chunking settings w6 min read
13Chapter 13: Choosing a strategy and avoiding common pitfallsThis chapter assumes you can read basic Python, know how embeddings and vector similarity search work, and know what a token is. It also assumes you have met the chunkers from earlier chapters: fixed-size with overlap, recursive splitting, sentence-based, structure-aware, semantic, and parent-child.5 min read