Prompt EngineeringUpdated 2026-07-20

The Universal Prompt Formula

The one formula that works for almost every task: Role + Task + Context + Format + Constraints.

The Formula

  • ROLE — Who is the AI? (e.g. "You are a senior editor")
  • TASK — What should it do? Start with a strong verb (write, analyze, generate).
  • CONTEXT — What does it need to know? Audience, background, purpose.
  • FORMAT — How should the output look? Bullets, table, JSON, length.
  • CONSTRAINTS — What are the limits? Tone, exclusions, boundaries.

One-Line Template

  • "You are a {role}. {task} about {topic} for {audience}. Output as {format}. Use {tone} and avoid {exclusions}. Target {length}."

Quality Boosters

  • Add 1-3 examples of ideal output (few-shot).
  • Add "Think step by step" for reasoning tasks.
  • Add "Only answer from the provided context" to prevent hallucination.
  • Add "Ask clarifying questions first" for ambiguous requests.

Quick Wins

  • Never accept the first draft — iterate once minimum.
  • Feed failures back into the prompt with a fix instruction.
  • Test one prompt across two models; pick the winner.
Skip to content