The five-part structure of a prompt that does not fail

Role, context, task, output format and examples. Prompts that fail almost always leave out two of the five. This recipe is the template we use in all the others.

Level
No code
Done from claude.ai or ChatGPT, without programming.
Time
Twenty minutes to rewrite your most-used prompt
Published

What it costs

Zero. It is a way of writing, not a tool.

guided mode // I ask, you answer

ready to start

Do it with me, step by step

I will ask you 3 questions about your business, use your answers to get the prompt ready to copy, and then walk you through the 5 steps, one at a time. Like a Thermomix: you just answer and move on.

Also from Claude or ChatGPT with the Master Cookbook MCP: say "start the recipe estructura-de-un-prompt-que-no-falla".

Who it is for

Anyone who uses an AI assistant for work and feels the answers are inconsistent: sometimes excellent, sometimes useless.

The problem

The same request gives different results every time. The model invents the format, skips what matters or answers in a tone that does not work. Almost always the cause is that the prompt describes what you want but not what the model needs to know to deliver it.

What changes

Consistent answers that arrive in the format you need, on the first try. And a prompt you can save, share with the team and improve over time, instead of rewriting it every time.

Ingredients

  • The prompt you use most today and that fails you most
  • Two or three real examples of the answer you would like to receive

Step by step

  1. 1

    Role: who the model is in this task

    One sentence. "You are the administration assistant of a Chilean auto parts SME." The role sets vocabulary, tone and what to take as given.

  2. 2

    Context: what the model cannot know on its own

    Facts about your company, the customer, the situation. Everything you know and the model does not. It is the part most often left out and the one that most improves the result.

  3. 3

    Task: what it must do, in the imperative and without ambiguity

    "Summarize", "classify", "draft", "compare". One task per prompt. If you need two, that is two prompts or one task with numbered steps.

  4. 4

    Output format: exactly how you want the answer

    Table, list, JSON, three lines, word limit. If you do not say, the model chooses, and it will choose differently every time.

  5. 5

    Examples: two or three real correct answers

    One good example is worth more than ten instructions. Anthropic documents that examples are the single most effective technique for improving accuracy. Include the input and the expected output.

The prompt

Replace what is in brackets with your company details, or use the guided mode above: it asks you and fills it in for you.

# Role
You are [WHO THE MODEL IS IN THIS TASK: ROLE, COMPANY, INDUSTRY].

# Context
[EVERYTHING THE MODEL NEEDS TO KNOW AND CANNOT GUESS: ABOUT THE COMPANY, THE CUSTOMER, THE SITUATION, THE CONSTRAINTS.]

# Task
[AN IMPERATIVE VERB AND ITS OBJECT: EXACTLY WHAT IT MUST DO. IF THERE ARE SEVERAL STEPS, NUMBER THEM.]

# Output format
[EXACTLY HOW YOU WANT THE ANSWER: STRUCTURE, MAXIMUM LENGTH, LANGUAGE, TONE. IF IT IS A TABLE, GIVE THE HEADERS. IF IT IS FIXED LINES, WRITE THEM OUT.]

# Examples
Input: [REAL EXAMPLE 1]
Expected output: [CORRECT ANSWER 1]

Input: [REAL EXAMPLE 2]
Expected output: [CORRECT ANSWER 2]

# Now process this
[THE REAL INPUT]

What usually goes wrong

  • Putting the format instructions at the start and the real input at the end without separating them. Use clear headings or tags so the model can tell instruction from data.
  • Made-up or too-perfect examples. Use real cases, including the hard ones: they are the ones that teach.
  • One prompt for everything. Each different task deserves its own saved prompt.

When not to use this recipe

For a one-off, one-line question you do not need the full structure. Use it when the same request repeats, when several people use the same prompt, or when your answers come out inconsistent.

Source and real case

Cross-functional

This template is what structures every prompt in the cookbook. The official guide ranks the techniques from most to least impact, and examples appear near the top along with clarity and structure.

Official documentation:Prompt engineering overview — Claude Platform Docs · Anthropic

Last verified:Based on Anthropic's official prompt engineering guide, which ranks the techniques by impact: clarity, examples, structure with tags, and role.

promptstemplatefundamentalsquality

Share it

If someone on your team could use this recipe, send it in one click. The suggested text copies itself.

Want to apply it in your business? Message Cristián directly.

Telegram