How to write a prompt that works the first time: a five-part structure
The difference between a generic answer and one you can actually use is almost never a "magic phrase". It lies in what you tell the model and what you ask it to give back. This guide gives you a five-part structure that works in ChatGPT, Claude, Gemini or any other assistant, with before-and-after examples.
By Yenny Astrid Londoño MonrroyReviewed
Key Takeaways of this Analysis
- A good prompt answers five questions: what you want, for whom and why, what a good result looks like, in what format and within what limits.
- Context that only you know is what improves the answer most: the model cannot guess it.
- One or two examples of the result you want are worth more than paragraphs of description.
- Asking for the format explicitly saves half of the corrections.
- The first result is a draft: correct it with specific instructions, not by repeating the same request.
If you have ever thought "AI is no good for this", the problem probably was not the model but the request. A language model writes the most likely continuation of what you give it (we explain this in What is a large language model). Give it little, and the most likely result is generic. Give it what it needs, and the answer changes completely.
The official guides from OpenAI, Anthropic and Google agree on the essentials: clear instructions, enough context, examples and a defined format. This guide turns that into a five-part structure you can use as a checklist.
The five-part structure
1. The task: exactly what you want
Start with a verb and a concrete result. "Help me with an email" is not a task; "write an email asking a supplier to bring a delivery forward by a week" is.
If the task has several parts, number them. Models follow a numbered list of steps better than a paragraph with five requests mixed together.
2. The context: what only you know
This is the part that improves the result most and the one people forget most. Think about what you would tell a capable person who has just joined your team:
- Who it is for. An angry customer, your manager, a 15-year-old audience, a technical committee?
- Why you need it. To persuade, inform, apologise, decide?
- What you already know or tried. So it does not suggest what you have already ruled out.
- Specific facts. Names, figures, dates, the original text. If you do not give them, it will invent them (see Why AI makes things up).
3. The examples: what a good result looks like
Showing is more effective than describing. If you want a particular tone, paste an email of yours that you like. If you want messages classified, paste three that are already classified. This is called few-shot prompting: the model infers the pattern from a few examples.
Two precautions: use varied examples (if they all look alike, it will copy their surface details) and make it clear they are examples of style, not content to repeat.
4. The format: how you want to receive it
Say it explicitly: length, structure and presentation. "150 words maximum", "a table with three columns: option, advantage, risk", "three numbered versions", "no introduction or conclusion". Asking for the format avoids half of the back-and-forth.
5. The limits: what it should not do
Constraints are information too. "Do not use technical jargon", "do not promise deadlines", "if a detail is missing, leave it in square brackets instead of making it up", "do not change the figures in the original text". Phrase them positively where you can ("use short sentences" works better than "do not use long sentences"), and explain the reason if it is not obvious: the model applies a rule better when it understands what it is for.
A complete example, before and after
Before:
Write a LinkedIn post about our new service.
After:
Task: write a LinkedIn post announcing a new service. Context: we are a 6-person agency in Bogotá that does bookkeeping for online shops. The new service is a monthly close in 5 working days instead of 15. We launched it because our clients complained they got the numbers too late to make purchasing decisions. Audience: online shop owners, not accountants. Example of the tone we like (do not copy the content): "For three years we kept hearing the same sentence: 'I find out how my month went when the next one is already half over.' So we changed it." Format: between 120 and 180 words, paragraphs of one or two sentences, a question at the end to invite comments. No emojis or hashtags. Limits: do not promise financial results. Do not use "revolutionary" or "innovative". If you need a detail I did not give you, leave it in [ ].
The second prompt is not "better written": it simply contains the information the model needed and would otherwise have had to invent.
How to correct the first result
Even with a good prompt, the first answer is a draft. How you correct it matters:
- Be specific. "Make it shorter" works worse than "remove the second paragraph and keep the total to 100 words".
- Point out what does work. "Keep the first sentence and the ending; change the tone in the middle, it sounds like an advert."
- Do not repeat the same request hoping for a different result. If it did not work, information is missing or there is too much ambiguity: add what is missing.
- When a conversation gets tangled, start again with a prompt that already includes what you learned. Long conversations pile up contradictory instructions (we explain this in Tokens and the context window).
When to save a prompt
If you make the same kind of request every week, turn it into a template with gaps for what changes. Our library has ready-made templates for common cases, such as Difficult emails, Decide with criteria or Vibe coding build spec. And if you work with Claude, you can go a step further and save your permanent instructions as skills so you do not have to repeat them: we cover it in Claude skills, connectors and plugins.
Template to copy
Task: [what you want, starting with a verb] Context: - Who it is for: [audience or recipient] - What it is for: [goal] - What I already know or tried: [background] - Facts you must use: [figures, names, original text] Example of what I am looking for (style reference only): [paste an example] Format: [length, structure, presentation] Limits: [what to avoid and why] If information is missing, ask me before assuming.
Keep reading
- What is a large language model (LLM): why context changes the answer so much.
- Why AI makes things up: how to ask so it invents less.
- How to check an AI answer before you use it: what to review before you publish or decide.
- Claude skills, connectors and plugins: permanent instructions with skills, connectors and plugins.
- In the glossary: prompt, few-shot and prompt engineering.
Sources
- OpenAI. Prompt engineering. OpenAI API documentation.
- Anthropic. Prompt engineering overview. Claude documentation.
- Google. Prompt design strategies. Gemini API documentation.
Connects to
Definitions
- PromptThe instruction, question or context you give a model so it produces an answer.
- Prompt engineeringThe practice of designing, testing and refining instructions to get consistent results from a model.
- Few-shot promptingGiving the model a few examples of the expected format and judgement inside the prompt itself.
- Zero-shot promptingAsking the model to solve a task without giving it any prior example.
- System promptA hidden instruction that sets the model's role, rules and tone before the user types anything.
Prompts
- Write the difficult email without burning bridgesSays what needs saying, clearly, without passive-aggression.
- Decide with explicit criteria and cost of being wrongA matrix that forces you to declare assumptions, reversibility and real cost.
- From idea to a spec an AI can actually buildTurns a vague idea into scope, data model and acceptance criteria before any code is written.