Skip to content
Panoptix AI
AI Productivity

How to Write Better Prompts: 10 Techniques That Actually Work

Ten practical prompting techniques drawn from OpenAI, Anthropic and Google's own guides, with before-and-after examples for any AI chatbot.

By Panoptix Editorial TeamPublished 10 min read
A weak one-line AI prompt next to a clearer, structured version of the same prompt
Table of contents

Difficulty

Beginner

Time required

15 minutes

Tools needed

  • Any AI chatbot

Most disappointing AI answers aren't the model's fault. They come from prompts like "write an email to my landlord" that leave the chatbot guessing about everything that matters: what happened, what you want, how firm to sound, and how long it should be. The model fills those gaps with safe, generic defaults, and you get a safe, generic reply.

The good news is that writing better prompts isn't a secret skill. OpenAI, Anthropic and Google all publish prompting guides, and they agree on far more than they disagree on. This guide boils that advice down to 10 techniques you can use in ChatGPT, Claude, Gemini, Copilot or any other chatbot, with a weak and a better version of each prompt so you can see the difference.

You don't need all 10 every time. A quick question needs a quick prompt. But when an answer matters, stacking three or four of these will usually get you there faster than rerolling the same vague request.

Why prompts matter more than the model you pick

People spend a lot of time debating which chatbot is smartest (we compare them in ChatGPT vs Claude vs Gemini). That choice matters, but a clear prompt to a good-enough model often beats a vague prompt to the best one.

Anthropic's prompting best practices put it well: think of the model as "a brilliant but new employee who lacks context on your norms and workflows." Their "golden rule" is to imagine handing your prompt to a colleague with no background on the task. If they'd be confused, the AI will be too. Keep that picture in mind for everything below.

