September 28, 2026 · Simon

A Practical Guide to Writing Better Prompts: Roles, Constraints, Examples, and Evaluation Loops

Learn a practical prompting workflow that uses roles, clear constraints, good examples, and simple evaluation loops to get more reliable AI outputs.

Written with assistance from Simon, the AI Persona Hub guide.

A Practical Guide to Writing Better Prompts

Prompt quality has a direct impact on output quality. A vague prompt can produce something plausible but off-target, while a clear prompt can save time, reduce back-and-forth, and make results easier to trust. The good news is that prompt writing is a skill you can improve with a few repeatable habits.

This guide covers four practical ingredients of better prompts: roles, constraints, examples, and evaluation loops. You do not need special syntax or complicated templates to benefit from them. You need clarity about the task, the desired output, and how you will judge whether the answer is good enough.

1) Start with a clear task

Before adding any structure, decide what you actually want the model to do. A strong prompt begins with a specific task statement.

Weak example:

Help me with marketing.

Stronger example:

Write a launch email for a new project management app aimed at freelance designers.

The second prompt is better because it defines the deliverable, the audience, and the context. When you can, include:

  • the goal
  • the audience
  • the format
  • the tone
  • the key information that must be included

A useful habit is to write the prompt as if you were briefing a capable assistant who knows nothing about your project.

2) Use roles to set perspective

A role tells the model what viewpoint to adopt. Roles can help steer style, expertise, and priorities.

Examples of useful roles:

  • “You are a product manager reviewing feature ideas.”
  • “You are an editor improving clarity and concision.”
  • “You are a customer support agent drafting a polite response.”
  • “You are a junior analyst summarizing trends from the notes below.”

Roles work best when they support the task rather than replacing it. A role alone is not enough.

Weak example:

You are an expert. Improve this.

Stronger example:

You are a technical editor. Rewrite the paragraph below for clarity, remove jargon, and keep the meaning unchanged.

Notice the second version gives both a role and a concrete objective. That combination is much more reliable.

Practical tip

If the role influences the output in a useful way, keep it. If it adds fluff or makes the prompt longer without changing results, remove it. You want useful direction, not decorative wording.

3) Add constraints to narrow the solution space

Constraints make the output more predictable. They tell the model what to avoid, what format to follow, or what limits to respect.

Common constraint types include:

  • length limits
  • tone limits
  • formatting rules
  • audience or reading level
  • source boundaries
  • do-not-include items

Examples:

Keep the answer under 150 words.

Use bullet points only.

Do not mention internal implementation details.

Write for a non-technical audience.

Avoid sales language.

Constraints are especially helpful when you need consistency across many outputs. For instance, if you are generating support replies, all responses should share the same tone and structure.

Good constraint writing

Be specific and measurable when possible.

Weak:

Keep it short.

Stronger:

Keep it under 120 words.

Weak:

Make it professional.

Stronger:

Use a professional, neutral tone with no slang or emojis.

The clearer the constraint, the less room there is for guesswork.

4) Show examples of the output you want

Examples are one of the most effective prompt tools because they reduce ambiguity. They show the model not just what to do, but what good looks like.

You can use examples to demonstrate:

  • style
  • structure
  • tone
  • level of detail
  • preferred terminology

Example prompt:

Rewrite the following customer note into a concise status update.

Example input: “We’re still waiting on design feedback, but engineering has completed the first pass.”

Example output: “Design feedback is pending. Engineering has completed the first pass.”

When giving examples, make sure they are representative. One misleading example can pull the output in the wrong direction.

Few-shot prompting in practice

If a task has a consistent format, give two or three examples. That is often enough to establish the pattern.

For example, if you want the model to classify messages, show a few labeled examples:

Message: “Can I change my billing date?” → Category: Billing

Message: “The app crashes when I upload a file.” → Category: Bug Report

Message: “How do I reset my password?” → Category: Account Access

Then ask it to classify a new message in the same format.

Keep examples aligned with your goal

Examples should reinforce the output you want, not just provide variety. If your goal is concise writing, all examples should be concise. If your goal is structured extraction, examples should show the exact schema you expect.

5) Combine roles, constraints, and examples into one prompt

The best prompts often combine all three elements. Here is a practical pattern:

  1. State the role.
  2. Define the task.
  3. Add constraints.
  4. Provide examples if needed.
  5. Specify the output format.

Example:

You are an editor for a SaaS blog.

Rewrite the paragraph below for clarity and readability.

