Skip to content
Friday, November 13, 2026Tech, AI and gear explained in minutes.
AI at Work

How to Write a Good AI Prompt: A Four-Part Formula

By Rowan Pryce   /   November 11, 2026
How to Write a Good AI Prompt: A Four-Part Formula

Quick answer: Vague questions get vague answers. A good AI prompt has four parts: who the AI should act as plus the background it needs (context), the job you want done (task), the shape you want the answer in (format), and the limits or examples that keep it on track (constraints). You do not need all four every time, but adding two or three of them usually beats rewriting the same one-liner five times. The big AI providers say much the same thing in their own guides, and the rest of this article turns that advice into something you can reuse today.

Key takeaways

  • Think of the AI as a smart new coworker who knows nothing about your situation. Tell it what a stranger would need to know.
  • Use four parts: context, task, format, constraints. Examples are the secret fifth ingredient.
  • Treat the first answer as a draft. Follow up with specific feedback, not “make it better.”
  • Check anything that matters. A confident tone is not proof.
  • Do not paste passwords, card numbers, health details or other private data into a chatbot.

Why your answers feel vague

You type “give me a meal plan” and get a beige list of chicken and rice. That is not the AI being lazy. It had almost nothing to work with, so it guessed what an average person might want. You are not average. You have a budget, a picky kid, a small oven and about twenty minutes on weeknights.

Anthropic’s prompting guidance says its Claude models respond best to clear, explicit instructions, and suggests a simple test: show your prompt to a colleague who knows nothing about the task and see whether they would be confused. If they would be, the AI probably will be too. OpenAI’s help articles make the same point from a different angle: prompts should be clear and specific and carry enough context to remove ambiguity. Google’s guidance for its Gemini tools names four building blocks (persona, task, context and format) and adds that you do not have to use all four every time.

So the fix is rarely a magic phrase. It is just supplying the information you were holding in your head.

The four-part formula

1. Context (and role)

Say who you are in this situation, who the output is for, and what the AI should act as. “Act as a patient career coach” or “I am a first-time manager writing to a team of six” gives the AI something to aim at. Giving the reason behind the request helps too, because it lets the AI connect the task to relevant knowledge.

2. Task

Say what you want done, in one clear verb: summarize, compare, rewrite, brainstorm, explain, draft, critique. One task per prompt works better than five tangled together. OpenAI’s own help guidance suggests splitting complex jobs into smaller, focused prompts.

3. Format

Say what the answer should look like: a table, five bullets, a 150-word email, a numbered checklist, plain language for a ten-year-old. Without this, you get whatever the AI feels like, usually a wall of text with headings you did not ask for. Also state the audience and rough length.

4. Constraints and examples

Constraints are your guardrails: budget, word limit, tone, things to avoid, what to do when unsure. Anthropic recommends framing these as what to do rather than only what not to do, so “use plain language” tends to work better than “no jargon.” If you can show the style you want, paste a short example. Anthropic’s guide suggests a few well-chosen examples that closely match your real use case, kept clearly separate from your instructions.

Before and after: same request, better prompt

Vague prompt Four-part prompt
Help me with a budget. I am a single renter paying off a car loan (context). Build a monthly budget framework (task) as a table with categories and a percent column (format). Do not assume any numbers; ask me for my income and fixed bills first (constraints).
Write an email to my landlord. Act as a calm, polite tenant. My heater has been broken for nine days and I reported it twice by text (context). Draft a message requesting a repair date (task), under 120 words, with a clear subject line (format). Firm but friendly, no threats, and leave blanks for dates I need to fill in (constraints).
Explain index funds. I understand basic savings accounts but nothing about investing (context). Explain what an index fund is (task) in three short paragraphs with one everyday analogy (format). General education only, no recommendations on what to buy (constraints).
Plan my trip. Two adults, four days, a mid-range budget, we dislike crowds and long drives (context). Suggest a day-by-day outline (task) in a table with morning, afternoon and evening columns (format). Max one paid attraction per day; flag anything I should confirm is open (constraints).

Notice that the better versions are longer but not fancy. Nobody is whispering a secret incantation. They just stop making the AI guess.

A fill-in-the-blank template

Copy this and swap in your own details:

  • Context: “I am [who you are / situation]. This is for [audience or purpose]. Act as [role].”
  • Task: “Please [one clear verb] [the thing].”
  • Format: “Give it to me as [table / bullets / email / steps], about [length], in [tone].”
  • Constraints: “Keep it [limit]. Avoid [thing]. If you are unsure, say so and ask me a question.”

