liveBook · Manning

Test

As explained in Prompt Engineering in Practice

The systematic evaluation of a component against defined cases and expected results to detect defects or variation.

Prompt testing checks whether a prompt runs as intended and whether edits introduce unwanted behavioral changes. In a production lifecycle, it serves as regression testing: each automated case pairs an input with criteria for a valid output. section 11.3.3

Use two complementary checks:

  • Manually validate basic behavior: confirm the prompt runs, variables resolve, and the output matches the downstream system’s expected format. section 11.3.3
  • Automate cases that specify inputs and validity criteria. Rerun them after each prompt edit to reveal behavioral regressions. section 11.3.3
  • Review version diffs alongside test results to see which edits changed outputs and assess whether those changes are acceptable. section 11.3.3

Probe a policy chatbot’s constraints

Test an HR policy prompt with requests framed as urgent and managerial, as well as roleplay or gradually escalating requests. Check whether precise scope limits and fallback instructions hold under this adversarial pressure. section 10.3.2

A small suite of realistic cases can catch regressions that spot checks miss. This regression practice is distinct from large-scale quality evaluation using structured scoring, model judges, or annotation pipelines. section 11.3.3

How Prompt Engineering in Practice covers it

How deep it goes
Defines manual checks, automated cases, and version-diff review; excludes large-scale structured quality evaluation.
Examples
Checks variable resolution and output format, and probes policy constraints with adversarially framed requests.
What it assumes
Assumes a prompt with inputs and expected output behavior, while beginning with basic execution and format checks.
What you can do after
Diagnose/debug with it by catching execution failures and detecting unintended output changes after prompt edits.
How it connects
Connects prompt management, prompt templates, versioning, and review through repeatable regression checks.

Also explained in

Compare how 53 books explain test →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Prompt Engineering in Practice. The section links point to the parts of the book it draws on.