Generative AI · Beginner level

Beginner level · Module 4 of 8 · 7 guided hours

Prompt Engineering Fundamentals

Writing prompts that work: task, context, audience, format and constraints; role prompts; zero-shot and few-shot examples; and iterating with a prompt log.

Learning objectives

  • Write structured prompts
  • Use roles and examples effectively
  • Improve prompts through documented iteration

Topics

  • prompt structure
  • context and audience
  • format and constraints
  • role prompting
  • zero-shot and few-shot prompting
  • iteration and prompt logs

Lessons

  1. Lesson 1 The Structure of a Good Prompt

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

    taskcontextaudienceformatconstraints

  2. Lesson 2 Roles, Zero-Shot and Few-Shot Prompting

    Learners use role instructions and examples to control tone and style, comparing zero-shot (no examples) with few-shot (a few examples) prompts.

    role promptzero-shotfew-shotstyle examplesconsistency

  3. Lesson 3 Iterating and Keeping a Prompt Log

    Learners improve prompts step by step, keeping a log of prompts, outputs and changes so that good prompts can be reused and results explained.

    iterationone change at a timeprompt logreusable templatesevaluation notes

Practical activity

Develop the project's prompt log and templates: structured prompts for product descriptions and promotions, few-shot examples and four documented iterations.

Expected outcomes

  • Effective prompt writing
  • Reusable, documented prompts

Assessment

Prompt log and templates (70%) and peer review of prompts (30%).

Free taster lesson Prompt Engineering Fundamentals Read a free self-study lesson on this topic in the Free Course Library.

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.