02Chapter 2: The parts of a promptA prompt is the only input a language model receives. It has no memory of your intent beyond the text you send, so every piece of information the model needs must be in that text. This chapter breaks a prompt into four parts, shows how to recognize each one, and covers the errors that appear when a 7 min read
03Chapter 3: Writing clear, specific instructionsThis chapter assumes you have used a chat-based assistant, can read short Python snippets, and know what JSON is. It also assumes you know a prompt is the only input a model receives, and that a prompt has parts such as an instruction, context, and input data. Here you will learn to write the instru8 min read
04Chapter 4: Giving context and separating input from instructionsThis chapter assumes you have read the earlier chapters on prompt anatomy and clear instructions. You should know the four parts of a prompt: instruction, context, input data, and output specification. You should be able to read short Python snippets. The Python here uses only the standard library.7 min read
05Chapter 5: Setting a role with system promptsThis chapter assumes you have read the earlier chapters on prompt anatomy and clear instructions. It also assumes you can read short Python snippets and understand JSON. You should know what an instruction, context, and an output specification are.7 min read
06Chapter 6: Teaching by example: zero-shot and few-shot promptsThis chapter assumes you can read short Python snippets and know what JSON is. It also assumes you have written clear instructions and separated input from instructions with delimiters, as covered in earlier chapters. Here you will learn when instructions alone are enough and when you should show th6 min read
07Chapter 7: Getting predictable output formatsThis chapter assumes you can read short Python snippets, know basic JSON, and have written a few prompts that state a task and constraints. Here you will learn how to make a model's replies consistent enough for a program to read them.8 min read
08Chapter 8: Asking for step-by-step reasoningThis chapter assumes you have read the earlier chapters on clear instructions, few-shot examples, and output formats. You should be comfortable reading short Python snippets and basic JSON. Here you will learn when asking a model to show its work improves answers, how to ask for it, and how to keep 7 min read
09Chapter 9: Splitting complex tasks into chained promptsThis chapter assumes you can write a clear instruction, use delimiters, request structured output, and validate JSON in Python. It builds on the output-format and reasoning chapters. Here you will learn to split one large task into several smaller prompts, pass results between them, and decide when 6 min read
10Chapter 10: Sampling parameters and output variabilityThis chapter covers why the same prompt can produce different replies, and which settings control that variation. It assumes you have read the earlier chapters on prompt anatomy and output formats. You should be comfortable reading short Python snippets and know basic JSON.7 min read
11Chapter 11: Testing and improving prompts systematicallyEarlier chapters covered techniques for writing prompts: clear instructions, delimiters, roles, examples, and output formats. This chapter covers how to tell whether a change to a prompt made it better. It assumes you can read short Python snippets, know basic JSON, and have used a chat-based assist7 min read
12Chapter 12: Limits of prompting: hallucination and prompt injectionEarlier chapters showed how clear instructions, delimiters, examples, and output formats make a model's replies more reliable. This chapter covers what those techniques cannot fix. It assumes you have read the chapters on context and delimiters and on testing prompts. You should also be able to read7 min read