Good prompts almost always have the same six parts, in roughly the
same order. Skip parts at your own risk.
1. Role / persona — who the model is supposed to be
2. Task — the single sentence describing the work
3. Context / inputs — the data the task operates on
4. Output format — what shape the response must take
5. Constraints — what the model must / must not do
6. Examples — 1-3 ideal input/output pairs (optional but powerful)
Role / persona. "You are a senior copy editor at a technology
publication. Your job is to…" — sets the prior over what
"reasonable" output looks like. Effect is real but small. Don't
spend more than two sentences here.
Task. "Summarise the article in exactly 5 bullets, each
highlighting a distinct fact." — the verb plus the specific
deliverable. Should be one sentence. If you need two sentences, your
task is two tasks; split the prompt.
Context / inputs. "Here is the article: {{articleText}}" — the
data plug. Use named placeholders ({{varName}}) so the calling
code is explicit about what's substituting. Wrap large inputs in
delimiters (<article>...</article> or triple-backticks) so the
model knows where the user data ends and your instructions resume.
Output format. "Return strict JSON matching the schema below.
No prose before or after." — be ruthlessly explicit. "JSON" alone
is a suggestion. "Strict JSON, no prose, no markdown fences, no
explanation" is a directive. If the format is JSON, paste a
1-line schema example.
Constraints. "Each bullet must be one sentence under 15 words.
Do not include marketing language. If the article doesn't contain
enough material for 5 bullets, return fewer." — the negative
space. Anything you've ever wished a model didn't do, write here.
Examples. "Input: . Output: <ideal 5
bullets>." — 1-3 pairs. Examples are the single most effective
intervention you can make on prompt quality, and they're the most
under-used. They're also the costliest in tokens, so they live
behind the "do I need this?" question.
Anti-pattern: the kitchen sink
Tempting to dump everything: 12 paragraphs of role, 8 examples, 30
constraints, 4 layers of nested instructions. The model gets
confused, output quality falls, you pay 4x in tokens. Trim
mercilessly. The shortest prompt that hits the rubric is the right
prompt.
How PromptLab helps with this
- "✨ Compose with AI" drafts the six parts for you from a
plain-English task description. Fill the form (task, output
format, constraints, optional examples), pick a target model,
and the Lab Assistant returns a prompt with role/task/context/
format/constraints/examples already organised. You then edit by
hand instead of starting from a blank editor.
- Per-model variants in the Compose result mean the same task
is structured differently for Claude (XML tags), GPT-4o
(structured chat + JSON schema), and Gemini (markdown sections).
You don't have to know each model's preferences; the assistant
encodes them.
- Diff view in the Optimize sheet highlights when a structural
change (e.g. moving constraints before examples) actually helps
vs. when it's neutral. Visual diff + projected eval delta makes
the costliness of structural changes legible.