Agentic AI · Beginner level

Beginner level · Module 3: Prompt Engineering for AI Agents · Lesson 3 of 3

Testing and Improving Instructions

Learners build a small test set, run it after every change and keep a change log, so that improvements are measured rather than guessed.

In this lesson you will

  • Build and run an instruction test set
  • Version instructions with a change log

Key concepts

test setexpected behaviourregressionversioningchange log

The lesson

A test set is a list of questions with the expected behaviour for each: the correct answer and source, a refusal or a hand-over. Run all of them after every change to the instructions.

A change that fixes one question can break another (a regression). Only the full test set reveals this.

Keep a change log: version, date, what changed, why and the test results. This is the habit that makes agent behaviour manageable as projects grow.

Step by step

  1. Write 20 test questions with expected behaviours.
  2. Run them against versions 1 and 2 and record pass/fail.
  3. Make one improvement and run all 20 again.
  4. Update the change log.

Practice activity

Create the project test set and change log with three recorded runs.

Expected result: A test set, three runs with pass rates and a change log explaining each version.

Check your understanding

  1. What is a regression?

    Show answer

    A change that fixes one case but breaks another that used to work.

  2. Why keep a change log for instructions?

    Show answer

    To know what changed, why, and how it affected test results.

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.