Examples

20 prompt engineering examples, before and after

Updated September 2026 · ~12 min read

The gap between a prompt that disappoints and one that works is usually two sentences of context and one constraint. Here are twenty pairs — the version people actually type, and the version that gets a useful answer — with what changed named each time.

How to read these

Every pair below is the same request twice: the version people actually type, and the version that gets a useful answer. Under each one is a single line naming what changed, because the point is not to collect twenty prompts — it is to see the same four or five moves applied twenty times until they become automatic.

Those moves are the subject of the complete guide to prompt engineering: give the model a role, the context it cannot infer, one specific task, real constraints, and the format you want back. Watch for them below.

Email and messages

1. Declining a meeting

Before

write an email declining a meeting

After

Write a short reply declining a 90-minute workshop invitation from a client I want to keep. I am declining because the agenda is not something my team can affect, not because I am busy. Offer one alternative: a 20-minute call with whoever owns the decision. Warm but not apologetic, under 80 words, no exclamation marks.

What changed: the real reason was supplied. "Declining a meeting" has a dozen honest versions and the model picked the wrong one; naming the reason picks it for them.

2. Chasing an unpaid invoice

Before

follow up on an invoice politely

After

Write a second follow-up on a €4,200 invoice that is 18 days overdue. This is a client we have worked with for two years and want to keep, and the first reminder got no reply. Firm, not passive-aggressive, no threat of escalation yet. Ask one direct question that needs an answer. Under 90 words.

What changed: the stakes and the history. Second reminders and first reminders are different emails, and only one of them can afford to be gentle.

3. Asking a colleague to redo something

Before

help me tell someone their work needs redoing

After

Draft a Slack message to a designer on my team. The screens they delivered solve a different problem than the brief — good work, wrong problem, which is partly my fault for a vague brief. I need them redone this week. Take responsibility for the brief, be specific about what is wrong, do not soften it into ambiguity. Four sentences maximum.

What changed: the emotional shape of the message. "Be direct" and "be kind" pull against each other, so the prompt says which parts each applies to.

4. Telling a customer about a delay

Before

write an apology for a delay

After

Write an in-app message telling users that a feature we announced for March is slipping to May. Reason: we found a data-loss bug in testing and will not ship around it. Audience: people who have been waiting and have said so publicly. Lead with the new date, give the real reason in one sentence, no corporate hedging, no "we appreciate your patience". Under 70 words.

What changed: a banned phrase list. Naming the clichés you do not want removes more filler than any positive instruction.

Writing and editing

5. Cutting a paragraph down

Before

make this shorter

After

Cut the paragraph below by about half. Keep every fact and every number. Cut adverbs, hedges and any sentence that restates the one before it. Do not change my vocabulary for something more formal, and keep the contractions. Show the cut version only.

What changed: "shorter" became a target, a rule for what may go, and a rule for what may not. Unconstrained, models shorten by flattening your voice.

6. Making a bio sound like a person

Before

write my linkedin bio, im a backend developer

After

Write a LinkedIn summary for me. Backend developer, 6 years, mostly Go and Postgres, currently on payments infrastructure at a mid-size fintech. The thing I am actually good at is making slow systems fast and boring. Audience: hiring managers, not recruiters. First person, three short paragraphs, no "passionate", no "results-driven", one concrete example rather than a list of adjectives.

What changed: one specific, slightly unusual detail. "Slow systems fast and boring" is the line a generic bio cannot generate and a good one is built around.

7. Turning notes into something readable

Before

clean up these meeting notes

After

Below are my raw notes from a customer call. Turn them into a summary for colleagues who were not there. Structure: what they want, what they are currently doing instead, what would have to be true for them to switch, and open questions. Do not add anything that is not in the notes — if something is unclear, list it under open questions rather than guessing.

What changed: an anti-invention clause. Summarizing prompts fail by filling gaps plausibly; giving the model somewhere to put uncertainty stops it.

Research and learning

8. Explaining something at the right level

Before

explain kubernetes

After

Explain what Kubernetes actually does to a backend developer who has shipped services with Docker Compose and has never used an orchestrator. Start from the problem it solves, not the architecture. Use one running example. Skip anything I would only need at 50+ services. Under 400 words.

What changed: the reader, named by what they already know. "Explain X" has no correct answer until you say who is asking.

9. Comparing two options

Before

postgres vs mongodb which is better

After

We are building an appointment-booking product: heavy relational reads, strong consistency requirements, a two-person team with SQL experience and no NoSQL experience. Compare Postgres and MongoDB for this specific case as a table — data model fit, consistency, operational burden for two people, hiring. Then recommend one in two sentences and name the strongest argument against your pick.

What changed: "which is better" became "better for this". The request for the counter-argument is what stops a comparison from being a rationalization.

10. Getting a study plan you will follow

Before

help me learn spanish

After

Build me a 12-week Spanish plan. Starting point: I can read menus and understand slow speech, I freeze when I have to speak. 30 minutes on weekdays, an hour on Sunday. Goal: hold a 10-minute conversation with my partner's family at Christmas without switching to English. Weight it heavily toward speaking. Give me week 1 in full detail and the other 11 as one line each.

What changed: a goal with a date and a named weakness. The last instruction also stops a twelve-week wall of text nobody reads past week two.

Planning and decisions

11. Weighing a real decision

Before

should I take the job offer

After

