Need AI Training/Help?CloudYeti.io/meet
MarkdownMe
Prompt optimizer guide

How to Structure a Prompt (Template)

The building blocks of a strong prompt — role, context, task, constraints, output format, and examples — with a reusable template.

Direct answer

A strong prompt has six parts: a role, the context the model needs, one clear task, explicit constraints, the exact output format, and an example or two. Give the model a role, supply the context, state a single task, list constraints, define the output format, then show an example. The optimizer assembles these from a rough idea.

Open the Prompt Optimizer

When to use this

  • Your prompts are one line and the output is inconsistent.
  • You want a reusable template instead of rewriting from scratch each time.
  • You are building a prompt to reuse or share.

Steps

  1. Set a role: You are a senior technical writer.
  2. Give context: the audience, the source material, and any constraints.
  3. State one task in a single sentence.
  4. List constraints: length, tone, what to avoid.
  5. Define the exact output format (list, table, JSON, sections).
  6. Add one example of the input and the ideal output, then optimize.

Example

Rough prompt idea
write release notes
Optimized prompt
You are a release manager.
Context: I will paste a list of merged pull requests.
Task: Write user-facing release notes from them.
Constraints: Group by Added, Fixed, Changed. One line each. No internal jargon.
Output format: Markdown with an H2 per group and bullet points.
Example input: "Fix login redirect" -> Fixed: - Login now redirects correctly.

Common mistakes

  • Skipping the output format is the top reason outputs vary run to run.
  • Cramming several tasks into one prompt; split them or chain the prompts.
  • Vague roles like 'be helpful' add nothing; name real expertise and audience.

FAQ

What are the parts of a good prompt?
Role, context, a single task, constraints, the exact output format, and one or two examples. Missing the output format and constraints is what makes results inconsistent.
Do I need all six parts every time?
No. Simple tasks need fewer. But adding an explicit task, constraints, and output format reliably improves results even for short prompts.
How is this different from reviewing a prompt?
This is about building a well-structured prompt. If you already have a prompt and want it critiqued, use the prompt reviewer instead.

Related prompt guides

Related Prompt Optimizer guides