Rana Maninder Singh
Lesson 2 of 8AI Prompting

The Anatomy of a Good Prompt

Lesson opener

In one line: The four components every strong prompt has, and how to build one from scratch.

Why it matters: This shows up at work when you need to the four components every strong prompt has, and how to build one from scratch..

Before this lesson: What AI actually is

One structure, four parts. Once you know it, you will see it in every good prompt you ever write.

Before you start


What you will learn

The four components every strong prompt has, and how to build one from scratch.

85 AI terms explained
85 AI terms explained

Why prompts fail

Most bad prompts fail the same way: they make the AI guess. Guess who is asking, guess the situation, guess what "help" means.

The fix is a structure — four parts, every time. It feels mechanical for the first week. Then it becomes how you think.

This is the same discipline as writing a good requirement. After two decades of watching projects fail because someone said "make it better" instead of saying what "better" means — I can tell you the four parts below are not an AI trick. They are how clear requests have always worked.


The four parts — with workplace examples

ROLE — tell AI who to be

Act as a senior Excel analyst reviewing a formula for errors.

Why: gives the AI a perspective and expertise level to respond from.

CONTEXT — tell AI what situation you're in

I have a sales report with 5,000 rows. Column A is customer name,
Column B is order value, Column C is date.

Why: without context, AI guesses. Guesses are generic.

TASK — tell AI exactly what to do

Write a formula that totals Column B for only the orders in the last 30 days.

Why: vague tasks produce vague answers.

FORMAT — tell AI how to present the answer

Give me the formula, then explain each part in plain English,
then show me one example of it working.

Why: controls the output so you get what you can actually use.


Full prompt assembled

Act as a senior Excel analyst.
I have a sales report with 5,000 rows —
Column A: customer name,
Column B: order value,
Column C: date (format DD-MM-YYYY).
Write a formula that totals Column B for only the last 30 days.
Give me the formula, explain each part in plain English,
then show one example.

Compare this to:

Excel formula for last 30 days

The first prompt gets you a working formula with an explanation you can trust. The second gets you a guess about a spreadsheet the AI has never seen.


Quick reference

PartQuestion it answersSkipping it costs you
RoleWho is answering?Expertise level — answers aimed at nobody
ContextWhat is my situation?Relevance — generic advice
TaskWhat exactly do I need?Precision — vague output
FormatHow should the answer look?Usability — walls of text you have to dig through

Practice — no signup needed

Write a prompt using all four parts for a real task you need done this week.

Step 1: Pick a real task — a formula, an email, a report section, a query.

Step 2: Write one line for each part: Role, Context, Task, Format.

Step 3: Assemble them into a single prompt and run it.

Step 4: Score the answer out of 10. If it is below 8, check which of the four parts was thinnest — that is almost always the problem.

Challenge (optional): Remove the Context line and run the prompt again. Watch how much more generic the answer becomes.

Checklist

  • [ ] Can you name the four parts of a strong prompt without looking?
  • [ ] Can you explain what each part contributes to the answer?
  • [ ] Have you written one full four-part prompt for a real work task?
  • [ ] Can you spot which part is missing when a prompt fails?