If you want to learn how to write AI prompts that actually work, let me start with a story. A few months ago a client sent me a prompt and asked why their AI tool kept “getting dumber.” The prompt was three words long: “make this better.” Pasted under it was a 4,000 word sales proposal. The model did what it was told. It made the proposal “better” by its own guess at what better meant, which was more adjectives, longer paragraphs, and a closing line that sounded like a motivational poster. The client hated it, and fair enough. But the model wasn’t the problem. The brief was.
I design prompts for a living. Some days that means building system instructions for customer support bots. Other days it means sitting with a marketing team and rewriting the prompts they use every morning. The pattern I see over and over is the same. People treat the prompt box like a search bar, type a wish into it, and judge the tool by what comes back. Learning how to write AI prompts well is mostly about unlearning that habit.
This guide is what I wish someone had handed me when I started. It’s practical and a bit opinionated, and it’s built on what holds up across the major models.
Why Most People Struggle With How to Write AI Prompts
Language models don’t read your mind. They read your words, and they fill every gap you leave with the most statistically ordinary answer they can produce. That’s why vague prompts produce generic output. It isn’t laziness on the model’s part. Ordinary is the safest guess when it has nothing better to go on.
One prompt engineering course puts it bluntly: language models are probabilistic systems that do not have intent, and they do not infer what we meant to say. I’d soften that a little, because modern models are surprisingly good at inferring intent from small clues. But the core point stands. Every clue you leave out is a decision the model makes for you.
So when an answer disappoints you, the first question isn’t “is this model any good?” It’s “what did I leave it to guess?”
How to Write AI Prompts Like You’re Briefing a Sharp New Hire
The mental model I use, and the one I teach every team I work with, is the new hire. Picture someone brilliant who started at your company this morning. They know a lot about the world and nothing about your project, your audience, or your standards.
Anthropic’s own documentation leans on the same idea. It frames prompt engineering as giving instructions to a brilliant new hire who has zero context on your project, where the clearer you are, the better they perform. One consultant who summarized that guide calls it the colleague test: a weak prompt is missing what a new starter would need, meaning who the work is for, what good looks like, what to avoid, and what shape the answer should take.
If you’d never walk up to a new colleague and say “make this better” with no further explanation, don’t say it to a model either.
Persona, Task, Context, and Format
Google’s guidance for Gemini breaks the brief into pieces you can check off. Its Prompting Guide 101 lists four things to consider when writing a prompt: persona, task, context, and format. You don’t need all four every time, but including a few makes a big difference.
There’s a statistic in that same guide that gets quoted a lot. Google says the most successful prompts average around 21 words. I’d treat that number carefully. It describes everyday prompts inside apps like Gmail and Docs, where a quick request is often enough. For anything with stakes, like a client proposal, a research summary, or a piece of code that goes to production, my working prompts usually run several hundred words. When people ask me how to write AI prompts for serious work, my answer is that length isn’t the goal. Coverage is. Write as much as the task needs and not one sentence more.
How to Write AI Prompts With Context the Model Can’t Guess
Context is where most of the quality comes from, and it’s where most people skimp. Here is what I always try to include.
- Who the output is for. A summary for a CFO and a summary for a new intern are different documents, even when the source is identical.
- Why you need it. Purpose changes priorities. “I’m deciding whether to renew this vendor” tells the model to hunt for risks and costs, not to admire the vendor’s features.
- What you already know. If you’ve ruled something out, say so. Otherwise the model will happily spend half its answer on the option you rejected last week.
- The constraints. Budget, deadline, tone, brand rules, legal limits, word count, reading level.
- What good looks like. If you have a past example you loved, describe it or paste it.
A Real Example of How to Write AI Prompts With Context
Here’s a before and after from a real session with a small business owner.
Before: Write an email to my customers about the price increase.
After: I run a local dog grooming shop with about 300 regular customers, most of them long term. Prices are going up 8 percent next month because our rent and supply costs rose. I want to tell customers honestly, thank them for staying with us, and mention that anyone who books before the end of this month keeps the old rate. Keep it under 150 words, warm but not gushing, and sign it from me, Dana. No exclamation points.
The second prompt took her about two minutes to write. The first draft that came back was usable with one small edit. The first prompt had produced three drafts she threw away.
How to Write AI Prompts That Define the Shape of the Answer
People are good at describing the topic they want. They’re bad at describing the shape. Shape means format, length, structure, and level of detail. If you don’t specify it, you get the model’s default, which tends to be a medium length answer with headers and bullet points whether you wanted them or not.
Be concrete. “Short” means nothing. “Three sentences” means something. “A table with columns for tool, price, and main drawback” means even more.
Say What to Do, Not What to Avoid
One rule I follow religiously is to state what you want rather than what you don’t want. DigitalOcean’s prompt engineering guide lists this among its core practices: being specific, giving clear context, examples, and data, defining the output you want, and giving instructions on what to do rather than what to avoid.
There’s a practical reason for this. When you write “don’t use jargon,” you’ve put the idea of jargon right into the prompt, and you’ve given the model no picture of what to do instead. “Write for someone who has never worked in finance, and explain any technical term in plain words the first time it appears” gives it a target to aim at.
Negative instructions still have a place. I use them for hard limits, like “never invent a statistic.” But I always pair them with the positive version of the behavior: “if you don’t have a source for a number, say so plainly.”
How to Write AI Prompts With Examples That Teach
When words fail, examples carry the load. If you want a particular voice, a specific format, or a classification style, two or three samples will teach the model faster than a paragraph of description. This technique is usually called few shot prompting, and it’s one of the oldest tricks in knowing how to write AI prompts because it works.
Anthropic recommends 3 to 5 examples for best results, kept relevant, varied and clearly marked off from your instructions. That last part matters more than people think. If every example you give is the same length and opens the same way, the model will copy those surface habits too. Vary the examples on purpose so it learns the thing you care about and not the accidents.
Why Variety in Your Examples Matters
A quick story about this. I once built a prompt to rewrite product descriptions for an online store. I gave it four sample descriptions, and all four happened to mention the product’s color in the first sentence. Every output after that opened with the color, including a description for a software subscription, which has no color at all. One varied example fixed it.
Examples also help when you’re struggling to describe tone. Rather than saying “sound confident but not arrogant,” paste in two paragraphs you wrote that hit the note you want and say “match the voice of these.”
How to Write AI Prompts for Tasks That Need Reasoning
For problems that take several steps, like math, logic, planning, or comparing tradeoffs, asking the model to work through its reasoning before giving an answer can make a real difference in accuracy.
What the Research Shows
The research here is well established. In a 2022 paper, a team at Google showed that generating a chain of thought, meaning a series of intermediate reasoning steps, significantly improves the ability of large language models to perform complex reasoning. When combined with the 540 billion parameter PaLM model, that approach reached a new state of the art of 58.1 percent on the GSM8K benchmark of math word problems. Remarkably, it took just eight worked examples in the prompt to get there.
A follow up study found you don’t always need worked examples. Researchers at the University of Tokyo and Google proposed a zero shot version of the technique, which became famous for a single phrase: asking the model to “think step by step.” Google’s own Gemini guide now covers the same idea, noting that asking Gemini to think step by step before answering can significantly improve the quality of reasoning in complex tasks.
When Step by Step Helps and When It Doesn’t
Now for the honest caveat from someone who does this every day. Many current models already reason internally before they answer, and some have a dedicated thinking mode. For those, a bare “think step by step” adds less than it used to. Knowing how to write AI prompts for reasoning today means telling the model what to reason about. For example:
Before recommending a plan, list the three biggest risks of each option, then compare them against my budget of $5,000, and only then make your recommendation.
That gives the reasoning a structure. It also lets you check the logic instead of trusting a conclusion you can’t see into.
And don’t use this for simple tasks. Asking a model to reason step by step about rewording a subject line just wastes time and makes the answer longer.
How to Write AI Prompts That Separate Instructions From Material
When you paste a long document into a prompt, the model has to work out which words are your instructions and which words are the content you want worked on. Make that obvious.
You can use clear labels like “INSTRUCTIONS” and “DOCUMENT,” triple quotes, or simple tags. One development agency’s guide lists common delimiter options including triple quotes, Markdown style headers, and XML style tags. I lean toward tags, something like <contract> and </contract>, because I can refer to them by name later: “using only the information inside the contract tags, list every deadline.”
Where to Place Long Documents
Placement matters too, and there’s solid research on why. A Stanford led study titled “Lost in the Middle” found that model performance is often highest when relevant information occurs at the beginning or end of the input context, and significantly degrades when models must access relevant information in the middle of long contexts. The paper was published in the Transactions of the Association for Computational Linguistics in 2024.
Models have improved at long documents since then, but I still follow a simple layout that came out of that finding. Long material goes near the top. My actual question and the most important instructions go at the very end, right before the model starts writing. If one detail is critical, I mention it in both places.
Break Big Jobs Into a Chain of Smaller Prompts
One of the most common mistakes I see is the mega prompt: research this topic, write a 2,000 word article, optimize it for search, create five social posts, and translate it into Spanish. All in one request. The model will try, and every piece will come out a little worse than it would have on its own.
Split the work instead. One content platform’s guide recommends exactly this: rather than asking for the blog post, the SEO work, and the social variations at once, generate the outline first, review and refine the structure, then write the full draft from the approved outline. Hostinger’s tutorial makes the same case, noting that guiding the AI through each part instead of writing an entire post in one shot leads to better structure, improved flow, and fewer edits.
Chaining has another advantage people overlook. You get checkpoints. If the outline is wrong, you catch it before the model has spent 2,000 words building on a bad foundation. That’s cheaper than fixing a finished draft.
How to Write AI Prompts as a Chain for Written Work
- Ask for an outline and a one line summary of each section.
- Edit the outline myself. This is where my judgment does the most good.
- Ask for the draft, one section or the whole piece, based on the approved outline.
- Ask the model to critique the draft against my original brief and list where it falls short.
- Ask for a revision that fixes only the problems I agree with.
Step four surprises people. Models are often better at spotting flaws in a draft than at avoiding them on the first pass. Use that. The same outline first approach works just as well for longer documents, like a business plan.
How to Write AI Prompts That Improve Through Iteration
Nobody writes a perfect prompt on the first try, including me. The real skill in how to write AI prompts isn’t getting it perfect. It’s reading a bad output as a clue and adjusting.
OpenAI’s own help center says prompt engineering often requires an iterative approach: start with an initial prompt, review the response, and refine the prompt based on the output, adjusting the wording, adding context, or simplifying the request as needed. The cofounder of one AI development platform, after talking to over a thousand teams building with language models, found that most teams reach an acceptable first version after 20 to 30 minutes of rapid iteration.
Three Questions for Diagnosing a Weak Answer
That matches my experience. When I’m diagnosing a weak answer, I ask three questions:
- Did the model misunderstand the task? Then my instructions were unclear. Rewrite them.
- Did it understand the task but lack information? Then I need to add context or source material.
- Did it understand and have the information, but the style is off? Then I need examples or a tighter format spec.
Each kind of failure has a different fix. Most people respond to all three by typing “try again,” which just rolls the dice a second time.
One practical tip: when you find a fix, put it back into the original prompt instead of only correcting things in the chat. Corrections buried twenty messages deep get diluted. A clean prompt that has the lesson built in will work tomorrow too, especially if you keep your best prompts saved in one of your favorite productivity apps.
A Simple Template for How to Write AI Prompts
Templates get a bad reputation because people fill them in mechanically. Treat this as a checklist, not a form. Skip what doesn’t apply.
- Role and situation. “You’re helping me, a project manager at a 40 person software company, prepare for a quarterly review.”
- The task, in one clear sentence. “Summarize the attached status reports into a one page update for our executive team.”
- Audience and purpose. “The executives have five minutes to read this and need to decide whether to approve extra budget for the mobile project.”
- Material. Paste it inside clear tags.
- Constraints. “Under 400 words. Plain language. Flag anything that’s behind schedule.”
- Output shape. “Start with a three sentence summary, then a short section per project, then a list of decisions we need from them.”
- Quality bar. “If something in the reports is unclear or contradictory, say so instead of guessing.”
- The final ask, restated. “Now write the one page update.”
Why the Quality Bar and the Role Matter
That seventh item is my favorite and the one people most often leave out. Giving the model explicit permission to say “I don’t know” or “this is unclear” cuts down on confident guessing a lot. You’re telling it that honesty counts as a good answer.
Assigning a role, the first item, is useful but often overrated. “You are a world class marketing expert” doesn’t magically add expertise. What helps is the situation that comes with the role: who you are, what you’re trying to do, and what’s at stake. That’s context, and context is what moves the needle.
Common Mistakes When Learning How to Write AI Prompts
After reviewing hundreds of prompts from teams across industries, these come up constantly.
Contradictory Instructions
“Be thorough but keep it brief.” “Casual but highly technical.” One guide calls out exactly this, noting that asking for a casual, fun post that is also highly technical pulls the model in two directions at once. If you need both, explain how they fit: “Use a relaxed tone, but don’t simplify the technical details, because the readers are engineers.”
Assuming the Model Knows Your Company
It doesn’t know your product names, your internal shorthand, or that “Q3” in your company starts in February. Spell it out.
Burying the Actual Question
I’ve seen prompts with eight paragraphs of background and the real request tucked into a single clause in the middle. Put the ask where it can’t be missed, ideally at the end.
Never Giving Useful Feedback
“This is wrong” teaches the model nothing. “The second section treats our competitor as a market leader, but they’re smaller than us. Rewrite it with that in mind” fixes the problem.
Trusting Output Without Checking It
Even a perfect prompt doesn’t guarantee accurate facts. Models can still state wrong information with full confidence. For anything that matters, like numbers, citations, legal or medical claims, verify it against a real source. Good prompting cuts down on errors. It doesn’t remove them.
The Real Skill Underneath How to Write AI Prompts
If you take one thing from this guide, let it be this. Learning how to write AI prompts is really learning how to think clearly about what you want before you ask for it. The prompt just makes that thinking visible.
The people I’ve seen get the best results from AI aren’t the ones with secret phrase lists or giant prompt libraries. They’re the ones who can explain a task well to a human colleague. They know their audience, they know what done looks like, and they say both out loud. The model just happens to be the colleague.
Start with your next prompt. Before you hit enter, ask yourself what a smart stranger would need to know to do this well. Then write that down. That one habit will get you better answers than any trick in this article.
Frequently Asked Questions About How to Write AI Prompts
What is the best way for beginners to learn how to write AI prompts?
Start by stating the task clearly, then add who the output is for, why you need it, and what format you want. Google’s Gemini guide advises beginners to start with zero shot prompting and build from there. Add examples or more detail only when the first answer misses. You can read Google’s approach in this overview of the Gemini Prompting Guide 101.
How long should an AI prompt be?
As long as the task requires. Quick everyday requests can be a sentence or two, while complex work like reports, analysis, or code often needs several paragraphs of context. Focus on covering what the model can’t guess rather than hitting a word count. Anthropic’s guide on being clear and direct explains why detail usually beats brevity for serious tasks.
Does telling an AI to “think step by step” still work?
It can help on multistep reasoning tasks, and the original research behind it is strong. Many newer models already reason internally, so the bigger gains now come from telling the model what to reason about, such as listing risks before recommending an option. The foundational research is in the chain of thought prompting paper by Wei and colleagues and the follow up study, Large Language Models are Zero Shot Reasoners.
Should I give the AI examples in my prompt?
Yes, especially when you want a specific tone, format, or style that is hard to describe. Use a few varied examples so the model learns the pattern rather than copying one sample’s quirks. The DigitalOcean guide to prompt engineering best practices covers few shot prompting with practical examples.
Why does the AI ignore part of my long document?
Models tend to pay most attention to the beginning and end of long inputs. Put long material near the top, place your question at the end, and repeat critical instructions if needed. The research behind this is the Lost in the Middle study from Stanford and partners.
How do I fix a prompt that keeps giving bad answers?
Work out why the answer failed: unclear instructions, missing information, or the wrong style. Each needs a different fix. Rewrite the original prompt with the correction built in instead of piling corrections into the chat. OpenAI’s prompt engineering best practices recommend this kind of iterative refinement.
References
- Wei, J., Wang, X., Schuurmans, D., et al. (2022). Chain of Thought Prompting Elicits Reasoning in Large Language Models. NeurIPS 2022, arXiv.
- Kojima, T., Gu, S. S., Reid, M., Matsuo, Y., and Iwasawa, Y. (2022). Large Language Models are Zero Shot Reasoners. arXiv.
- Liu, N. F., Lin, K., Hewitt, J., et al. (2024). Lost in the Middle: How Language Models Use Long Contexts. Transactions of the Association for Computational Linguistics.
- Anthropic. Be Clear, Direct, and Detailed. Claude Prompt Engineering Documentation.
- OpenAI. Prompt Engineering Best Practices for ChatGPT. OpenAI Help Center.
- Android Authority. Google Releases Official Prompting Guide for Gemini.
- DigitalOcean. Prompt Engineering Best Practices: Tips, Tricks, and Tools.
- Walker, S. M. Prompt Engineering Guide: A Comprehensive Examination of Prompt Techniques. Klu.
- Hostinger. How to Write an AI Prompt.
- Creaitor. How to Write AI Prompts: The Complete Guide for 2026.