01Chapter 1: Three levers for adapting a modelA general-purpose large language model (LLM) rarely fits a specific task out of the box. You can change its output in three main ways: change the input (prompting), change the information it sees at query time (retrieval-augmented generation, or RAG), or change the model's weights (fine-tuning). Thi6 min read
02Chapter 2: Is it missing knowledge or behaving wrongly?This chapter assumes you have called a chat-style LLM API, can read Python, and know what an embedding and a context window are. It covers the first diagnostic step in choosing an adaptation approach: deciding whether a bad output comes from a knowledge gap or a behavior gap.6 min read
03Chapter 3: Measure first: an evaluation set and a baselineEvery adaptation approach in this tutorial (prompting, RAG, fine-tuning) changes the system's behavior. Without a measurement, you cannot tell whether a change helped, hurt, or only felt better on the three examples you tried. This chapter covers how to build a small evaluation set and record a base7 min read
04Chapter 4: Start with promptingThis chapter assumes you have called a chat-style LLM API before, can read Python, and know roughly what a context window is. It also assumes you have read the earlier chapters on diagnosing knowledge gaps versus behavior gaps and on building an evaluation set. Here you will use that evaluation set 6 min read
05Chapter 5: Few-shot examples and output structureThis chapter assumes you have called a chat-style LLM API, can read Python, and know what a context window is. It also assumes you read the previous chapter on starting with prompting. Few-shot examples are the next step after a clear instruction. They cost nothing to try, and they show whether prom7 min read
06Chapter 6: RAG: giving the model the facts at query timeThis chapter assumes you can call a chat-style LLM API, read Python, and know what an embedding and a context window are. It covers retrieval-augmented generation (RAG): what it fixes, how it works, and where it breaks. The next chapter goes inside the retrieval pipeline.5 min read
07Chapter 7: Inside a retrieval pipelineThis chapter opens the retrieval step of RAG and shows what happens between a user's question and the passages that reach the prompt. It assumes you have called a chat-style LLM API, can read Python, and know what an embedding and a context window are. It does not cover the decision of whether to us6 min read
08Chapter 8: Fine-tuning: changing the model's behaviorThis chapter assumes you have called a chat-style LLM API, can read Python, and know what a context window is. Earlier chapters covered prompting and RAG. Here you will learn what fine-tuning changes inside a model, which problems it fits, and how it fails.6 min read
09Chapter 9: Preparing training dataThis chapter assumes you can call a chat-style LLM API and read Python. It also assumes you have already built an evaluation set and a baseline, as covered earlier. Fine-tuning is only as good as the examples it learns from, so this chapter covers where those examples come from, how to format them, 6 min read
10Chapter 10: Parameter-efficient tuning with LoRAThis chapter assumes you have read the previous chapters on fine-tuning and training data. You should know that full fine-tuning updates every weight in a model. You should also be comfortable reading short Python snippets and know what a matrix is.7 min read
11Chapter 11: Comparing cost, latency, freshness, and controlThis chapter compares prompting, retrieval-augmented generation (RAG), and fine-tuning on four dimensions: cost, latency, freshness, and control. It assumes you can call a chat-style API, read Python, and know what embeddings and a context window are. Earlier chapters covered how each approach works7 min read
12Chapter 12: A decision frameworkThis chapter turns the earlier material into a repeatable process for choosing between prompting, retrieval-augmented generation (RAG), and fine-tuning. It assumes you can call a chat-style LLM API, read Python, and know what an embedding and a context window are. It also assumes you have seen how e6 min read
13Chapter 13: Combining prompting, RAG, and fine-tuningYou have read the earlier chapters on diagnosing knowledge gaps versus behavior gaps, building an evaluation set, and the three levers on their own. You can read Python and call a chat-style API. You know what an embedding and a context window are.6 min read
14Chapter 14: Maintenance and common failure modesThis chapter assumes you have read the earlier chapters on prompting, RAG, and fine-tuning. It also assumes you can read Python, have called a chat-style LLM API, and know what an embedding and a context window are. You will learn how each approach breaks over time, how to notice the break, and what7 min read