02Chapter 2: Why the user's question is often a poor search queryThis chapter assumes you have built a basic RAG pipeline (index, retrieve, generate). It also assumes you know roughly how embedding search and keyword search (BM25) rank documents, and that you can read Python. Later chapters cover the fixes. This one covers diagnosis: how to tell why a query faile7 min read
03Chapter 3: Query rewriting: the core idea and where it sits in the pipelineThis chapter assumes you have built a basic RAG pipeline (index, retrieve, generate). It also assumes you know what embeddings and BM25 keyword search do, can call a language model with a text prompt, and can read Python. The chapter explains what query rewriting is and where it fits in a pipeline. 6 min read
04Chapter 4: Turning follow-up questions into standalone queriesThis chapter assumes you can read Python, you have a working RAG pipeline (index, retrieve, generate), and you can call an LLM with a text prompt. You should also know how embedding or BM25 search returns a ranked list for a query string. The earlier chapters on why raw queries fail and on the role 5 min read
05Chapter 5: Multi-query expansion: searching with several phrasingsThis chapter assumes you can build a basic RAG pipeline (index, retrieve, generate) and that you know how embedding and BM25 search work. You should also be comfortable calling an LLM with a text prompt and reading Python. The previous chapters showed why a user's raw question is often a weak search6 min read
06Chapter 6: Merging ranked lists with reciprocal rank fusionThis chapter assumes you can read Python, you know how vector search and keyword (BM25) search return ranked results, and you have seen the multi-query idea from the previous chapter. Here you learn how to combine several ranked lists into one list, and why a rank-based method is usually the safest 6 min read
07Chapter 7: HyDE: searching with a hypothetical answerThis chapter assumes you have a working RAG pipeline with an index, a retriever and a generation step. It also assumes you know what embeddings and cosine similarity are, can call an LLM with a text prompt, and can read Python. Earlier chapters covered conversational rewriting and multi-query expans6 min read
08Chapter 8: Step-back queries for broader contextThis chapter covers the step-back technique. It assumes you know the basic RAG pipeline (index, retrieve, generate) and can call a language model with a text prompt. You should also be able to read Python and know what embedding search and BM25 do. It reuses reciprocal_rank_fusion from the earlier6 min read
09Chapter 9: Decomposing complex questions into sub-questionsThis chapter assumes you have a working RAG pipeline (index, retrieve, generate). It also assumes you can call an LLM with a prompt and read Python. Earlier chapters covered conversational rewriting, multi-query expansion and reciprocal rank fusion (RRF). Here you add a technique for questions that 6 min read
10Chapter 10: Multi-step retrieval: using earlier results to shape later queriesThis chapter assumes you can read Python and have built a basic RAG pipeline (index, retrieve, generate). It also assumes you know what a top-k search returns and have read the earlier chapters on decomposition and reciprocal rank fusion. Here we cover the case where a later search cannot be written5 min read
11Chapter 11: Building an iterative retrieval loop with a stopping ruleThis chapter assumes you can read Python, have built a basic RAG pipeline (index, retrieve, generate), and know what top-k search returns. It also assumes you have seen reciprocal rank fusion and query decomposition in earlier chapters. Here you build the loop that ties multi-step retrieval together6 min read
12Chapter 12: Routing queries to strategies, or skipping retrievalThis chapter assumes you have read the earlier chapters on conversational rewriting, multi-query expansion, decomposition, and the iterative loop. You should be comfortable calling an LLM with a text prompt and reading Python. Everything so far has applied one technique to every question. Here you w6 min read
13Chapter 13: Measuring whether rewriting helpsThis chapter assumes you have read the earlier chapters on rewriting techniques, rank fusion and iterative retrieval. It also assumes you can read Python and know what top-k retrieval returns. The chapter covers how to tell whether a rewriting step made retrieval better, and what to look at when it 6 min read
14Chapter 14: Cost, latency and query driftThis chapter assumes you have read the earlier chapters on rewriting, multi-query expansion, reciprocal rank fusion, decomposition and the iterative retrieval loop. It also assumes you can read Python and know that every language model call costs money and time. Each technique so far improves recall6 min read