The 10 techniques

  1. Step 1: Give it context and a clear goal

    The single biggest upgrade is telling the model why you're asking and what a good outcome looks like. Anthropic's guide notes that explaining the motivation behind an instruction helps the model "deliver more targeted responses," and OpenAI's reasoning guide says to "be very specific about your end goal."

    Weak prompt
    Write an email to my landlord about the heating.
    Better prompt
    Write an email to my landlord. The heating in my apartment has been
    broken for 9 days. I reported it by phone on the 12th and was told
    someone would come "this week," but nobody did.
    
    Goal: get a firm repair date in writing within 48 hours. I want to
    stay on good terms, so be polite but clear that this is urgent.

    The second version gives the model facts to work with and a finish line. It no longer has to invent a situation or guess how pushy you want to be.

  2. Step 2: Say who it is for and who it should be

    Two quick sentences change the whole tone of an answer: who the reader is, and what role the AI should play. Google's Workspace prompting tips build their framework around a persona, a task, context and a format. Anthropic says even a single sentence of role-setting "makes a difference."

    Weak prompt
    Explain how compound interest works.
    Better prompt
    You're a patient personal finance teacher. Explain how compound
    interest works to my 15-year-old, who just opened her first savings
    account. Use one example with real-looking numbers and skip any
    jargon she wouldn't know.

    The audience matters more than the role, honestly. "Explain it to a 15-year-old" and "explain it to my accountant" should produce very different answers, and they will.

  3. Step 3: Show an example of what good looks like

    If you have a style in mind, showing beats describing. This is called few-shot prompting, and it's been studied for years: the GPT-3 paper (Brown et al., 2020) showed large models picking up a task from just a handful of examples in the prompt. Anthropic calls examples "one of the most reliable ways to steer" format and tone and suggests three to five varied ones. Google's Gemini prompt design guide goes further and recommends always including examples.

    Weak prompt
    Write product descriptions for my candle shop. Make them sound
    like my brand.
    Better prompt
    Write product descriptions for three new candles: "Rainy Library,"
    "Orchard at Dusk" and "Salt Marsh." Match the style of these two
    existing ones:
    
    Example 1: "Cedar Cabin. Woodsmoke, a wool blanket, and the
    creak of an old floor. 40-hour burn."
    
    Example 2: "Sunday Bakery. Warm bread and a little cinnamon. The
    good kind of lazy. 40-hour burn."

    One caveat: examples are powerful, so the model may copy them too closely. If all your examples are two sentences long, expect two-sentence answers. Vary them if you want variety back. OpenAI's reasoning guide also suggests trying without examples first on its newer models and adding them only if needed.

  4. Step 4: Specify the format you want back

    A chatbot will pick a format for you if you don't, and it's often a wall of bullet points with bold headings. If you want a table, a numbered list, a 3-line text message or a paragraph you can paste into a report, say so. Every major guide lists output format as a core ingredient.

    Weak prompt
    Compare three budget laptops for a college student.
    Better prompt
    Compare three laptops under $700 for a college student who mostly
    writes papers and uses Zoom. Give me a table with these columns:
    model, price, weight, battery life, and one-line verdict. Then add
    two sentences on which one you'd pick and why.

    One more trick: describe what you want rather than what you don't. Anthropic's guide suggests replacing "Do not use markdown" with a positive instruction such as "Your response should be composed of smoothly flowing prose paragraphs." Positive instructions give the model a target instead of a fence.

  5. Step 5: Paste in the source material

    If the answer depends on specific information, such as a contract, meeting notes, a syllabus or an email thread, give the model that text instead of asking it to work from memory. This is the most effective way to cut down on made-up details, because the model has something real to anchor to.

    Where you put it matters too. Both Anthropic and Google recommend placing long documents first and your question at the end. Anthropic's docs say queries at the end can improve response quality by up to 30 percent in their tests with complex, multi-document inputs. Google's Gemini guide suggests a bridging phrase like "Based on the information above..." before your question.

    Weak prompt
    What are the main points from our team meeting about the Q3 launch?
    Better prompt
    [paste the full meeting transcript here]
    
    Based on the transcript above, list the decisions we made about the
    Q3 launch, who owns each follow-up task, and any open questions
    nobody answered. Only use what's in the transcript. If something is
    unclear, say so rather than guessing.

    For very long files, see our guide to summarizing long PDFs with AI for free, which covers upload limits and chunking.

  6. Step 6: Use delimiters to separate the parts

    Once a prompt has instructions and pasted text and examples, the model can blur them together. Is that sentence an instruction or part of the document? Clear separators solve this. OpenAI recommends "delimiters like markdown, XML tags, and section titles," and Anthropic's guide says wrapping each type of content in its own tag "reduces misinterpretation."

    You don't need to know anything about code. Triple quotes, dashes, headings or simple labeled tags all work.

    Weak prompt
    Make this sound more professional and shorter hey team so the
    client pushed the deadline again can everyone update their bits
    by thursday also pizza friday is cancelled sorry
    Better prompt
    Rewrite the message inside the draft tags so it sounds professional
    and is under 60 words. Keep all the information.
    
    <draft>
    hey team so the client pushed the deadline again can everyone
    update their bits by thursday also pizza friday is cancelled sorry
    </draft>
  7. Step 7: Set constraints on length, tone and scope

    Constraints are the guardrails: word count, reading level, tone, what to include, what to leave out, and any hard limits like a budget or a deadline. Google's guide lists constraints as their own strategy, and OpenAI's advises you to "provide specific guidelines" when you want to limit a response.

    Weak prompt
    Plan a weekend in Chicago.
    Better prompt
    Plan a Saturday and Sunday in Chicago for two adults in late October.
    Constraints:
    - Budget: about $250 total, not counting the hotel
    - No car; we'll use the L and walk
    - One of us uses a cane, so keep walking under 3 miles a day
    - We love food markets and architecture, and we don't care about
      sports or nightlife
    Keep the whole plan under 300 words.

    Tone words are constraints too. "Warm but brief," "neutral, no hype" and "firm but not rude" are all short phrases the model handles well. Newer models also tend to follow instructions more literally than older ones, so if you want something extra, like more ideas or more detail, ask for it outright. Anthropic's guide makes exactly this point about requesting "above and beyond" behavior.

  8. Step 8: Break big jobs into smaller steps

    Asking for a whole research report or a full wedding plan in one prompt tends to produce something shallow. Google's guide recommends breaking tasks down and chaining prompts, where the output of one becomes the input of the next. You stay in control at each stage and can fix problems before they snowball.

    Weak prompt
    Help me study for my biology final.
    Better prompt
    I have a biology final on cell respiration in 10 days. Let's do
    this in stages.
    
    Step 1 (now): Based on the syllabus I'll paste below, list the
    6 to 8 topics most likely to be tested, in order of importance.
    Stop there and wait for me.
    
    [paste syllabus]

    Then follow up with "Now make flashcards for topic 1," then "Quiz me on it, one question at a time." Our plan your week with ChatGPT guide uses this same staged approach for scheduling.

    What about "think step by step"? Research like Wei et al. (2022) and Kojima et al. (2022) found that asking models to reason out loud, including the simple phrase "Let's think step by step," improved results on math and logic problems. That advice has aged, though. Many current models, such as ChatGPT's thinking modes, Claude with extended thinking and Gemini's thinking models, reason internally before answering. OpenAI's reasoning guide now says to "avoid chain-of-thought prompts" for these models because they already do it. Breaking your task into stages still helps; telling a reasoning model how to think usually doesn't.

  9. Step 9: Ask it to ask you clarifying questions

    Sometimes you don't know what context the model needs. So let it tell you. Adding one line that invites questions before it starts can save several rounds of back-and-forth, and it's especially good for open-ended tasks like cover letters, speeches or project plans.

    Weak prompt
    Write a toast for my sister's wedding.
    Better prompt
    I need a 2-minute toast for my sister's wedding. Before you write
    anything, ask me up to 5 questions about her, her partner, and the
    tone I want. Ask them all at once, then wait for my answers.

    "Ask them all at once" matters. Without it, some chatbots ask one question, then another, then another, which gets tedious fast.

  10. Step 10: Iterate and ask for a critique

    Your first prompt is a draft, not a final answer. Google's Workspace guidance explicitly recommends iterating, and the fastest way to do it is to react to what you got. Be specific about what's wrong: "too formal," "the second paragraph repeats the first," "cut the intro."

    You can also turn the model into its own editor. Ask it to review its answer against your goal before you do.

    Weak follow-up
    Make it better.
    Better follow-up
    Review the cover letter you just wrote as if you were a hiring
    manager for this job posting. List the three weakest sentences and
    explain why. Then rewrite the letter fixing those issues, keeping it
    under 250 words.

    When a conversation has gone off the rails after many turns, don't be afraid to start a fresh chat with a better first prompt that includes what you've learned. Long, messy threads can drag old mistakes forward.

