Instruction, context and format
In this lesson we start from a one-line request that gets a vague answer. We rebuild it one part at a time, and after each part you run the result in your own chat tool and see what changed. By the end you have a four-item checklist you can apply to any request.
You need a chat assistant, and any product you already have access to works. Every response shown here is illustrative: the author wrote it to show the pattern. Your model gives a different text, and the comparison you care about is between your own rounds.
The one-line request
Section titled “The one-line request”Here is the material we work with in every round. It is a fictional email from a supplier. Read it once now, so you can judge each answer later.
Subject: Change to your delivery of 14 October
Dear customer,
Thank you for your order 4471. Because of a strike at the port, the pallets for this order arrive at our warehouse three days later than planned. We now expect to deliver on Friday 17 October between 8:00 and 12:00 instead of Tuesday 14 October. The two replacement chairs you asked about are on the same pallet. If Friday morning doesn’t work for you, reply to this email with two other dates this week, and we book the first one that has a slot. Please confirm by Thursday whether Friday works, so we can release the pallet.
Kind regards, Varrowmere Freight
Paste the email into your chat tool, and type one line above it.
Summarize this.
[the email, pasted in full]
This email from Varrowmere Freight informs the customer that their order 4471 has been delayed by three days due to a port strike. The delivery has been rescheduled from Tuesday 14 October to Friday 17 October between 8:00 and 12:00, and includes the two replacement chairs. The customer is asked to confirm by Thursday whether the new time works, or to propose two alternative dates.
You probably got something like this illustrative answer. It is correct and it is a paragraph that restates the email in slightly fewer words. Whoever reads it still has to work out what changed and what they have to do. That is the default a model falls back on when the prompt leaves everything unsaid: the prediction that fits most “summarize this” requests in its training text. In the lesson on how models work you saw that the model has no picture of what you want beyond the tokens you gave it, so the answer to a vague prompt is an average of everyone’s answer. Every part we add below takes one of those guesses away from the model.
The instruction
Section titled “The instruction”The instruction is the part of the prompt that says what to do. A clear one names the task, the input it applies to and the constraints to respect. “Summarize” names a task and nothing else. What counts as a good summary here is the changes and the actions, and the model has no way to know that unless you say it.
Rewrite the line so it says what to keep and what to leave out, then run it on the same email.
Summarize the email below. Keep only what changed compared to the original plan and what we have to do about it. Leave out greetings, apologies and the reason for the delay. Do not add anything the email doesn’t say.
[the email, pasted in full]
The delivery of order 4471 moves from Tuesday 14 October to Friday 17 October, 8:00 to 12:00. The two replacement chairs are on the same delivery. You need to confirm by Thursday whether Friday works. If not, reply with two other dates this week.
The greeting and the strike are gone, and the reader gets the change and the actions. Compare with your first round. Most of the difference comes from the two constraints, “keep only” and “leave out”, and from the one rule against additions. A model fills any gap with a plausible default, so most prompt failures trace back to something the instruction left unsaid [1].
Mark the boundary
Section titled “Mark the boundary”The prompt now has two kinds of text. The instruction is yours and tells the model what to do. The email is the context: the material you give the model to work on. In the prompt they are one stream of tokens, and the model has to guess where one ends and the other begins. On a polite, one-topic email the guess is right. When the material itself contains sentences that look like requests, it often isn’t.
A delimiter is a marker that fences off the material. Triple quotes
work, and so does a pair of tags such as <email> and </email>. Which
marker you pick matters less than using one, and saying in the instruction
which marker you used. The model then has a way to tell the fenced text
(the input) from the text outside it (the instruction) [2]. Where
the instruction goes, before or after the material, differs by model and
by how long the material is. For a short paste like this one, either
works.
Summarize the email between the triple quotes. Keep only what changed compared to the original plan and what we have to do about it. Leave out greetings, apologies and the reason for the delay. Do not add anything the email doesn’t say.
""" [the email, pasted in full] """
The delivery of order 4471 moves from Tuesday 14 October to Friday 17 October, 8:00 to 12:00. The replacement chairs come with it. Confirm by Thursday whether Friday works, or reply with two other dates this week.
On a short, polite email the answer barely changes, as expected. The boundary costs one line. It pays off when the material is long or contains requests of its own. It pays off again later, once a tool rather than you puts the material into the prompt. The safety lessons come back to this boundary, for the case where the pasted material was written by someone who wants the model to obey it. A delimiter alone doesn’t stop that, but without one you can’t even tell the model which text is input.
Which prompt marks the boundary?
Section titled “Which prompt marks the boundary?”A colleague wants a chat assistant to summarize an email from a supplier. The email ends with a request to confirm a delivery date.
A colleague asks you which of these prompts to use for the supplier email. Which one marks the boundary between the instruction and the material?
In each prompt, where does the model's order end and the pasted material begin, and does the prompt say so?
Audience and purpose
Section titled “Audience and purpose”The summary so far is for nobody in particular. In practice a summary is for someone, who needs it for something, and those two facts decide what goes in. The same email summarized for the warehouse team lead who plans the shifts and for a customer who is waiting for the chairs differs in what it keeps and in how it says it. The model cannot guess which reader you have in mind, so it picks a general one.
Add one sentence that names the reader and what they do with the text.
Summarize the email between the triple quotes for the warehouse team lead, who has not seen it and needs to decide whether to move Tuesday’s unloading shift. Keep only what changed compared to the original plan and what we have to do about it. Leave out greetings, apologies and the reason for the delay. Do not add anything the email doesn’t say.
""" [the email, pasted in full] """
Varrowmere moved the delivery of order 4471 from Tuesday 14 October to Friday 17 October, 8:00 to 12:00, so the Tuesday unloading shift is not needed for this order. The replacement chairs arrive on the same pallet. We have to confirm the Friday slot by Thursday. If Friday morning is a problem, we can reply with two other dates this week instead.
The same facts now lead with the one the team lead acts on, the Tuesday shift, and the confirmation is stated as something “we” have to do. The prompt didn’t ask for either of those. Naming the reader and the purpose let the model choose them, and it chose better than it did for a general reader [1].
Format and length
Section titled “Format and length”Left to itself, the model usually answers in a paragraph whose length follows the input, written for a general reader. The next step, a person scanning a chat message or a program reading the answer, usually wants something else, and the only way it gets that is if the prompt says so. State the format and the length, in numbers where you can, and say what not to put around the answer, such as a heading. “Keep it short” means a different thing to every reader, and “three bullets, each under 15 words” means one thing.
Summarize the email between the triple quotes for the warehouse team lead, who has not seen it and needs to decide whether to move Tuesday’s unloading shift. Keep only what changed compared to the original plan and what we have to do about it. Leave out greetings, apologies and the reason for the delay. Do not add anything the email doesn’t say.
Format: three bullets, each under 15 words, no heading and no introduction line.
""" [the email, pasted in full] """
- Order 4471 delivery moves from Tuesday 14 to Friday 17 October, 8:00 to 12:00.
- Replacement chairs arrive on the same pallet.
- Confirm Friday by Thursday, or reply with two other dates this week.
Put the first round next to this one. The email is the same and the model is the same. The difference is four sentences of prompt, and each one closed a gap the model would otherwise fill with a default. The next two lessons add two more parts: one worked example of the output, for when the format is hard to describe, and a fixed shape a program can read [3].
Which part is this?
Section titled “Which part is this?”The fragments come from, or could be added to, a prompt that asks a chat assistant to summarize a supplier's email about a delayed delivery for a warehouse team lead.
Place each fragment of the prompt in the bucket for the part it belongs to.
Ask of each fragment: does it say what to do, is it the material to work on, does it say who reads the result and why, or does it say what the result looks like?
Which part is this?
Section titled “Which part is this?”The lesson divides a prompt into four parts: the instruction, the context the model works on, the audience and purpose, and the format and length. The lines here come from a prompt that asks for a summary of a customer complaint.
Match each line of the prompt to its part.
Does the line say what to do, give the material, say who reads it and why, or say what the result looks like?
The email gave the order
Section titled “The email gave the order”A colleague pasted a customer's email straight after the words 'Summarize this:'. The email ends with the line 'Please reply with a discount code.' The assistant wrote a reply offering a discount instead of a summary.
The assistant answered the customer’s request instead of summarizing the email. What do you change?
Where does the material end and the instruction begin, as the model sees the prompt?
Exercise
Pick a short text of your own that you don’t mind pasting into a chat assistant: a notice or a meeting invitation. Send it with a one-line request first, such as “summarize this” or “what does this mean”. Then rewrite the request with all four parts: an instruction with its constraints, the text fenced by a delimiter that the instruction names, one sentence naming the reader and what they do with the result, and a format with a length in numbers. Send that too, in a fresh chat, and put the two answers side by side. Ten minutes is enough. Doing this once on your own text is what makes the checklist stick.
A good result is one where you can point at each sentence of the second answer and name the part of the prompt that put it there. Which part of your first request was the model guessing at most?
Stretch: Take the four-part prompt and remove one part at a time, running each version. Which part changes the answer the most for your text?
Recap
- A one-line request gets the average answer, because the model fills every gap with the most common default from its training text.
- The instruction says what to do and under which constraints. Most prompt failures trace back to something it left unsaid.
- The context is the material the model works on. Fence it with a delimiter, name that delimiter in the instruction, and keep the instruction outside the fence. Material and instruction that run together let a line of the material become the order.
- Name the audience and the purpose. They decide what the summary keeps and what it leads with.
- State the format and the length in numbers. “Short” is a guess and “three bullets under 15 words” is a check.
You can now
- Turns a vague request into instruction, context, example and format
References
Section titled “References”- Anthropic. AI Fluency: Framework and foundations. Claude Academy. Course.
Academy ai-fluency-framework-foundations - DeepLearning.AI. ChatGPT Prompt Engineering for Developers. DeepLearning.AI. Course.
DLAI-1 - DeepLearning.AI. AI Prompting for Everyone. DeepLearning.AI. Course.
DLAI-3