How to Write a Good AI Prompt: Goal and Context
Build reliable prompts using the three core pillars: Goal, Context, and Constraint.
Why this matters
Most bad AI answers come from a missing detail, not a bad AI. A clear goal, some background, and a few rules fix that quickly.
The Three Parts of a Good Prompt
A strong prompt has three parts. Goal: what to do. Context: the background. Constraints: the rules, such as length and tone.
In real life: Picture a taxi ride. Goal: take me to Ikeja. Context: I have a meeting at 6 PM. Constraint: use the fastest road. Take away any one of these and the driver has to guess.
Rules Make Answers Consistent
Without limits on length, tone, and format, answers change a lot each time. Clear limits keep them steady.
In real life: Without limits, the same request can give you three words one time and three paragraphs the next. A rule like 'under 30 words' makes the answer the same size every time.
Goal: Apologize for delay Context: Rain in Abuja Constraint: Under 30 words
Your practice task
Draft an apology SMS to customer Babatunde Ade whose parcel in Abuja was delayed by rain. State the Goal (apologize and offer ₦2,000 credit), provide Context, and enforce Constraints (under 30 words, professional tone).
How to do it
- Write the Goal: what you want the AI to do.
- Add the Context: who the customer is, what happened, and the credit amount.
- Add the Constraints: how long it can be and what tone to use.
- Press Run proof.
Practice it for free in the app. You get instant checks that show what you got right and what to fix. A lesson takes about two minutes and you can try as many times as you like.
Quick reference: Three-Pillar Prompt Format
Prevents models from missing essential facts or writing rambling responses.
Goal: [Objective] Context: [Key data] Constraint: Under [N] words, professional tone.
More lessons in this course
- Refining Prompts for StructureTurn unstructured drafts into polished executive communication through targeted structural constraints.
- Grounding to Source FactsPrevent AI hallucinations by strictly confining answers to provided context documents.
- Workplace Action ChecklistsExtract structured, accountable action items with designated owners from messy meeting transcripts.