Help me think through a job offer. Current: senior dev, stable, bored, good team. Offer: staff role at a 30-person startup, 15% more, 18 months of runway, a manager I liked in interview. I have a mortgage and no other dependents. List what I should find out before deciding that I probably have not asked, then the two strongest arguments for each side. Do not recommend — I want the questions, not the answer.

What changed: the model was told what job it has. Refusing the recommendation is what turns advice into something useful.

12. Preparing for a difficult conversation

Before

how do I ask for a raise

After

Prepare me for a raise conversation. I am 20% below market for my role by two salary surveys, I have been here three years, and I led the migration that cut our infrastructure bill by a third. My manager is supportive but does not control budget. Give me: an opening line, the two objections I am most likely to hear with a response to each, and the sentence I should not say.

What changed: the specific leverage and the specific obstacle. The last request is the one that produces something you could not have written yourself.

13. Turning a goal into a week

Before

help me be more productive

After

I want to ship a side project that currently has no users. I have about 8 hours a week, spread over weekday evenings. The failure pattern is that I rebuild the landing page instead of talking to anyone. Give me one week of concrete tasks with hours attached, weighted toward the thing I am avoiding, and one rule to stop the avoidance.

What changed: a named failure pattern. Productivity advice is worthless in general and specific once it knows how you personally fail.

Code

14. Debugging

Before

why is my code slow

After

This endpoint takes 4 seconds on a list of ~2,000 rows and under 100ms on 50 rows. Postgres, Go, no caching layer. I have already checked that the index on user_id is being used. Give me the three most likely causes in order of probability given that scaling shape, and for each one the exact thing I should measure to confirm or rule it out. Do not rewrite the code yet.

What changed: the shape of the problem and what has been ruled out. "Do not rewrite yet" keeps the answer diagnostic instead of speculative.

15. Getting a real code review

Before

review my code

After

Review the function below as if it were a pull request from a colleague you respect. Priorities in order: correctness under concurrent calls, then error handling, then readability. Ignore style and naming. For each issue give the line, what breaks, and a concrete input that triggers it. If nothing is actually wrong, say so instead of finding something.

What changed: a priority order and permission to find nothing. Without the last clause, review prompts always return findings, real or not.

16. Writing tests worth having

Before

write unit tests for this function

After

Write table-driven tests for the function below. Cover: the empty input, a single element, duplicate keys, and a value at the boundary of the length cap. Skip the happy path with three normal items — that one never catches anything. Use the standard library only, and name each case after the behaviour it pins, not after its inputs.

What changed: the cases were chosen by the person who knows the code. Test-writing prompts default to the cases that never fail.

Images and music

17. A portrait that looks intentional

Before

a portrait of a woman

After

Weathered fisherwoman in her sixties on a harbour wall at first light, salt-crusted oilskins, deep laugh lines, looking past the camera, overcast north-Atlantic light, shallow depth of field, 85mm portrait photograph, muted blues and rust --ar 4:5 --stylize 250

What changed: subject, setting, light, framing and medium, in that order. Image models weight earlier words more heavily, so the ordering is part of the prompt.

18. A product shot

Before

photo of a coffee bag for my shop

After

Matte kraft coffee bag standing on pale oak, front label facing camera, scattered whole beans, soft window light from the left, single soft shadow, clean minimal styling, shallow depth of field, commercial product photograph --ar 1:1 --style raw

What changed: the lighting and the surface. In product prompts those two decide almost everything, and neither is implied by "photo of a coffee bag".

19. An image that has to contain words

Before

poster that says grand opening

After

Vintage letterpress poster, the words "GRAND OPENING" in large condensed serif capitals across the upper third, "Saturday 14th" beneath in a smaller sans, cream paper with visible texture, two-colour print in deep red and black, subtle ink misregistration --ar 2:3

What changed: the text was quoted exactly and placed. Models that can render type need to be told the words, the size and where they sit — otherwise they invent all three.

20. A track that sounds like the one in your head

Before

sad piano song

After

Style: melancholic neo-classical piano, close-mic'd felt piano, faint room noise, sparse cello underneath, no drums, rubato, 62 BPM, intimate and unresolved. Lyrics with structure tags: [Intro] [Verse] [Chorus] [Bridge] [Outro]

What changed: instrumentation, recording character and tempo. "Sad piano" is a mood; the rest is what makes it a specific recording rather than a generic one.

What all twenty have in common

Read the "after" column on its own and the same handful of moves keep reappearing:

None of that requires memorising a framework. It requires noticing, before you send, that you have described the task and not the situation.

Twenty examples, or one key

Prompt AI Keyboard does this to whatever you have already typed — role, context, constraints and format, built for the tool you are writing to — without leaving the app you are typing in. It also fixes grammar, changes tone, translates and types what you say out loud.

FAQ

What makes a good prompt example?

One that shows the same request twice and names what changed. A prompt on its own is a template you will not adapt; a before-and-after pair teaches the move, which transfers to your own work.

What do the best prompts have in common?

One specific detail nobody else would have, the reader named explicitly, at least one constraint on what not to do, permission to say nothing rather than invent, and a stated output shape. Most weak prompts describe the task and skip the situation.

Do these prompt examples work in ChatGPT, Claude and Gemini?

Yes — everything here is model-agnostic, because the five ingredients are. The per-model differences sit on top: Claude rewards heavier structure, Gemini rewards very long inputs and an explicitly named output format, and image and music models want dense descriptive phrases rather than sentences.