AI Prompting · Level 1: Prompting Basics · Lesson 2

The anatomy of a useful prompt

Every high-performing prompt is built from four distinct building blocks: Role, Task, Context, and Output Specifications. In this lesson, you will learn how to assemble these parts to eliminate ambiguity and get reliable answers.

  • About 10 minutes
  • No account needed
  • Beginner level

By the end of this lesson, you can:

  • Identify the 4 core building blocks of a high-performing prompt.
  • Recognize missing structural components in weak instructions.
  • Construct a balanced 4-part prompt for work and personal tasks.

The 4 building blocks of a great prompt

Rather than thinking of a prompt as a single sentence, think of it as a small blueprint. High-performing prompts combine four structural building blocks:

1. Role / Persona

Tells the AI what perspective or expertise to adopt (e.g. "Act as an experienced copywriter" or "Act as a high school physics teacher").

2. Core Task

The primary action you want the AI to perform (e.g. "Draft an email", "Summarize this meeting transcript", or "Explain this formula").

3. Context & Background

The essential facts, source data, target audience, and background details the AI needs to give a relevant answer.

4. Output Specification

The desired structure, length, tone, or format (e.g. "3 bullet points", "Markdown table", or "under 150 words").

Putting the blocks together

Compare how a prompt evolves when you add each building block step by step:

Bare task (No structure)

Task only

Give me meal prep ideas for the week.

Generates generic recipes that may not suit your diet, cooking time, budget, or family size.

Full 4-Part Prompt

All 4 building blocks active

Act as a practical nutritionist [ROLE]. Recommend 5 weekday dinner prep ideas [TASK] for a busy family of four with a £70 weekly budget and a peanut allergy [CONTEXT]. Present the results in a 3-column table showing Meal Name, Cooking Time, and Main Ingredients [OUTPUT].

Removes ambiguity, respects dietary constraints, and produces a table ready to use immediately.

When to use all four blocks

You do not need to write a 4-part prompt when asking simple questions like "What is the capital of Canada?". However, whenever your task involves:

  • Writing professional emails, reports, or customer responses
  • Analyzing complex documents or datasets
  • Creating educational content or study guides
  • Generating code or structured data formats

Using all four building blocks ensures you get a tailored, structured response on the first try without wasting turns on back-and-forth edits.

Illustrative example

Prompt Makeover

A project manager needs a quick summary of a 10-page market research report for an upcoming management meeting. Watch how adding structural building blocks improves the AI response.

Original prompt

Summarize this report for me.

What is missing

  • Role: who should the AI act as?
  • Target audience: who will read this summary?
  • Key focus: which sections or insights matter most?
  • Output format: bullet points, executive summary, or key takeaways?

Improved prompt

Act as a senior market analyst. Summarize the key findings from the market research report below for our executive leadership team.

Focus on competitor growth trends, customer retention risks, and strategic recommendations for Q3. Return 3 bullet points per category, followed by a 2-sentence bottom-line summary. Do not include introductory filler or conversational pleasantries.

Why it is better

  • It assigns a clear role: senior market analyst.
  • It specifies the task and target audience (executive leadership team).
  • It narrows the focus to competitor growth, retention risks, and Q3 recommendations.
  • It defines a rigid format: 3 bullet points per category + 2-sentence summary.

What still needs checking

  • Verify that competitor growth figures match raw report data.
  • Ensure strategic recommendations align with your team's budget and policies.

Practice

Identify the complete 4-part prompt

Compare these two prompts for a customer support template. Choose the option that includes all 4 core building blocks (Role, Task, Context, and Output Specifications).

Illustrative example

A customer service manager wants to generate a polite response template for delayed shipping inquiries during a holiday peak.

Which request includes Role, Task, Context, and Output Specifications?
Check the model answer

Option B includes all 4 core building blocks.

Option B specifies Role (empathetic customer support lead), Task (write an email template), Context (3-5 day delay, holiday demand, 10% discount code), and Output Specifications (Subject Line, 2 short paragraphs, sign-off). Option A lacks role perspective, specific discount context, and structural formatting bounds.

Knowledge check

What happens when you omit the Output Specification block from a complex prompt?
Check the answer

Option B is the correct answer.

Without explicit output specifications (e.g. 'table', '3 bullet points', 'JSON'), AI models default to generic conversational prose. Specifying format controls up front saves editing time.

Keep this

The 4-Part Prompt Framework

Use these four building blocks whenever you need a predictable, high-quality result:

[ROLE]: Act as a [expert/persona].
[TASK]: [Specific action to perform].
[CONTEXT]: [Background facts, audience, key details].
[OUTPUT]: Return [format, length, structure or constraints].

You don't need all 4 blocks for quick everyday questions. Use all 4 when accuracy, tone, and specific structure matter for your work.

Optional browser progress

Your progress

0 of 5 available lessons completed

0 of 5

Progress stores only the course identifier and completed lesson identifiers in this browser. It does not save your answers, prompt text or identity, and it does not sync to another device. Clearing browser data removes it.