Generative AI · Intermediate level

Intermediate level · Module 2 of 10 · 10 guided hours

Advanced Prompt Engineering

Engineering prompts for applications: system prompts and templates, step-by-step reasoning, decomposition and chaining, self-checking, prompt testing and versioning in code.

Learning objectives

  • Design system prompts and templates for applications
  • Use reasoning, decomposition and self-checking techniques
  • Test and version prompts in code

Topics

  • system vs user prompts
  • prompt templates with variables
  • step-by-step reasoning
  • decomposition and chaining
  • self-checking and critique
  • prompt test suites

Lessons

  1. Lesson 1 System Prompts and Templates

    Learners separate stable system instructions from user input, build parameterised templates and protect templates from user text that tries to override them.

    system promptuser messagetemplate variablesdelimitersprompt injection awareness

  2. Lesson 2 Reasoning, Decomposition and Self-Checking

    Learners improve multi-step tasks with step-by-step instructions, split complex tasks into chained prompts, and add a self-check pass.

    step-by-step promptingdecompositionprompt chainingself-critiqueverification prompts

  3. Lesson 3 Testing and Versioning Prompts

    Learners build a prompt test suite in Python that runs prompts against fixed inputs and checks outputs automatically, and version prompts with Git.

    test casesautomatic checksregressionversioningpractice model for repeatability

Practical activity

Build a template-driven, decomposed content or lesson-material generator with a self-check pass and an automated prompt test suite.

Expected outcomes

  • Application-grade prompt engineering
  • Tested, versioned prompts

Assessment

Generator and test suite (70%) and comparison report (30%).

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.