How to Write a ChatGPT Prompt That Actually Works: A 5-Part Framework
Published · Updated
Most "prompt engineering" advice is either too vague ("be specific!") or too mystical (magic words that supposedly unlock the AI). The truth is simpler: good prompts have a structure, and you can learn it in five minutes.
This is the framework we use for every template in the Prompt Library. Five parts: Role, Task, Context, Format, Constraints.
The framework at a glance
[Role] You are an experienced product manager. [Task] Turn my rough notes into a one-page product brief. [Context] The audience is engineering leads who haven't seen this project before. Notes: {your notes} [Format] Use these sections: Problem, Proposed solution, Success metrics, Open questions. Keep it under 400 words. [Constraints] Don't invent details that aren't in the notes; mark gaps as "TBD". No marketing language.
Every part earns its place. Let's take them one at a time.
1. Role: who is answering
Telling the model who to be is the cheapest quality upgrade available. "You are an experienced hiring manager" produces measurably different (and more useful) output than no role at all, because it anchors vocabulary, priorities, and level of detail.
Make the role match the judgment you need: a "senior editor" edits differently than a "grammar checker". Don't stack five roles; one good one is enough.
2. Task: one clear verb
The task is the sentence most prompts already have, but usually with three tasks tangled together. "Summarize this and suggest improvements and rewrite the intro" gets you a mediocre version of all three. Split them, or sequence them explicitly ("First…, then…").
Strong task verbs: summarize, rewrite, critique, extract, compare, draft, explain, list. Weak ones: help me with, look at, do something about.
3. Context: what the model can't know
The model doesn't know your audience, your goal, or your situation unless you say so. Context is where most output quality is actually won or lost:
- Audience: "for a non-technical executive" vs "for the engineer taking over this code"
- Purpose: "to convince" vs "to inform" vs "to decide"
- The material itself: paste it. Don't describe your meeting notes; include them.
If you've ever thought "the AI just doesn't get it", the missing ingredient was almost always context, not cleverness.
4. Format: what the output should look like
Unspecified format is why you get a wall of text when you wanted a table. Say exactly what you want back:
- "Return a markdown table with columns: Risk, Likelihood, Mitigation"
- "Three options, each with a one-line pitch and one drawback"
- "Under 150 words, no bullet points, no preamble"
Format instructions are followed remarkably reliably. They're the easiest part of the prompt to get right and the most annoying one to leave out.
5. Constraints: the guardrails
Constraints prevent the failure modes you've already experienced: invented facts, padded intros, hedge-everything answers.
- "If information is missing, say so, don't guess."
- "No introductions or conclusions; start with the first item."
- "Stay under 300 words."
- "Use only the information in the pasted text."
Add constraints reactively: each time an output annoys you, encode the fix as a constraint. After three uses your prompt is sharp.
Before and after
Before: "Write something about our new feature for the newsletter."
After:
You are a SaaS marketing writer. Draft a newsletter section announcing our new feature. Context: the feature lets users share prompt templates with teammates; readers are existing users, mostly non-technical; goal is to get them to try it this week. Format: a 40-character heading, then 80 to 120 words, then a one-line call to action. Constraints: no exclamation marks, no "we're excited", mention the 2-click share flow exactly once.
Same request. The second one works on the first try, because each of the five parts is doing its job.
The real trick: never write it twice
Here's the thing about a five-part prompt: it takes effort to write, which is exactly why you shouldn't write it twice. Once a prompt works, turn it into a reusable template: keep the role, format, and constraints fixed, and make the context a fill-in field.
That's what PromptBuild is for: the builder turns your best prompt into a fill-in template, and the Prompt Library is full of templates already structured this way. Write it well once, reuse it forever.
Tags: Guides, Prompt Writing