How to Write Better Prompts: A Field Guide With Examples
How to write better prompts: define success first, name the task, add context, show examples, and set the format. A 7-step method with examples.
By Galactic News Editorial · Published 2026-11-10T10:27:47+00:00 · Updated 2026-11-10T10:27:47+00:00
Good prompts are clear briefs, not magic words. A vague prompt gets a vague answer. A prompt that names the task, the audience, the format, and the limits gets a usable answer. This guide shows how to write better prompts, step by step, with examples you can copy and adapt.
The method below follows the official prompting guides from OpenAI and Anthropic. Both agree on the core: be clear, give context, show examples, structure the prompt, and test the result. The steps work in ChatGPT, Claude, Gemini, and other chatbots. You do not need any special skill. You need a clear brief.
Why most prompts fail
Most bad prompts fail in the same three ways. First, the task is vague. "Write about solar panels" could mean a sales page, a technical explainer, or a poem. The model has to guess. Second, the context is missing. The model cannot know your audience, your tone, or your constraints unless you say them. Third, the format is undefined. Without a length or structure, the model picks one at random.
Language models predict likely text. They do not read your mind. Every detail you leave out is a detail the model invents. Writing better prompts means removing the guesswork before you send the message.
How to write better prompts: the 7-step method
Follow these steps in order. Each one removes one kind of guesswork.
- Define success before you write. Anthropic's prompting guide starts here. Write one sentence that says what a good answer looks like. Example: "A good answer is a 400-word explainer a first-time homeowner can follow without a glossary." If you cannot write that sentence, you are not ready to prompt.
- Name the task with an action verb. Start with what you want done. "Summarise," "compare," "draft," "list," "explain." Then name the deliverable and its length. "Draft a 300-word product description" beats "Write something about our product."
- Give the model a role. Tell it who it is. "You are an expert copy editor" sets tone and scope better than "Write well." A role anchors the answer. Keep it short. One line is enough.
- Add the context it cannot guess. Paste the facts, the source material, or the constraints. Include the audience, the purpose, and anything that must be true. OpenAI's guide calls this retrieval-augmented generation when you attach documents. In a chat, it is simply good briefing. Without context, the model fills gaps with plausible guesses.
- Specify the output format. State the length, the structure, and the style. Ask for headings, a table, a numbered list, or a JSON object. If the output must fit a system, say so. A format the model can follow is a format you can check.
- Show examples when the pattern matters. Two or three examples teach the model faster than a paragraph of description. Anthropic recommends three to five examples for hard tasks. Keep them varied. Show the range of inputs and the shape of output you want. For simple tasks, start with no examples and add them only if the first answer misses.
- Test, then revise. Treat the first prompt as a draft. Read the answer. Find where it drifted. Fix the prompt, not the answer. Change one thing at a time. Keep the version that works. OpenAI recommends building tests that measure prompt behaviour, so you can spot when a change makes things worse.
Before and after: how to write better prompts in practice
The difference is concrete. Compare these two prompts for the same job.
Weak prompt: "Write a blog post about solar panels."
Strong prompt: "Write a 400-word blog post for first-time homeowners explaining how rooftop solar works. Use plain language and no jargon. Structure it with three subheadings: how panels make power, what a battery adds, and what maintenance looks like. End with a five-item checklist. Do not mention prices."
The strong prompt names the audience, the length, the structure, the tone, and the limits. The model has nothing left to guess. The answer still needs checking. But the checking is fast, because the shape is right.
Try the same pattern for analysis. Weak: "Is this contract risky?" Strong: "You are a contract reviewer. Read the attached agreement and list the five highest-risk clauses for a small business buyer. For each clause, quote the wording, explain the risk in one sentence, and suggest a fix. Use a table."
Structure your prompts so the model can parse them
Structure helps the model tell instructions apart from content. OpenAI recommends Markdown headings and XML-style tags to mark sections. Anthropic recommends the same. A simple layout works well:
- Task: what to do, in one line.
- Context: the facts and material, clearly separated.
- Examples: two or three, if the pattern matters.
- Output: the format, length, and structure.
Put instructions first and context second, in OpenAI's layout. Anthropic takes a different view for long documents: put the document first and the question last, so the model reads the material before the ask. Both agree on the principle. Keep each kind of content in its own labelled place. Never mix instructions into the middle of a pasted document without marking the boundary. Untrusted input, such as text pasted from a web page, should be wrapped and labelled so the model treats it as data, not as instructions.
Match the technique to the model
Reasoning models and standard models need different prompts. OpenAI's guide says reasoning models work best with brief, clear instructions and a defined end goal. Try zero-shot first. Explicit step-by-step instructions are usually unnecessary, because the model reasons on its own. Non-reasoning models benefit from more explicit, precise instructions and worked examples.
Do not ask a reasoning model to show its thinking unless you need it. Chain-of-thought output is long and costly. Ask for the answer, and ask for the reasoning only when you need to check it.
Pin production prompts to a specific model version where you can. OpenAI recommends pinning to a model snapshot, because behaviour changes between versions. A prompt that works today can drift after an upgrade. Keep a small test set of inputs and expected outputs, and re-run it when the model changes.
Common prompt mistakes to avoid
- Asking two jobs in one prompt. Split research and writing into separate prompts. The second prompt gets a better brief.
- Forbidding without replacing. "Don't be vague" gives the model nothing to aim at. Say what you want instead: "Use short sentences and name one fact per line."
- Overloading the prompt. Ten rules compete with each other. Keep the rules that matter. Drop the rest.
- Accepting the first answer. Ask the model to check its own output against your brief. "Does this answer follow all five rules above? List any rule it breaks." That second pass catches drift.
- Repeating the same prompt. If an answer is wrong, the prompt is wrong. Change the brief. Asking again proves nothing.
Bottom line
Learning how to write better prompts is learning how to write better briefs. Define success first. Name the task, the audience, and the format. Add the context the model cannot guess. Show examples when the pattern matters. Structure the parts so they stay separate. Then test the result and revise the prompt, one change at a time. Do that, and the model stops guessing. Your answers get shorter, sharper, and far easier to check.