01Chapter 1: Decide what the summary is forA summary that works for one reader can fail for another. Before you write a prompt or pick a strategy, decide what the summary is for. This chapter gives you three decisions to make first: purpose, audience, and length. It also shows how to record them so that your prompt and your evaluation both u3 min read
02Chapter 2: Extractive and abstractive summariesThis chapter assumes you can write basic Python, have sent prompts to an LLM through an API or chat interface, and know roughly what a token is. It covers the two basic ways a summary can be built, and how to ask an LLM for each one.2 min read
03Chapter 3: Tokens and context windows: will it fit?This chapter assumes you know basic Python, have sent prompts to an LLM through an API or chat interface, and have heard of tokens. Here you will learn to check whether a document fits in a model's context window before you send it.3 min read
04Chapter 4: Writing a summarisation promptThis chapter assumes you can call an LLM from Python and know roughly what a token is. It covers how to turn the purpose, audience and length of a summary into a prompt, and which prompt mistakes cause most bad summaries.2 min read
05Chapter 5: Summarising in a single passThis chapter assumes you can write basic Python, have sent prompts to an LLM through an API, and know that models read text as tokens. Single-pass summarisation means sending the whole document to the model in one call and getting one summary back. It is the simplest strategy, and you should try it 3 min read
06Chapter 6: Why long inputs degrade qualityThis chapter assumes you can send prompts to an LLM, read basic Python, and know that models read text as tokens. It covers why a document that fits in the context window can still produce a worse summary, and how to spot and reduce the problem.3 min read
07Chapter 7: Splitting a document into chunksThis chapter assumes you can write basic Python, have sent prompts to an LLM through an API, and know that models read text as tokens. Here you will learn how to split a document that is too long for one prompt into pieces the model can summarise one at a time.3 min read
08Chapter 8: Map-reduce: summarise the parts, then combineThis chapter assumes you can call an LLM from Python, know what a token is, and have seen the chunking function from the previous chapter. Here you will build a map-reduce summariser and learn where it breaks.3 min read
09Chapter 9: Refine: carry a running summary forwardThis chapter assumes you can write basic Python, have sent prompts to an LLM, and know what a token is. It also assumes you have already split a document into chunks, as in the previous chapters on chunking and map-reduce.3 min read
10Chapter 10: Hierarchical summarisation for very long documentsThis chapter assumes you know basic Python, have sent prompts to an LLM through an API, and understand tokens. It also assumes you have read the chapters on chunking and map-reduce. Hierarchical summarisation extends map-reduce for documents that are too long for one combine step.3 min read
11Chapter 11: Keeping summaries faithful to the sourceThis chapter assumes you can write basic Python, have sent prompts to an LLM through an API, and know what tokens are. You should also have read the chapters on map-reduce and refine summarisation, because the failure modes below depend on how those pipelines pass text between calls.3 min read
12Chapter 12: Evaluating summary qualityThis chapter assumes you can call an LLM from Python, know what tokens are, and have built a summariser with one of the strategies from earlier chapters. Here you will learn how to tell whether a summary is any good.3 min read
13Chapter 13: Cost and latency trade-offsThis chapter assumes you can write basic Python, have called an LLM through an API, and know that models read and write tokens. It also assumes you have seen the three strategies from earlier chapters: single-pass, map-reduce and refine. Here you will estimate what each one costs and how long it tak3 min read