Topic 6
Clear instructions and personas
Most of prompt quality is plain clarity. AI Engineering (Ch. 5, "Write Clear and Explicit Instructions") puts it simply: communicating with AI is like communicating with humans, and clarity helps.
- Remove ambiguity. To score an essay, say whether the scale is 1 to 5 or 1 to 10, and what to do when unsure.
- Fix what you observe. If the model returns 4.5 and you want integers, say "integer scores only".
- Say the format, and say no preamble if you don't want one. Long outputs cost money and time.
- Mark where the answer starts. For a label, end with a marker like "-->" so the model doesn't keep appending input (the book's Table 5-3).
Hands-On Large Language Models (Ch. 6, "Instruction-Based Prompting") calls specificity "arguably the most important aspect".
Predict first
Scroll sideways to see the whole diagram
Start from the bare task. Alone it leaves the length, format and reader open.
Text version
- Start from the bare task. Alone it leaves the length, format and reader open.
- A persona sets the perspective the answer should take.
- Context says why the task exists, which shapes what matters in the answer.
- A format makes the output usable by the next step. Without one, the model picks its own.
- Audience and tone set the level and the voice.
- Then the data itself. Each component can be added or removed and its effect tested.
Components and example wording: Hands-On Large Language Models, Ch. 6 "The Potential Complexity of a Prompt".
Hands-On Large Language Models (Ch. 6, "The Potential Complexity of a Prompt") treats these as modular components: persona, instruction, context, format, audience, tone and data. Add or remove one at a time and judge the effect. Which ones help is an empirical question for your model and task.
Quick check