Home / Blog / Chat & assistants

Writing effective prompts: 6 elements that get the right answer from AI the first time

A prompt structure made of role, context, task, examples, format and checking criteria, with a rewrite example you can apply to any chatbot.

Edited by PickYourToolUpdated: 2026-10-265 min read

Most "bland" or off-target AI results are not caused by a weak model but by a request that is too short. All three major developers publish prompting guides, and although the wording differs, the advice repeats the same ideas: state the goal clearly, provide context, give examples, specify the output format and give the model a chance to check its own work. This article gathers them into 6 easy-to-remember elements.

Element 1: A clear task with one main verb

Compare two requests:

Write about coffee.

Write an 80-word description for a product page selling ground Robusta coffee, aimed at office buyers, emphasizing bold flavor and a fair price.

The second request has a verb (write), a length (80 words), an audience (office buyers) and a focus. The model does not have to guess. Try to give each prompt one main task; if you have three jobs, split them into three steps or three turns.

Element 2: Context an outsider would not know

The model does not know your company, your customers or what has been tried before. Include what a new colleague would need to do the job well: what the product is, who reads it, what the output is for, which constraints apply. The more specific you are about the audience, the better; for example, "a store manager who is not technical" is very different from "a data engineer".

Do not forget to state what must not be done: no jargon, no promising results, no invented figures.

Element 3: A role, used in moderation

Assigning a role ("You are an experienced editor…") can make tone and level of expertise more consistent. But a role does not replace context and criteria. Treat it as a side seasoning: useful when you want a specific point of view, useless if the rest is vague.

Element 4: Examples of the output you want

For tasks about tone or format, one or two examples are worth more than a long description. Provide one good example and, if needed, one bad example with an explanation of why it is bad. The developers' documentation all mention this technique (often called few-shot). Note that the model tends to follow the examples closely, so give varied examples if you want varied results.

Element 5: Output format

Say exactly what you want: a table with which columns, a list of 5 bullets, JSON with which fields, a paragraph of no more than 120 words. If the result will be pasted into another tool, ask for exactly the format that tool needs. A clear format saves you from manual cleanup.

Element 6: How to check and fix

Two simple tricks:

  • Ask the model to list the assumptions it used before answering. This exposes where it misunderstood.
  • Ask it to review itself against your criteria at the end ("check that it has the 3 main points, uses no banned words and has the right length"), then fix.

For work involving real-world facts, ask it to name sources and verify them yourself. See how to verify AI answers.

A reusable prompt template

You can copy the following frame and replace the parts in brackets:

Goal: [the final result you need]
Reader: [who, what they know, what they need to do after reading]
Context: [background information, attached data]
Constraints: [length, tone, things that must not be said]
Good example: [optional]
Output format: [table / list / paragraph / JSON]
Before answering: ask me if important information is missing.

The last line is very useful. Letting the model ask questions back prevents it from filling the gaps with wrong assumptions.

A rewrite example: from vague to usable

Original prompt: "Write an email apologizing to a customer for a late delivery."

Improved prompt: "Write a 120-word email to a customer of a small home goods store whose order is 3 days late because the warehouse is temporarily out of stock. Sincere tone, do not blame the carrier. Include: an apology, the real cause, the new expected delivery date of Friday, and a 10% discount code for the next order. Do not use the phrase 'we are very sorry for the inconvenience'. Return only the email text."

The difference: audience, length, facts, tone, prohibitions and format are already in the request. You can use the result right away or change a few words.

Improve iteratively instead of writing one perfect prompt

Do not try to write a magic prompt on the first attempt. Work in loops: run it, read it, point out exactly what is not right ("paragraph 2 is too formal, shorten it to 2 sentences"), run it again. Specific feedback works far better than "do it again, better". When you find a version that works well, save it as your own template.

Common mistakes

  • Cramming too many jobs into one prompt, so the result handles each one superficially.
  • Contradictory instructions, for example "very short" but "with every detail".
  • Pasting sensitive data into an unsuitable chatbot. See data security when using AI.
  • Trusting the result without checking, especially figures, citations and legal terms.

Summary

A good prompt does not need to be long, it needs to be complete: task, context, examples if any, constraints, format and a way to check. Try rewriting the three prompts you use most following the frame above and compare the results. The difference is usually visible right away.

Sources

Related articles

This article is general reference only and does not replace legal or professional advice. See also the editorial, affiliate and review policy.