Generative AI · Beginner level

Beginner level · Module 4: Prompt Engineering Fundamentals · Lesson 1 of 3

The Structure of a Good Prompt

Learners build prompts from task, context, audience, format and constraints, and compare results with vague prompts.

In this lesson you will

  • Write prompts with all key parts
  • Compare structured and vague prompts

Key concepts

taskcontextaudienceformatconstraints

The lesson

A good prompt states the task (write three product descriptions), gives context (the business, the product facts), names the audience (young customers in Juba), sets the format (under 40 words each, bullet points) and adds constraints (use only the prices given, no exaggerated claims).

Facts belong in the prompt. If you want correct prices, sizes or opening hours, give them; never let the model guess them.

Compare outputs from a vague and a structured prompt: the structured one is usually more accurate, consistent and easier to edit.

Step by step

  1. Write a vague prompt for a product description.
  2. Rewrite it with the five parts and the product facts.
  3. Generate (or use the offline pack) for both.
  4. List the differences.
Before and after

Rewriting a product-description prompt for a honey producer

The same request as a vague prompt and as a structured one that controls facts, audience and format.

Before

Vague: the model must guess facts, audience and format.

  • 'Write a description of our honey.'
  • No product facts, so the model may invent prices, sizes or health claims
  • No audience or language guidance
  • No length or format, so the output is hard to reuse on SMS or social media
  • No rules about claims the business cannot support

After

Structured: task, facts, audience, format and constraints.

  • Task: 'Write three short product descriptions for social media.'
  • Facts: '500 g jar, 6,000 SSP; 1 kg jar, 11,000 SSP; raw honey from beekeepers near Yambio (fictional business: Green Hills Honey).'
  • Audience and tone: 'Shoppers in Juba; warm, simple English; no slang.'
  • Format: 'Each under 40 words, ending with the WhatsApp order line.'
  • Constraints: 'Use only the facts given. No health or medical claims. Do not mention discounts.'

What changed and why

  1. Giving the facts stops the model from inventing prices, sizes or origins.
  2. Audience, tone and length make the output usable without heavy editing.
  3. Constraints remove claims the business cannot support, such as health benefits.
  4. Every output is still checked against the facts before it is published.

Practice activity

Write structured prompts for three products of the project business.

Expected result: Prompts with all five parts and outputs that use only the given facts.

Check your understanding

  1. Name the five parts of a structured prompt.

    Show answer

    Task, context, audience, format and constraints.

  2. Why put facts in the prompt?

    Show answer

    So the model uses correct information instead of guessing.

Further learning

Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.