How to Write Better AI Prompts โ The 5-Part Formula
Vague prompts get vague answers. The 5-part formula (role, goal, context, constraints, format) behind prompts that actually work.
Most people prompt AI the way they'd text a friend: a few vague words, no context, then disappointment at the generic answer. The fix isn't a longer prompt โ it's a structured prompt. Five parts, every time.
1. Role โ who is the AI?
"Act as a senior Python developer" beats "help me with code" enormously. A role primes the model toward the right vocabulary, depth, and conventions. Be specific: "patient statistics tutor for a first-year student" beats "teacher."
2. Goal โ what exactly do you want?
State the outcome in one concrete sentence. Not "write about fitness" but "write a 300-word beginner's guide to home workouts without equipment." If you can't state the goal clearly, the AI can't hit it.
3. Context โ what should it know?
The model doesn't know your situation. Give it the relevant facts: your audience, your constraints, what's already been tried. Three lines of context routinely double answer quality.
4. Constraints โ what are the rules?
Tone, length, things to avoid, things to include. "Professional tone, under 200 words, no jargon, end with a call to action" eliminates 90% of the output you'd otherwise have to edit away.
5. Format โ what shape should the answer take?
Bullet points or paragraphs? Table or essay? Step-by-step or summary? Models default to walls of text unless told otherwise โ specifying format is the highest-leverage line in any prompt.
Putting it together
"Act as a direct-response copywriter. Write a product description for a stainless steel water bottle. Audience: gym-goers aged 25โ40. Tone: energetic but not hype-y. Under 150 words, benefits over features, end with one call to action. Format: headline plus two short paragraphs." โ every part earns its place, and the output needs almost no editing.
The meta-rule
If the answer disappoints you, the prompt was missing one of the five parts โ usually context or format. Don't argue with the AI; fix the prompt. Ninety percent of "AI is dumb" moments are actually "my prompt was vague" moments.