A reusable prompt template

You don't need to memorize the steps above. This template covers most of them. Copy it, delete the lines you don't need, and fill in the rest.

ROLE: You are a [role, e.g. experienced travel planner / friendly
tutor / careful editor].

AUDIENCE: This is for [who will read or use it].

CONTEXT: [What's going on, background facts, what you've tried.]

GOAL: I want to [the outcome]. A good answer will [what success
looks like].

SOURCE MATERIAL (use only this if relevant):
"""
[paste text here]
"""

FORMAT: [table / bullet list / email / 3 short paragraphs / etc.]

CONSTRAINTS: [length, tone, budget, things to avoid or include]

EXAMPLE OF THE STYLE I WANT (optional):
"""
[paste an example]
"""

Before you start, ask me any questions you need answered. Ask them
all at once.

For quick everyday questions, a one-line version of this is plenty: "As a [role], [task] for [audience], in [format], under [length]."

Common mistakes to avoid

  • Being vague about the goal. "Help with my resume" could mean formatting, wording, tailoring or a full rewrite. Pick one.
  • Leaving out the facts. The model can't know your deadline, budget or boss's name. If it matters, include it.
  • Asking it to recall details you could paste. Quoting a policy, contract or article from memory is where chatbots are most likely to make things up. Paste the text.
  • Stacking conflicting instructions. "Be thorough" and "keep it short" in the same prompt force the model to guess which one you meant more. Rank your priorities.
  • Only saying what not to do. A list of "don't"s without a clear "do" leaves the model without a target.
  • Over-engineering simple requests. A 200-word prompt for "what's a synonym for happy" is wasted effort. Match the prompt's effort to the stakes.
  • Trusting the output blindly. Better prompts reduce errors but don't remove them. Check facts, figures and citations, especially for anything medical, legal or financial. For research questions, a search-first tool like the one in our Perplexity review makes sources easier to verify.
  • Giving up after one try. If the first answer misses, tell it what's wrong instead of starting over with the same prompt.

Frequently asked questions

Do I need to say please and thank you to AI chatbots?

It won't hurt, and it costs you nothing. But politeness isn't what makes a prompt work. Context, a clear goal and a specified format do far more. Google's Gemini guide actually advises against "overly persuasive language" and recommends being precise and direct instead.

Does the same prompt work in ChatGPT, Claude and Gemini?

Mostly, yes. The core techniques in this guide come straight from all three companies' official guides, so they transfer well. You'll notice differences in default length and style, so you may need to adjust constraints like "keep it under 150 words" depending on the tool. If you're writing code prompts specifically, our Claude vs ChatGPT for coding comparison covers how each handles them.

Should I still tell AI to "think step by step"?

For older or smaller models, it can still help on math and logic problems. For reasoning models that think before answering, OpenAI's guide says it's unnecessary and sometimes counterproductive. A better use of your words is describing the goal and constraints clearly and letting the model handle the reasoning.

How long should a prompt be?

As long as it needs to be to remove guesswork, and no longer. A quick factual question can be one line. A task where tone, audience and details matter, like a job application or a tricky email, often works best at a short paragraph or two plus any source material you paste in.

Is prompt engineering still worth learning as AI gets smarter?

The fancy tricks matter less than they used to, because newer models understand plain requests much better. What doesn't go away is the need to explain what you actually want. That's less a technical skill than clear communication, and it pays off with people too.

The short version

If you remember nothing else: tell the AI what's going on, what you want, who it's for and what the result should look like. Paste in anything it needs to read. Then treat the first answer as a draft and give specific feedback. Those habits alone fix most bad outputs.

Want to know how we evaluate the tools we write about? See how we test.

Share:

Written by

Panoptix Editorial Team

Our editors test AI tools hands-on for weeks before we publish a word. We pay for our own subscriptions and never accept payment for rankings.

How we test AI tools →