How to Write Better Prompts
A practical guide to getting more useful results from any text-based AI tool.
Who this is for: anyone writing prompts for tools like ChatGPT, Claude, or Gemini. No technical background needed. How it's organized: the fundamentals come first, then advanced techniques, then a checklist and reusable template.
The core idea: a good prompt is mostly clear communication. Prompt quality tracks output quality, so vague prompts produce vague answers [2]. Write your prompt like a brief: clear goal, clear constraints, clear output format [5].
Part 1: The Fundamentals
Master these five before reaching for anything fancier. Advanced techniques won't rescue a prompt whose core request is unclear [1].
1. Start with a clear instruction
Open with a verb that names the action: Summarize, Explain, Compare, List, Rewrite, Translate, Analyze [1]. Open-ended requests like "Tell me about AI" leave the model to decide what matters; a specific instruction makes that decision for it. Say what the output should contain, not just what topic to work on [1].
| Instead of | Try |
|---|---|
| "Tell me about prompt engineering." | "Explain prompt engineering in five bullet points for someone new to AI." |
Tip: Put the instruction at the top of the prompt. In very long prompts, restate it at the end [2].
2. Provide context
The model knows only what you tell it. Include the details that change the answer: who the audience is, what the material covers, how the result will be used, and what has already been decided [1].
| Instead of | Try |
|---|---|
| "Write a welcome email." | "Write a welcome email for new users of a project management tool. The audience is non-technical. Keep it under 150 words, friendly but professional." |
Explaining why you need something (the purpose, the audience, the reason a constraint exists) measurably improves relevance [1].
3. Be specific
Specificity means explicit requirements: word count, depth, angle, structure, and any restrictions such as budget or scope [1]. It also reduces the chance of an irrelevant or fabricated answer.
| Instead of | Try |
|---|---|
| "What is the best restaurant in Cambridge?" | "Recommend a restaurant in Cambridge, Massachusetts, within walking distance of Harvard Yard, open for dinner, under $40 per person." |
But don't overdo it. Include the details that change the answer and cut the ones that don't. Extra detail is noise that competes with the parts that matter [2].
4. Define the output format
If you don't specify a format, the model picks one for you. State the shape explicitly: bullet points, numbered list, table, short paragraph, outline, JSON, or a named document structure [1][5].
"Summarize this report as a numbered list of the three main findings, one sentence each."
Two refinements worth knowing:
- Phrase format rules positively. "Write in flowing prose paragraphs" outperforms "don't use markdown" [1]. Models follow instructions about what to do more reliably than prohibitions [2].
- Match your prompt's style to the output you want. A heavily bulleted prompt tends to produce heavily bulleted answers [1].
5. Specify tone and audience
"Explain this to a high-school student" and "explain this to a subject-matter expert" should produce genuinely different responses. Name the reader and the register (formal, conversational, technical, persuasive) along with the length and style expectations [5].
Part 2: Techniques That Raise Reliability
6. Show examples (one-shot and few-shot)
Showing often beats describing. Give one or two input/output pairs, then hand the model a new input to handle the same way [1][4].
"Here are two examples of meeting notes written as three bullet points. Write a third summary of the meeting below in the same style."
Rules that make examples work:
- Start with one. Add more only if the output still misses [1].
- Diversity beats quantity. Two examples covering different cases outperform five near-identical ones; one edge case is often worth three typical ones [4].
- Two to four is the sweet spot. Returns drop off quickly past five [4].
- Examples are instructions. Models read them closely, so any stray pattern in your example (a quirk of punctuation, a hedge, an unwanted aside) will be copied [1].
- Reach for examples when the format is hard to describe in words. If you can explain it in a sentence, just explain it [4].
7. Say what to do, and what to avoid
Stating limits up front saves a round trip.
"Summarize this article. Do not include statistics, and do not mention pricing."
Where possible, convert a prohibition into a positive instruction. "Refer the user to /help/faq" produces better compliance than "don't ask for the password" [2].
8. Separate instructions from content with delimiters
Once a prompt contains two kinds of content, your instructions plus the text to work on, mark the boundary. Triple backticks, XML-style tags, or ### markers all work [2][4].
Summarize the text between the tags in three sentences.
<text>
[paste the article here]
</text>
Without a delimiter, the model reads everything as one block and may mistake phrases inside your source material ("ignore the above," "focus on costs") for instructions [4].
9. Give the model an escape hatch
Tell the model it's allowed to say it doesn't know. Explicit permission to express uncertainty is one of the most effective ways to reduce invented answers [1].
"Answer using only the document above. If the answer isn't there, reply NOT_FOUND."
On grounded question-answering, this "out" clause is the single highest-impact defense against fabrication [2]. Asking for citations helps for the same reason: a fabricated claim now requires a fabricated source that won't survive inspection [2].
10. Ask for reasoning on multi-step problems
For tasks where intermediate conclusions determine the final answer (calculations, multi-criteria comparisons, diagnostic logic) ask the model to work through it step by step before answering [4][5].
The test: if a wrong intermediate step would change the final answer, ask for reasoning. For lookups, translations, and simple classification, it just adds length without improving accuracy [4].
If your tool has a built-in reasoning or "extended thinking" mode, prefer that over asking manually [1].
11. Break big tasks into a chain
One broad prompt usually loses to two narrow ones. Ask for the outline, then the draft, then the edit, each step feeding the next [1][2].
Use chaining when a single prompt produces unreliable results, when the task has genuinely separate stages, or when you want to inspect the work partway through [1].
12. Iterate deliberately
A first prompt is a first draft. Run it, read the output, name the specific failure, change one thing, and run it again [2]. Small edits often produce disproportionately better results, and changing one variable at a time tells you which edit actually helped.
13. Ask the model what it needs
When you're unsure what to supply, ask. Ending with "What additional information do you need to complete this task?" surfaces the gaps before you get a wrong answer [3].
Troubleshooting
| Symptom | Likely fix |
|---|---|
| Output is generic | Add specificity and examples; ask it to go beyond the basics [1] |
| Output misses the point | State your actual goal and why you're asking [1] |
| Format keeps changing between runs | Add an example, or spell out the format as a spec [1] |
| Answer sounds confident but wrong | Restrict it to supplied sources; allow "I don't know"; require citations [1][2] |
| Results are unreliable on a complex task | Split into a chain of narrower prompts [1] |
| Too much preamble | "Skip the preamble and start with the answer." [1] |
Common Mistakes
- Too vague. "Write about AI" gives no direction.
- Too much unrelated detail. Noise crowds out the parts that matter [2].
- Missing constraints. No length, format, or audience means the model chooses all three [5].
- Assuming knowledge. Anything you don't state, the model doesn't know [1].
- Over-engineering. Longer and more complex is not automatically better [1].
- Stacking every technique at once. Pick the ones that address your actual problem [1].
- Unstructured walls of text. Add delimiters before adding more words [4].
- Stopping after one attempt. The first prompt rarely lands [1].
A Simple Prompt Template
TASK: What you want done, stated as a verb.
CONTEXT: Audience, purpose, background, source material.
CONSTRAINTS: Length, tone, format, exclusions, what to do if uncertain.
EXAMPLE: A short sample of the output you want (optional).
Filled in:
Task: Write a product description for a time-tracking app. Context: Audience is small business owners with 5 to 20 employees evaluating tools for the first time. Constraints: 200 words. Professional and practical tone. Two short paragraphs with a heading. No pricing claims. If you need details about features I haven't given you, ask instead of inventing them. Example: [paste a description whose style you like]
Pre-Send Checklist
Run through this before any prompt that matters [3][5]:
- The task is stated as a clear, single instruction
- The audience and purpose are named
- Length, format, and tone are specified
- Exclusions and boundaries are stated
- Source material is delimited from instructions
- An example is included if format matters
- The model is told what to do when it doesn't know
- I know what a good answer looks like, so I can tell whether I got one
Quick Reference: What to Use When
| If you need... | Reach for... |
|---|---|
| A specific output format | Explicit format instructions, or an example [1] |
| Consistency across repeated runs | An output spec plus one example [3][4] |
| Step-by-step reasoning | Built-in reasoning mode, or "think step by step" [1][4] |
| Fewer invented facts | Supplied sources, permission to say "I don't know," required citations [1][2] |
| A complex multi-stage result | Prompt chaining [1][2] |
| A clean separation of data and instructions | Delimiters [2][4] |
References and Helpful Links
- Prompt engineering best practices (Anthropic). Core and advanced techniques, a technique-selection guide, and a troubleshooting table [1].
- The ultimate guide to writing effective AI prompts (Atlassian). Practical tips with adaptable examples.
- Getting started with prompts for text-based generative AI tools (Harvard University Information Technology). Specificity, tone, audience, and output format.
- Prompt Engineering Guide. Maintained collection covering few-shot prompting, chain-of-thought, and iterative refinement.
- Prompt engineering best practices. Consolidates guidance that converges across OpenAI, Microsoft Azure, Google Vertex AI, and Palantir Foundry [2].
- How to Structure AI Prompts. Deep dive on system/user split, delimiters, chain-of-thought, and few-shot examples, with before/after comparisons [4].
- Prompt Engineering Best Practices: Checklist, Templates, and Examples. Copy-paste checklists and output-contract templates [3][5].
- AI prompt engineering: The art of AI instruction (K2view). How prompt engineering works in practice.