Regression Test Suite for a Production Prompt
Builds a test suite for a prompt before changing it, catching silent regressions introduced by an innocent-looking improvement or a model swap.
Prompt
Build a regression suite for this prompt before it is changed.
Current prompt: <prompt> [Paste] </prompt>
What it should do: [description] Known past failures: [if any]
Generate 15 test cases:
- 4 baseline cases — typical input, clearly expected output.
- 4 edge cases — empty input, very long input, missing fields, mixed Hebrew-English text.
- 3 failure cases — input that should produce a refusal or a defined error message.
- 2 injection cases — input containing instructions attempting to override the prompt ("ignore previous instructions").
- 2 uncertainty cases — input where the correct answer is "insufficient information".
For each case: { "id": "", "input": "", "assertion": "an automatically runnable check — not 'the answer is good'", "must_not_contain": ["strings whose presence is a failure"], "why": "which regression this case catches" }
Assertion rules:
- Prefer deterministic checks: JSON validity, field presence, value range, substring presence or absence.
- For subjective judgement, write an explicit binary criterion for a judge model.
- Every assertion must fail if the prompt were removed entirely. An assertion that passes without the prompt tests nothing.
Finally: which metric measures overall success and what the acceptance threshold is.
Why this converts well
- Ready to copy and use immediately
- Tailored for legal and public-sector work
- Easy to adapt to internal workflows
Tags
Related Prompts
Tool Specification for a Legal AI Agent
Produces a complete agent tool definition — schema, description, errors, permissions — with emphasis on tools that perform irreversible actions.
Designing a Structured Output Schema for Legal Data
Designs a JSON schema for legal data extraction with explicit representation of uncertainty and missing values instead of silent defaults.
Data Model for a Legal System
Designs a database schema for legal entities with emphasis on versioning, audit trail, and tenant isolation — three things that are very hard to retrofit.