Prompt engineering is the practice of crafting inputs to AI models to get dramatically better outputs. It sounds technical — but it is really just structured, intentional communication. The same way a clear brief gets better work from a freelancer, a well-written prompt gets better results from an AI.

The gap between a poor prompt and a great one is often the difference between a frustrating AI experience and a genuinely useful one — using the same model.

Why this matters

Most people use AI at about 20% of its potential because they treat it like a search engine — short, vague queries. Learning to prompt well is one of the highest-leverage skills you can develop right now.

The anatomy of a good prompt

Effective prompts typically include some combination of these six elements. You don't need all six every time — but knowing each one and when to use it transforms your results.

Role
Tell the AI who to be. "You are an experienced UX designer reviewing a mobile app." This sets tone, vocabulary, and the lens through which it evaluates your request.
Context
Relevant background the AI needs to give a useful response. Who is the audience? What's the purpose? What constraints apply? The more context you give, the less the AI has to guess.
Task
The specific, clear instruction of what you want done. Be direct. "Write", "Summarise", "Compare", "List", "Explain", "Rewrite" — use action verbs.
Format
How you want the output structured. Bullet points, numbered list, table, paragraph, JSON, a specific word count. Unspecified format means the AI decides — and it often guesses wrong.
Constraints
What to avoid, length limits, tone requirements. "Under 150 words", "no jargon", "avoid recommending competitors", "suitable for a non-technical audience".
Examples
Show the AI what good output looks like. Two or three examples of the style, format, or tone you want is often more effective than describing it in words.

Technique 1 — Be specific, not vague

This is the single most impactful change most people can make. Vague prompts produce vague outputs. Specific prompts produce specific outputs.

Vague vs specific — same topic, very different results

Vague: "Write something about productivity."

Specific: "Write a 200-word introduction for a blog post about why working in focused 90-minute blocks is more effective than long uninterrupted hours. Target audience: remote workers aged 25–40. Tone: conversational and direct. No bullet points."

The specific prompt tells the AI the length, the argument, the audience, the tone, and even what formatting to avoid. Every one of those constraints removes a decision the AI would otherwise make for you — and often get wrong.

Technique 2 — Chain-of-thought prompting

For complex reasoning tasks — maths problems, strategic decisions, multi-step analysis — asking the AI to think step by step before answering dramatically improves quality. Simply adding "think through this step by step before giving your final answer" can transform the output.

Chain-of-thought in action

Without: "Should we expand into the Singapore market?"

With: "We are a B2B SaaS company with ₹20Cr ARR, based in Chennai, selling HR software. Think step by step: first assess the opportunity in Singapore, then our competitive position, then the operational challenges, then give your recommendation with reasoning."

Technique 3 — Few-shot examples

When you want a specific style, format, or pattern, show the AI two or three examples of what you want — then ask it to continue. This is called few-shot prompting and it is often more effective than trying to describe the desired format in words.

Few-shot example

"Convert these customer complaints into polite acknowledgement messages. Follow the same structure as these examples:

Input: 'My order hasn't arrived after 2 weeks.'
Output: 'We're sorry to hear your order hasn't reached you yet. We completely understand your frustration and are looking into this right away.'

Input: 'The product stopped working after one day.'
Output: 'We sincerely apologise that your product isn't working as expected. This isn't the experience we want for you, and we'll make this right.'

Now convert this one: 'Your customer service kept me on hold for 45 minutes.'"

Technique 4 — Assign a role

Giving the AI a specific persona consistently improves the quality and relevance of outputs. The role tells the AI not just what to do but how to think about it.

Role assignment examples

"You are a senior product manager at a fintech startup. Review this feature spec and identify the three biggest risks."

"You are a plain-English legal writer. Rewrite this contract clause so a non-lawyer can understand it."

"You are a sceptical investor. What are the three weakest assumptions in this business plan?"

Technique 5 — Iterate, don't restart

The best AI users treat the first output as a draft and iterate. You don't need to rewrite your prompt from scratch every time. Instead, tell the AI specifically what is wrong and ask it to fix that thing.

Iterating effectively

First prompt → AI produces a good structure but too formal.

Follow-up: "Good structure. Now rewrite this in a more conversational tone — as if you're explaining it to a colleague over coffee. Keep the same structure but make the language warmer and less corporate."

Common mistakes to avoid

Prompting for different tasks

Task type Key prompt elements Tip
Writing / editing Audience, tone, length, format Share the existing draft and ask for specific improvements
Analysis Context, criteria, desired output format Ask for chain-of-thought reasoning before the conclusion
Coding Language, what it should do, any constraints Include error messages verbatim when debugging
Summarisation Desired length, key points to preserve, audience Paste the full text and specify what to focus on
Brainstorming Context, constraints, quantity wanted Ask for 10+ ideas — more ideas = more useful ones
Classification Categories to use, examples of each, output format Few-shot examples for each category dramatically improve accuracy

Key takeaways

  • Good prompts include: role, context, task, format, constraints, and examples
  • Specificity is the single biggest lever — vague in, vague out
  • Chain-of-thought ("think step by step") dramatically improves reasoning tasks
  • Few-shot examples are often more effective than describing the format you want
  • Iterate on outputs — tell the AI exactly what's wrong and ask it to fix that
  • Different task types need different prompt strategies — match your approach to the task