This prompt engineering guide with examples gives you the short answer first: a good prompt states the role, the task, the context and the reason behind it, shows one to three examples of what "good" looks like, and specifies the exact output format. Then you test it on varied inputs and iterate. Everything below is copy-paste templates, before/after rewrites and the mistakes I see most.
I have written the prompts behind the creatives, SOPs and LinkedIn content. The principles here also line up with what OpenAI, Anthropic and Google publish in their own official docs, which I link as we go. No "act as a genius" hacks. Just what works in daily production.
What prompt engineering actually is (in 2026)
Prompt engineering is writing instructions a model can follow reliably, not just once. The "reliably" part matters. Anyone can get one good output by luck. The skill is getting the tenth, fiftieth and five-hundredth output right, from a teammate who did not write the prompt.
Modern models are far better at following instructions than they were two years ago, which changes the game. Old tricks like shouting in capitals or bribing the model with tips are mostly noise now. Anthropic's prompting best practices even suggest dialling back aggressive language, because newer models can over-apply it. What wins today is clarity, context and examples.
The CRAFT framework for prompts
I use a simple checklist called CRAFT. It is not magic; it just stops you forgetting the parts that matter.
| Letter | Component | What to include | Weak version | Strong version |
|---|---|---|---|---|
| C | Context | Who the audience is, the business, the situation, why the task exists | "Write a post about our sale" | "Our D2C skincare brand sells to women 25-40 in tier-1 and tier-2 India; this post announces a 3-day Diwali sale" |
| R | Role | The expertise and perspective the model should adopt | "You are an AI assistant" | "You are a performance copywriter who writes for Instagram audiences in India" |
| A | Action | One clear task with a verb, plus constraints | "Help with captions" | "Write 3 caption options, each under 120 words, with one CTA" |
| F | Format | Exact structure of the output: headings, table, JSON, length | "Make it nice" | "Return a numbered list. For each option: hook line, body, CTA, 3 hashtags" |
| T | Tone and examples | Voice rules, banned phrases, 1-3 samples of good output | "Be engaging" | "Warm, direct, no exclamation marks. Here are 2 captions we liked: ..." |
This maps closely to OpenAI's recommended structure in their prompt engineering guide: identity, instructions, examples and context.
Six principles the official docs agree on
1. Be clear and direct
Anthropic's golden rule: show your prompt to a colleague with no background on the task. If they would be confused, the model will be too. Write it like a brief for a smart new hire.
2. Explain the why
"Never use ellipses" is a rule. "This will be read aloud by a text-to-speech engine, so avoid ellipses" is a reason, and the model can generalise from a reason to cases you did not list.
3. Show examples
Google's Gemini prompt design strategies recommend including few-shot examples in your prompts; Anthropic suggests 3-5 diverse ones for best results. Make them varied, or the model will copy one example too literally.
4. Separate the parts with structure
Use Markdown headings or XML-style tags such as <context>, <instructions> and <examples>. It stops the model mixing up your instructions with the document you pasted.
5. Say what to do, not only what to avoid
"Write in flowing paragraphs" beats "don't use bullet points". Negative-only instructions leave the model guessing what you do want.
6. Break big tasks into steps
One giant prompt that researches, outlines, writes and edits will do all four badly. Chain them: each step's output becomes the next step's input.
Before and after: real prompt rewrites
Example 1: LinkedIn post
Before:
Write a LinkedIn post about AI for small businesses.
Result: a generic listicle opening with "In today's rapidly evolving digital landscape". Unusable.
After:
<context>
I run a 12-person accounting firm in Pune. My audience is Indian
SMB owners who are sceptical of AI hype. Last month we cut invoice
reconciliation time using a simple AI + spreadsheet workflow.
</context>
<task>
Write one LinkedIn post (150-220 words) sharing this as a
first-person story. Open with a specific, concrete line, not a
question. End with one practical takeaway, not a sales pitch.
</task>
<style>
Plain, confident, slightly dry humour. Short paragraphs.
Avoid: "game-changer", "unlock", "in today's world", emojis.
</style>
Result: a specific story with a real hook. It still needs your actual numbers and a human edit, but it is 80% there instead of 10%.
Example 2: Summarising a call transcript
Before:
Summarise this call.
[transcript]
After:
<transcript>
[paste transcript here]
</transcript>
You are preparing notes for a sales manager who was not on this
call and has 60 seconds to read them.
First, pull out exact quotes where the client mentions budget,
timeline or objections. Then write the summary using this format:
**Client need:** one sentence
**Budget signals:** bullets, with quotes
**Objections:** bullets
**Agreed next steps:** owner + date for each
**Risk level:** Low / Medium / High, with one-line reason
If something was not discussed, write "Not discussed". Do not guess.
Note two tricks from Anthropic's docs: put long documents above your instructions, and ask the model to quote relevant parts before answering. Both reduce made-up details.
Example 3: Hinglish reel script
Before:
Write a Hinglish reel script about saving money.
After:
Write a 30-second Instagram reel script in Hinglish (Roman script,
roughly 60% Hindi, 40% English, the way a Delhi 25-year-old talks).
Topic: 3 small monthly expenses young professionals forget to track.
Structure:
- Hook (first 3 seconds, under 10 words)
- 3 points, one line each, with an on-screen text suggestion
- Closing line that invites a comment
Example of the tone I want:
"Salary aayi, 10 din mein gayab? Problem income nahi, leakage hai."
Do not give financial product recommendations.
Copy-paste prompt templates
Replace everything in square brackets. Keep the structure.
Template 1: The universal task prompt
<role>
You are a [specific expert] who works with [audience].
</role>
<context>
[Business, situation, and why this task matters. 2-5 sentences.]
</context>
<task>
[One clear action with a verb.]
Constraints: [length, must-include points, things to avoid].
</task>
<examples>
<example>[A sample of good output]</example>
<example>[A different sample of good output]</example>
</examples>
<output_format>
[Exact structure: headings, bullet list, table, JSON, word count.]
</output_format>
If any information needed is missing, ask me up to 3 questions
before starting.
Template 2: Brand voice extractor
Below are [5] pieces of content that represent our brand voice
at its best.
<samples>
[paste samples]
</samples>
Analyse them and write a brand voice guide with:
1. Tone in 5 adjectives, each with a one-line explanation
2. Sentence length and structure patterns
3. Words and phrases we use often
4. Words and phrases we never use
5. 3 "write like this, not like this" pairs
Base every point on evidence from the samples. Keep it under 400 words
so it can be pasted into future prompts.
Template 3: Critique and improve
<draft>
[paste draft]
</draft>
Act as a tough editor for [publication/audience]. The goal of this
piece is [goal].
Step 1: List the 5 biggest weaknesses, ranked by impact.
Step 2: For each, quote the exact line and suggest a rewrite.
Step 3: Give a revised full version applying all fixes.
Keep my voice. Do not add facts I did not provide.
Template 4: Structured data extraction (for automations)
Extract lead details from the WhatsApp message below.
<message>
[message text]
</message>
Return only valid JSON matching this shape, with no extra text:
{
"name": string or null,
"city": string or null,
"service_interest": "video" | "automation" | "content" | "other",
"budget_mentioned": true | false,
"urgency": "low" | "medium" | "high"
}
Use null when a value is not stated. Never infer a name from a phone number.
Prompts like this sit inside workflows. If that is where you are headed, see these n8n automation ideas for Indian businesses.
Template 5: Prompt that writes prompts
I want to create a reusable prompt for this recurring task:
[describe task, who uses it, how often, what good output looks like].
Interview me with up to 5 questions first. Then write the prompt
using sections for role, context, task, examples and output format,
with [SQUARE_BRACKET] variables for the parts that change each time.
Finally, list 3 test inputs I should try to check it works.
Prompting ChatGPT vs Claude vs Gemini
The fundamentals transfer across all three. The differences are in the details, and they shift with every model release, so always check the official page for the model you use.
| Area | OpenAI (ChatGPT / API) | Anthropic (Claude) | Google (Gemini) |
|---|---|---|---|
| Recommended structure | Identity, instructions, examples, context; Markdown and XML both fine | XML tags to separate instructions, context, examples and input | Clear instructions, constraints, format, context; prefixes to label inputs and outputs |
| Examples | Few-shot input/output pairs | 3-5 diverse examples in example tags | Recommends including few-shot examples |
| Reasoning models | Give reasoning models a goal and let them work out the details; be more explicit with non-reasoning GPT models | Newer models think adaptively; guide how to reflect rather than forcing steps | Break complex tasks into chained prompts |
| Notable warning | Pin production apps to a model snapshot and run evals | Tone down all-caps "CRITICAL" language that newer models may over-apply | For Gemini 3 models, keep temperature and sampling at defaults |
My practical rule: write one well-structured prompt, run it on all three with the same test inputs, and pick by output, not by brand loyalty. Our roundup of the best AI tools for content creators in India covers which tool suits which job.
How to test and iterate a prompt
- Collect 5-10 real inputs, including awkward ones: a very short brief, a messy transcript, a message in Hinglish.
- Write down what "good" means before you run anything. Three or four pass/fail checks is enough.
- Run the prompt on all inputs. Not just the easy one you wrote it for.
- Change one thing at a time and note it. Otherwise you will not know what fixed it.
- Save the final version with a date and the model name. When the model updates, rerun your test inputs.
This is a tiny version of what OpenAI calls evals. It sounds like overkill until a model update silently breaks the prompt your whole team relies on.
Common prompt engineering mistakes
- Adjectives instead of examples. "Engaging, professional, witty" means something different to every model and every reader.
- Stuffing everything into one prompt. Split research, drafting and editing.
- No output format. Then you spend five minutes reformatting every answer.
- Burying the task under the document. Put long material first, clear instructions after.
- Trusting facts blindly. Ask for quotes from your source, and verify numbers, prices and legal points yourself.
- Keeping prompts in chat history. Save them in a shared doc with version notes, or they disappear.
- Copying viral "mega prompts". They are tuned for someone else's task and model.
- A strong prompt covers context, role, action, format and tone with examples (CRAFT).
- Explain why a rule exists; models generalise from reasons.
- Examples beat adjectives. Use 2-5 varied ones.
- Use tags or headings to separate instructions from pasted material.
- Chain big tasks into steps and test on 5-10 real inputs.
- Save prompts with version notes and retest after model updates.
When a homemade prompt library stops working
For one person, this guide and a shared doc will take you far. It gets harder when ten people need the same quality, your brand voice has to hold across Hindi and English, or prompts run unattended inside automations. That is where a documented system helps; it is what our prompt engineering consultant service builds. The same approach powers our LinkedIn content system with AI for founders.
More on what we build at LZ Worth is on the homepage.
Stuck on a prompt that almost works? Bring it to a free 30-minute call and we will fix it together.
Talk to DeepanshuFrequently asked questions
What is prompt engineering in simple words?
Prompt engineering is writing instructions for an AI model so it produces the output you want consistently. A good prompt explains the task, the context and reason behind it, gives examples of good output, and specifies the format. It also involves testing prompts on different inputs and improving them over time.
What are the best prompt engineering techniques for beginners?
Start with four habits: give context about your audience and goal, include one to three examples of good output, specify the exact format you want, and split big tasks into smaller steps. These techniques appear in official guidance from OpenAI, Anthropic and Google and work across all major models.
Do the same prompts work in ChatGPT, Claude and Gemini?
Mostly, yes. Clear structure, context and examples transfer well across all three. Details differ, such as Claude responding well to XML tags and Google advising default temperature settings for Gemini 3 models. Run the same prompt on each with identical test inputs and compare the results.
How long should a prompt be?
As long as it needs to be for the model to understand the task, and no longer. A quick rewrite request can be one line. A reusable business template with context, examples and format rules is often 150 to 400 words. Length matters less than clarity and good examples.
Is prompt engineering still relevant with newer AI models?
Yes, but it has changed. Newer models follow instructions better, so tricks like all-caps warnings matter less. What still matters is giving clear context, examples, output formats and tested templates, especially when teams share prompts or when prompts run inside automations without human review.
Can I write prompts in Hindi or Hinglish?
Yes. You can write instructions in English and ask for Hindi or Hinglish output, which is often most reliable. Specify the script (Roman or Devanagari), the rough language mix and include a sample line in the exact style you want, then have a native speaker check the result.
What is few-shot prompting?
Few-shot prompting means including a few examples of input and desired output inside your prompt so the model learns the pattern. Use varied examples so the model picks up the format and style without copying one example too literally. Google and Anthropic both recommend it.
