Skip to content

Prompt engineering for beginners: 10 before-and-after examples

A prompt is just the message you give an AI. Ten everyday before-and-after rewrites show which small changes get better answers in ChatGPT, Claude or Gemini.

By TodayAI7 min read
A man at a desk writing in a notebook beside an open laptop in a modern office
A man at a desk writing in a notebook beside an open laptop in a modern office· Photo by Vitaly Gariev on Unsplash

The Quick Read

20-Second Answer

A prompt is the message you give an AI, and vague messages get generic answers. Adding context, an audience, a format, a length or an example fixes most disappointing replies, in any chatbot.

What Matters

  1. 01Tell the AI what the answer is for and who will read it. That one habit improves most prompts.
  2. 02Ask for a format and a length, or show one example of what good looks like.
  3. 03Magic phrases, threats and promised tips are not worth your time. Clear writing is.

What Should I Do?

Pick one prompt you used this week that disappointed you. Rewrite it using the checklist at the end, run it again, and compare the two answers.

A prompt is whatever you type to an AI chatbot. A question, an instruction, a pasted email, all of it.

Wording matters because the AI can't see inside your head. It doesn't know who the answer is for, how long it should be or what you already tried. It fills the gaps with the most average guess, so you get an average answer.

The people who make these tools say much the same thing. Google's Gemini docs say to give clear instructions, add context and show examples. Anthropic's guide for Claude leads with being clear and direct. OpenAI's guide recommends giving examples and relevant context. The tricks below work in all three.

Here is what a well-built prompt is made of.

Anatomy of a good prompt: one request split into task, context, audience, format and constraints, each on its own labelled line.
Anatomy of a good prompt: one request split into task, context, audience, format and constraints, each on its own labelled line.

You rarely need every part. Ten rewrites will show you which ones to reach for.

10 prompts, before and after

1. Studying

Before:

Explain photosynthesis.

After:

I'm a 15-year-old revising for a biology exam on Friday. Explain photosynthesis in simple words, then give me three exam-style questions to test myself. Don't give the answers until I reply.

Why it's better: it says who it's for and gives context. The AI now knows the level, the goal and what to do next. The last line also sets a rule, so you actually practise instead of peeking.

2. Writing an email

Before:

Write an email to my landlord about the broken heating.

After:

Write a short email to my landlord. The heating has been broken since Monday, I've already texted once with no reply, and I want an engineer booked this week. Polite but firm. Under 120 words. Ask for a reply by Thursday.

Why it's better: it gives context and sets the length and tone. Facts like "texted once, no reply" are things the AI would otherwise have to invent.

3. Summarising

Before:

Summarise this article.

After:

Summarise the article below for my manager, who has two minutes and hasn't read it. Give me the main point in one sentence, then three bullet points on what changes for our team. Flag anything the article claims without evidence.

[paste article here]

Why it's better: it sets the format and the audience. "Summary" can mean ten words or a thousand. The final instruction also asks the AI to check the source, not just shrink it.

4. Coding help

Before:

My code doesn't work. Fix it.

After:

This Python function should return the average of a list, but it crashes on an empty list with "ZeroDivisionError". Here's the code and the full error message. Explain what's wrong in plain English first, then show the fixed version. Don't change anything else.

[paste code and error here]

Why it's better: it gives context (what it should do, what it does instead) and says what to avoid. "Don't change anything else" stops the AI quietly rewriting your whole file.

5. Planning a trip

Before:

Plan a trip to Lisbon.

After:

I'm planning 3 days in Lisbon in March with a friend. We like food markets and walking, hate queues, and have about 150 euros a day between us. Before you suggest anything, ask me up to five questions that would help you plan better.

Why it's better: it asks the AI to ask you questions. A trip depends on things you haven't mentioned yet, such as dates, pace and budget. Let the AI find the gaps rather than guess.

6. Feedback on writing

Before:

Is my essay good?

After:

You're acting as a tough but fair teacher. Below is my essay for a college application. Give me the three biggest weaknesses first, then two strengths. Quote the sentence each point refers to. Don't rewrite it for me.