That last line is worth keeping. Letting the AI ask you questions first is one of the fastest ways to get a better result, because it fills the gaps instead of covering them with guesses.

How to iterate without starting over

OpenAI’s help guidance describes prompting as a loop: try something, read the reply, adjust. That matches how it works in practice. A few moves that save time:

  1. Name what is wrong. “Too formal, and the second paragraph repeats the first” beats “try again.”
  2. Give a measurable change. OpenAI’s writing guidance gives the example of asking to shorten a draft by a set amount and sharpen the call to action, rather than just asking for improvement.
  3. Add the missing context. If the answer assumes something wrong, say so and correct it.
  4. Ask for options. “Give me three versions with different tones” is a cheap way to find what you like.
  5. Break big jobs apart. Outline first, then draft one section at a time.
  6. Know when to start fresh. If a long chat has gone sideways, open a new one and paste your best version of the prompt.

What not to paste into a chatbot

A better prompt is not worth a privacy headache. The National Cybersecurity Alliance suggests a simple test: if you would not put it in a press release or on social media, do not type it into a chatbot. Its guidance also says to prefer general questions over confidential details. OpenAI asks users not to enter payment card data, and its sharing guidance lists health information, financial details, passwords and account numbers as things to leave out. Google’s Gemini privacy information says human reviewers may look at some conversations, so it advises against entering anything you would not want a reviewer to see.

Many tools offer settings to turn off training use or to use temporary chats that stay out of your history. Those are worth checking, but the National Cybersecurity Alliance cautions against treating a toggle as a complete safety net. Settings change, so read the provider’s current privacy page.

Instead of pasting this Do this
Your full name, address, account numbers Use placeholders such as [NAME] and [ACCOUNT]
A contract or medical record Describe the situation in general terms, or paste only a short, non-identifying excerpt
Work documents or client data Check your employer’s AI rules first
Passwords, card numbers, one-time codes Never share them with an AI, ever

Common mistakes that cause weak answers

Most disappointing replies trace back to a handful of habits. Check whether any of these sound familiar.

  • Stuffing five jobs into one prompt. “Summarize this, rewrite it, translate it and make a slide deck” invites a muddy result. Do them in order.
  • Leaving out the audience. An explanation for your boss and one for your grandmother are different documents. Say which one you need.
  • Asking for “the best.” The best by what measure? Price, speed, simplicity? Name your criteria and the AI can rank by them.
  • Burying the real request. Put the task near the start or the end of a long prompt, not hidden in the middle of pasted material.
  • Skipping the sanity check. If an answer includes statistics, quotes or links, confirm them somewhere reliable before you repeat them.

A small habit that helps: reread your prompt as if you were the AI, with no access to your head, your calendar or your history. Would you know what to do? If you would have to guess, add the missing line.

Prompt checklist

  • Did I say who this is for and why I need it?
  • Is there one clear task?
  • Did I name the format, length and tone?
  • Did I add limits, and one example if I have it?
  • Did I invite the AI to ask questions if it is missing something?
  • Is anything private in my prompt that should be a placeholder?
  • Will I verify facts, numbers and names before using the answer?

Frequently asked questions

Do I need to use a “role” like “act as an expert”?

Not always. A role can shape tone and vocabulary, which is why Google’s guidance lists it as one of its four parts. But it is optional. Plain context about your situation usually helps more than a fancy job title.

Does a longer prompt always work better?

No. Longer helps only when the extra words add useful information. Rambling or contradictory instructions can confuse the answer. Aim for complete, not long.

Will the same prompt work in every AI tool?

The basics carry over, but models differ, and Anthropic notes that some models follow instructions more literally than others. If a prompt gives odd results in one tool, adjust the wording rather than assuming you did it wrong.

Can I trust the answer if my prompt was good?

A good prompt improves relevance, not accuracy. AI tools can still state wrong things confidently. Check important facts against a reliable source, especially for health, money, legal and safety topics.

Before you decide

Pick one thing you ask an AI regularly and rebuild that prompt with the four parts. Save the version that works in a notes app so you can reuse it. Five minutes of setup tends to save a lot of “no, not like that” follow-ups. Keep private details out, check the facts that matter, and treat every answer as a first draft you are allowed to push back on.

Sources

Last updated: November 2026. This article is general information, not IT-security advice.

Keep reading

Editor’s picks

Explore all topics ↗

Find your next read

7 topics. More possibilities.