AI Roadmap · Step 02

Prompt Engineering

← Back to upskilling path

What is prompt engineering?

A prompt is anything you send to an AI model — a question, an instruction, a piece of text to analyse. Prompt engineering is the practice of writing prompts that reliably produce useful output.

Most people interact with AI the way they'd type a search query — short, vague, and hopeful. With a few deliberate techniques, you can get dramatically better results from the same model.

The model isn't limited by what it can do — it's often limited by how clearly you've described what you want.

Before we dive in — which of these will get a better response? Pick one.

Option A
❌ Too vague Help me with my presentation
Option B
✅ Much better You are a presentation coach. I'm giving a 5-minute pitch to senior managers about adopting AI tools in our team. Give me 4 slide titles with a one-sentence description for each. Be punchy and business-focused.
Option B wins. It gives the model a role (presentation coach), context (senior managers, AI tools pitch), a clear task (4 titles + descriptions), a format (one sentence each), and a constraint (punchy and business-focused). Option A gives it nothing to work with — and you'll get something generic in return.

The anatomy of an effective prompt

Good prompts usually contain some combination of these five elements. You don't need all five every time — but knowing them helps you diagnose why a prompt isn't working.

Click any colour-coded part of the prompt below to understand what it contributes — or click a label in the legend.

Role Context Task Format Constraints
You are a senior UX writer. I'm redesigning the onboarding flow for a B2B SaaS app. The current copy feels too technical and users are dropping off at the welcome screen. Rewrite the welcome screen text to feel warm and approachable. Format it as: headline (max 8 words) + subheadline (max 20 words) + CTA button text (max 4 words). Don't use the word "journey". Avoid buzzwords like "seamless" or "powerful".
← Click a highlighted part above to learn what it does

5 techniques that work

1. Be specific about the output format

Vague requests produce vague answers. Tell the model exactly what shape you want the response in — number of items, length per item, structure. Click Improve it to see the difference.

WEAK PROMPT
Give me ideas for my presentation

2. Provide an example (few-shot prompting)

Showing the model an example of what you want is often more effective than describing it. This is called few-shot prompting — and it works especially well for formatting and style tasks.

WEAK PROMPT
Convert these meeting notes into action items: [notes]

3. Use chain-of-thought for complex tasks

For tasks that require reasoning — analysis, decisions, maths — ask the model to think step by step before giving a final answer. This dramatically reduces errors.

Your question
Model reasons
step by step
Model checks
its own logic
Final answer
more accurate
WEAK PROMPT
Should I use PostgreSQL or MongoDB for this project?
💡 Why chain-of-thought works: When a model "thinks out loud," it commits to intermediate reasoning steps before reaching a conclusion — which catches errors that would otherwise slip through if it jumped straight to an answer.

4. Assign a role

Telling the model to adopt a specific role activates the relevant knowledge and tone. Especially useful when you want expert-level depth or a particular communication style.

WEAK PROMPT
Review this documentation

5. Tell it what NOT to do

Constraints are as important as instructions. If you don't set limits, the model fills in the gaps — often not the way you'd want.

WEAK PROMPT
Summarise this article

Spot the mistake

Each prompt below has a problem. Pick what you think is wrong — then see the explanation.

Prompt 1 of 4
Help me with my email
Too vague. What kind of email? To whom? Write it from scratch, improve the tone, or make it shorter? Without context the model will ask for clarification — or guess badly. Add recipient, purpose, tone, and length.
Prompt 2 of 4
I need you to be helpful. Also I was thinking about the report from last week, the one with the Q3 data, you remember? Well, can you maybe summarise it? Only the key points though. Actually the whole thing is fine too.
Ask buried and unclear. The actual request — summarise a report — is buried under filler. The model also can't "remember" anything from a previous session; it has no persistent memory. Start clearly: "Summarise the following Q3 report into 5 key bullet points."
Prompt 3 of 4
Fix the bug in my code
No context provided. The model has no access to your code, IDE, or runtime environment. Paste the code, describe what it's supposed to do, and describe what's actually happening. Without this, any response is a guess.
Prompt 4 of 4
Write a blog post about AI
Missing format, audience and angle. "AI" is a vast topic. Without an audience (developers? executives?), a length (500 words? 2000?), a tone, and a specific angle — the output will be generic and won't fit any real use case.

Build your own prompt

Use the five-element framework to compose a prompt. Fill in whatever's relevant — you don't need all five for every task. Watch the assembled prompt update live as you type.

Your assembled prompt
Start typing above to build your prompt...

Up next

Using AI Tools Daily →

Claude, ChatGPT, Copilot — when to use each and how to get the best results.

Coming soon