Which template to choose
There's no "perfect prompt": there's the right template for your task.
- Simple, common task (translating, summarizing a short text, rewriting an email): go straight in, without examples. Zero-shot works when the model has already seen that type of request a thousand times: translation, general-knowledge questions, classifying the tone of a text.
- You need to impose a precise, repeatable style or format (classifying reviews, writing product descriptions that are all the same, labeling data): use examples. Two or three cases solved according to your criterion are worth more than a page of generic instructions.
- Complex decision or analysis (comparing options, a choice with pros and cons): ask for step-by-step reasoning. It's needed when the answer requires a verifiable logical path: differential diagnoses, multi-variable evaluations. You specify the steps you want carried out.
This logic holds on ChatGPT, Claude and Gemini, with one nuance: Gemini prefers shorter, more direct prompts than Claude or GPT.
How to do it
The principle that makes the most difference of all: context is the real prompt. The more it knows about you, your work and the documents in play, the more precise the answer.
Here are the steps to build a prompt that works, whatever AI you're using. From the browser or the app the path doesn't change: you write in the message box.
- Assign a specific role. Not "an expert" but the precise profession. "General practitioner with experience in managing chronic conditions" produces results more grounded in reality than a generic "write a medical report."
- Give the context. Who you are, who the result is for, what you'll do with it.
- Define the task in one clear sentence.
- Impose the format. Table, prose, bullet points, word count: if you don't say it, the AI chooses, and not always the way you need.
- If the task is delicate, add 2-3 examples of the result you want.
You don't need walls of text. Even three well-written lines on role, context, constraints and format beat a vague paragraph.
The operational syntax for a complete prompt:
Act as the marketing manager of a small artisan pastry shop.
Context: I'm opening a new store in the center of Bologna, customers aged 30-55,
advertising budget close to zero. I need to announce the opening on Instagram.
Task: write me 3 captions for the launch post.
Format: each caption max 50 words, warm and direct tone, with a clear call
to action and 3 relevant local hashtags.
If you're missing information to do a good job, ask me before writing.
That last line saves you the wasted rounds: instead of inventing the missing details, the AI asks you for them.
For the example-based format (few-shot), the operational syntax:
Classify each review as Positive, Negative or Mixed. Follow these examples:
Review: "Super fast shipping but the product was scratched." -> Mixed
Review: "Everything perfect, I'll buy again." -> Positive
Review: "It never worked, support was unreachable." -> Negative
Now classify these:
[paste your reviews here]
Check: if the first answer is generic or wrong, don't start from scratch. Reply in the same chat saying what to correct ("shorter", "less formal tone", "the price is missing"). The AI keeps the previous exchange in mind and refines.
Concrete example
Marco runs a B&B and has to reply to a negative review on Booking: the guest complains about noise and a slow check-in. First attempt, a terse prompt: "Write a reply to this negative review." Result: three cold lines, good for any property on the planet. Useless.
Second attempt, a prompt built with the template:
Act as the owner of a B&B who cares about online reputation.
Context: a guest left 2 stars complaining about nighttime noise and a slow
check-in. It's true that we were short-staffed that day.
Task: write the public reply to the review.
Format: max 80 words, human and non-defensive tone, acknowledge the problem,
explain what we've already changed, invite them back. No canned clichés.
Result: a reply that admits the issue, cites the concrete change (extra desk shifts on weekends) and closes with a sincere invitation. Marco pasted it after changing two words. Same tool, different prompt.
When it does NOT work (and how to fix it)
If the AI invents data, numbers or sources
It happens when it lacks context and fills it in on its own. Fix: paste the real data into the chat yourself and add a constraint line to the prompt, to be copied as is.
Use exclusively the information I provide. If a piece of data is not present,
write "data not available" instead of estimating or inferring it.
If the answer comes in the wrong format
Almost always it's because the format wasn't specified. Ask for a comparison of three options without saying how you want it and you'll get a discursive list that doesn't serve you. Fix: ask explicitly "answer in a table with these columns: X, Y, Z".
If the examples you give aren't enough to improve the output
Often the problem isn't the number of examples but their variety. Covering the diversity of cases counts more than polishing the single perfect example. Fix: instead of three similar examples, choose three different from each other: an easy one, an edge case, an ambiguous one.
If you have to repeat the same context in every conversation
You're wasting time. Load the context once and reuse it: ChatGPT has Projects and memory, Claude has Projects, Gemini has Gems. Look for the "projects" or "custom instructions" feature and park there the fixed info about you. From that moment on every new chat starts already informed.
A tip from someone who really uses it
The trap is believing that a longer prompt means a better prompt. It's false. The work isn't writing longer prompts, it's writing clearer specifications. Before sending, reread and cut everything that isn't role, context, task or format. Try this: take one of your longest prompts, cut 40% of the words and compare the two versions. Often the compressed one performs the same or better.
And load your materials the right way: files in markdown (.md) or plain text (.txt) give the model context better than complex PDFs, which mix text, images and layout and confuse the reading.
Frequently asked questions
Do I have to say "please" and "thank you" to the AI?
It's not needed for the quality of the answer, and with some models the pleasantries are counterproductive: Claude responds better to direct instructions, without politeness framing. Use courtesy if it makes you comfortable, but it's the content of the prompt that counts.
How many examples should I give in a few-shot prompt?
From two to five. The model already learns from a single example; for harder tasks go up to 3 or 5. Beyond that it rarely improves and you only lengthen the prompt.
Is there a universal prompt that works everywhere?
No: each model has its preferences. GPT models respond well to step-by-step instructions, Claude performs with detailed context and tags, Gemini gives its best with clear output specifications. But the role-context-task-format skeleton pays off on all of them.
Does "think step by step" always work for getting more accurate answers?
It's the myth to debunk. On the new generation of reasoning models it can make things worse: in GPT-5 a phrase like "think carefully about this" triggers reasoning mode on its own, and manually adding "think step by step" on a reasoning task risks hurting performance: OpenAI's own documentation advises against it. Use explicit reasoning on standard models and for genuinely logical problems, not as a magic formula to stick everywhere.