A golden set is a list of cases with known good answers that you run on every change. Before writing one, decide what it is for, because that decides what it can claim:
- A guard set is hand-picked to catch known ways of failing, including hard and adversarial cases. Its pass rate tells you whether anything you care about broke. It does not tell you how often customers see a failure.
- A prevalence sample is drawn at random from real traffic, so its pass rate estimates how often failures happen. It is mostly easy cases, so it catches little.
Thirty cases written by hand are a guard set. Cover the five kinds of question a support bot meets: answerable (the policy answers it), partial (part of it is answerable), unanswerable (about refunds, but not in the policy), out of scope, and adversarial (pushing the bot to say something false).
Your task
- Choose the set's purpose.
- Write 30 cases as JSONL. Each line:
id,category,question,must_match(a regular expression that a correct reply contains) and, where useful,must_not_match. - Run your set. It must pass on the correct RefundBot, so your patterns must accept every correct wording.
On submit your set runs against correct builds and against builds with planted defects. A good set passes the first and catches each of the second.