Every automated prompt gate rests on a fixed set of cases you trust. A working definition: a versioned collection of test cases where each case captures the input, the context the system will see, and enough information to judge whether the output was good. That framing comes from a practical golden dataset guide, which also notes that many cases should specify expected behavior ("must refuse and explain why", "must cite a source") rather than one canonical answer, because rigid expected strings are often wrong for open-ended tasks.
The single most important design decision is where the cases come from. Invented examples encode your assumptions about users, and real users misspell, ramble, and ask two questions at once. The strongest source is your own production failures: every thumbs-down, abandoned conversation, or escalation to a human is a free, high-value test case. Tag each one with the failure mode so you can slice later. The same guide recommends 50 to 100 well-chosen cases to start, which is far fewer than most teams fear.
Store the set as JSONL so both humans and eval libraries can read it. A minimal schema that works with most tooling:
{"id":"refund-014","intent":"policy_refund","input":"Can I get a refund after 6 months?","context":["Refunds are accepted within 30 days of purchase."],"expected_behavior":"Must say no and cite the 30-day policy","tags":["edge"],"source":"ticket-8821"}
{"id":"refund-002","intent":"policy_refund","input":"What is your refund window?","context":["Refunds are accepted within 30 days of purchase."],"expected_output":"30 days","tags":["easy"],"source":"synthetic"}
Two fields do the heavy lifting. The intent label is what you will slice on, and expected_behavior (or expected_output where a single answer is genuinely correct) is what the scorer checks. DeepEval, for example, models a dataset as a collection of "goldens" that get converted into test cases at evaluation time, then asserts metrics against them inside a normal pytest run: see its dataset documentation.
One warning before you scale the set. Golden datasets age, and a static set drifts away from what users actually do. QA Wolf's critique of golden datasets makes the case for supplementing curated cases with random production samples, because hand-picked data overfits to the picker's assumptions. The practical compromise is a curated gate (stable, fast, deterministic) plus a separate sampled monitor that flags drift but does not block merges.