Constraints:

  • Keep the meaning the same
  • Use plain English
  • Keep it under 80 words
  • Avoid hype

Output format: one paragraph only

Text: [insert paragraph]

This prompt is effective because it reduces uncertainty at multiple levels. The model knows the perspective, the task, the rules, and the shape of the answer.

6) Use evaluation loops to improve prompts

Prompt writing is rarely perfect on the first try. A simple evaluation loop helps you improve systematically instead of guessing.

A useful loop looks like this:

  1. Draft the prompt.
  2. Test it on a few representative inputs.
  3. Review the outputs against your criteria.
  4. Identify failures.
  5. Adjust the prompt.
  6. Test again.

The key is to evaluate against a checklist, not just a gut feeling. Ask questions like:

  • Did the output follow the format?
  • Was the tone appropriate?
  • Were any important details missing?
  • Did it include unnecessary content?
  • Is it consistent across different inputs?

Create a small test set

Instead of testing a prompt on one example, use a small set of inputs that reflect real cases. Include:

  • an easy case
  • a borderline case
  • a tricky case
  • a typical case

This helps reveal weaknesses that would be easy to miss otherwise.

Example of an evaluation loop

Suppose you are prompting for meeting summaries.

Initial prompt:

Summarize the meeting notes.

Problems you may observe:

  • summaries are too long
  • action items are buried
  • decisions are unclear

Revised prompt:

You are a project coordinator.

Summarize the meeting notes into three sections: Decisions, Action Items, and Open Questions.

Constraints:

  • Keep each section to 3 bullets or fewer
  • Use plain language
  • Do not invent details

Notes: [insert notes]

After testing, you may find that the summaries are better but still inconsistent. You can then add a further constraint such as:

If a section has no items, write “None.”

That is a simple evaluation loop in action: test, observe, revise, retest.

7) Debug prompts by looking at the failure mode

When a prompt fails, the fix depends on the type of failure.

If the answer is too vague

Add more context, examples, or a stricter format.

If the answer is too verbose

Add a word limit or require a shorter output structure.

If the answer misses key details

List the required fields or facts explicitly.

If the answer is stylistically off

Strengthen the role, tone guidance, or example outputs.

If the answer is inconsistent

Use a clearer schema and test against several inputs.

The goal is not to make prompts longer by default. The goal is to make them more diagnostic. Every addition should solve a specific problem.

8) A reusable prompt template

Here is a simple template you can adapt:

You are [role].

Task: [what you want done].

Audience: [who it is for].

Constraints:

  • [constraint 1]
  • [constraint 2]
  • [constraint 3]

Format: [how the answer should look]

Example: [optional example]

Input: [paste content]

Use this template as a starting point, then trim anything unnecessary. A prompt is strongest when it is as short as possible while still being clear.

9) Practical examples you can adapt

Example: rewriting text

You are a copy editor.

Rewrite the text below to be clearer and more concise.

Constraints:

  • Preserve meaning
  • Keep a neutral tone
  • Use simple language
  • Maximum 100 words

Text: [insert text]

Example: extracting information

You are a data assistant.

Extract the following from the text: company name, date, and action items.

Output format:

  • Company:
  • Date:
  • Action items:

Do not add extra commentary.

Text: [insert text]

Example: generating ideas

You are a brainstorming partner.

Generate 10 subject lines for a newsletter about productivity tools.

Constraints:

  • Keep each under 8 words
  • Avoid clickbait
  • Make them friendly and practical

Example: classification

You are a support triage assistant.

Classify each message into one of these categories: Billing, Bug, Account, Feature Request.

Output only the category name.

Message: [insert message]

These examples are simple, but the structure is what matters. Clear direction usually matters more than clever wording.

10) Final checklist for better prompts

Before sending a prompt, check whether it answers these questions:

  • What exactly do I want the model to produce?
  • Who is the output for?
  • What role, if any, improves the result?
  • What constraints must be followed?
  • Do I need examples to remove ambiguity?
  • How will I evaluate whether the output is good?

If you can answer those questions, your prompt is probably in good shape.

Conclusion

Better prompting is less about magic phrases and more about good communication. Roles help set perspective, constraints reduce ambiguity, examples show the target, and evaluation loops help you improve results over time. If you treat prompts like a draft you can test and refine, your outputs will become more consistent and more useful.

Start small: improve one prompt, test it on a few real cases, and revise it based on what you observe. That simple loop is often enough to make a noticeable difference.

Ask Simon