[paste essay here]

Why it's better: it gives the AI a role, used sparingly, and says what to avoid. Without it, most chatbots lean towards praise. A role works here because it changes the type of answer. A role like "world's greatest essay expert" changes nothing.

7. A spreadsheet question

Before:

How do I add up my sales in Excel?

After:

I use Excel. Column B has dates and column D has sales amounts, with headings in row 1. I want the total of column D for March only. Give me one formula, then explain each part in one line. Tell me what to check if it returns zero.

Why it's better: it gives context about the real layout and sets the format. Naming the columns gets you a formula you can paste. The last line pre-empts the most common failure.

8. Describing an image

Before:

Make a picture of a dog.

After:

A golden retriever puppy sitting in a pile of autumn leaves, low camera angle, soft late-afternoon light, shallow depth of field, warm colours. Photo style, no text, no people.

Why it's better: it adds specifics and says what to avoid. Image tools can't read your mind about style, light or setting. Short, concrete details beat long, flowery ones.

9. Making a decision

Before:

Should I take the new job?

After:

I'm deciding between my current job (stable, 38k, boring) and a startup offer (45k, risky, more responsibility). I have six months of savings and no dependants. Take this in steps. First, list what I'd gain and lose with each. Second, ask me the three questions that would most change the answer. Third, tell me what you'd want to know before deciding. Don't tell me what to do.

Why it's better: it breaks the task into steps and says what to avoid. You get a thinking partner instead of a coin toss. The AI doesn't know your life, so treat it as a sounding board and make the call yourself.

10. Learning a new topic

Before:

Teach me about the stock market.

After:

I know nothing about investing. Teach me how the stock market works in five short lessons of about 150 words each. Use one everyday analogy per lesson. After each one, quiz me with a single question and wait for my answer before moving on. At the end, check your own lessons for anything oversimplified and tell me.

Why it's better: it sets length and format and asks the AI to check its work. A single dump of information is hard to absorb. Lessons with a quiz are not. The final line makes it flag its own shortcuts.

A quick checklist

Before you hit send, run through this:

  • Task: did I say clearly what I want done?
  • Context: what does the AI need to know that I haven't said?
  • Audience: who will read or use the answer?
  • Format: list, table, email, steps, one paragraph?
  • Length: how long, roughly?
  • Avoid: what do I not want?
  • Example: can I paste a sample of what good looks like?
  • Questions: should it ask me what it needs to know first?
  • Check: should it review its own answer, or tell me what it's unsure about?

You don't need all nine every time. A quick question can stay quick. Use the list when an answer disappoints.

And if the first answer is off, don't start again. Reply with what was wrong: "too formal", "shorter", "I meant the Portuguese city". Refining is normal. Google's own guide describes prompt design as iterative.

What not to bother with

Magic phrases. "Take a deep breath", "think step by step" and "you are a world-class expert" get passed around like spells. Asking for steps can help on a hard problem, but clear instructions do more than any incantation.

Threats and tips. Promising a big tip or warning that someone will be fired is internet folklore. We haven't seen reliable evidence it helps, and it makes your prompt noisier. Say what you need instead.

Long prompts for their own sake. Length isn't quality. Three useful sentences beat ten padded ones.

Perfect first tries. Nobody writes the ideal prompt straight away. Treat the first answer as a draft.

Trusting the output blindly. A better prompt gets you a better answer, not a guaranteed true one. Check names, numbers and anything that matters. For medical, legal or money decisions, use the AI to prepare your questions, then ask a professional.

The common thread is simple. Write to the AI the way you'd brief a smart new colleague who has never met you: say what you want, why, for whom, and what good looks like.

Sources and links

  1. Google's Gemini docsaistudio.google.com
  2. Anthropic's guide for Claudeplatform.claude.com
  3. OpenAI's guidedevelopers.openai.com

Share this story

About the author

BS

TodayAI

Written and researched by the TodayAI team. We publish under this shared byline rather than crediting individual writers while the publication grows. Read our editorial policy.