CustomLabs
Evals & observability

How do you know a prompt change made things better and did more than make them different?

Updated First published

5 min read

Markdown

Intent

A fixed set of human-labelled real cases runs in CI on every prompt or model change. Each case has a specific, checkable expected property. A drop below the pass-rate threshold blocks the merge, as a failing unit test would. The team catches a regression before release and avoids a user complaint.

Also known as eval CI gate, frozen regression set, labelled eval suiteAn eval suite is a versioned set of test cases that measures whether outputs are good.

Problem

What problem does this solve?#

A prompt change is a code change with no compiler and no test suite, unless the team builds one. Without a fixed, labelled case set, the author answers "did this help" by re-running the one or two examples they already had in mind. The author picks those examples, often without noticing, because they show the improvement. They do not represent the full input distribution. They also do not challenge the change.

That sample almost always looks like a win, whatever happens elsewhere in the distribution. A missing eval suite does not make prompt changes safe. It hides their risk until a user reports a problem. By then, the change that caused it may no longer be the first thing anyone suspects.

Mechanics

How does it work?#

Build a real eval set of 50-100 representative cases from actual production traffic. Do not invent them. Pair each case with a specific, checkable expected property. The property can be a fact that must appear. It can also be a structure the output must have. This is a real check. A general "sounds good" impression is not.

Run that set in CI as a required check on every prompt or model change, as you would run a unit test suite. A drop in pass rate blocks the merge. The team fixes the regression, or a reviewer accepts the tradeoff on purpose. A change never ships because nobody noticed it.

Version-control the prompts as code. Use the same review process and attach an eval run to every diff. Each change then has an author, a diff, and a before/after score. No one can overwrite a prompt in a config panel without an eval attached.

Shape

What are the moving parts?#

  1. Pull 50-100 real cases from production traffic

    Source cases from actual usage. Invented examples do not count.

  2. Attach a specific, checkable property to each case

    Define a concrete pass/fail condition. A vague quality judgment is too loose.

  3. Run the set automatically in CI on every change

    Trigger the run on every prompt or model change. Nobody has to remember to start it.

  4. Block the merge on a pass-rate regression

    Make the eval a required check, like a failing unit test.

  5. Version prompts in source control

    Give every prompt change the same review process and diff history as application code.

  6. Grow the set from real incidents

    Turn every regression that ships into a new fixture case. The suite then covers more each time.

Fit

When does it fit, and when doesn't it?#

Use it when

  • Prompt or model changes ship on a manual spot-check with no fixed before/after comparison
  • The feature scope is stable enough to define a representative set of 50-100 cases
  • More than one person edits the prompts, so a shared implicit sense of "good" is unreliable
  • A past regression shipped and a user noticed it first

Don't use it when

  • The feature is in early exploration and the shape of correct output changes weekly. The team would rewrite the eval set as often as the prompt. That is churn and adds no safety
  • Traffic is too low to give 50 representative real cases. Write a smaller placeholder set and label it clearly. Plan to expand it. An imagined set is not equivalent
  • Your question is about LLM-as-judgeLLM-as-judge uses another LLM to score a model's outputs against a rubric, at scale. grading. That is a related pattern. Check it for judge-preference bias. It is a different problem from a golden-set gate
Trade-offs

What does it cost?#

Gain

The team catches a regression before merge and sees a specific number. A user complaint is no longer the first signal

Cost

Building and labelling 50-100 real cases with checkable properties takes real work. A quick script cannot do it

Gain

Prompt changes get the same review discipline as application code

Cost

CI run time grows with every eval case. The suite needs an owner to keep it current as the product changes

Gain

A shared, checkable definition of 'good' replaces implicit individual judgment

Cost

A fixed rubric can miss a new failure mode that nobody encoded a case for. A pass does not mean the change is safe in every respect

Gain

The set gains value over time as the team folds real incidents back in as new cases

Cost

A stale set with no new cases stops reflecting current production traffic. Nothing warns you when that happens

Signals

How do you know it's working?#

  • Eval pass rate over time, per feature, tracked as a metric with history
  • CI run time for the eval suite, watched as the case count grows
  • Count of production incidents that later became a new eval case, which closes the loop
  • Share of prompt and model changes merged without a passing eval run. This share should be zero when the gate is enforced
Prevents

What failure modes does this prevent?#

Sources

  1. Stanford CRFM - Holistic Evaluation of Language Models (HELM)

    The benchmark suite our check bank draws its evaluation method from. Retrieved 2026-08-24.

  2. NIST - Generative AI Profile (NIST AI 600-1)

    The generative-AI extension to the framework our eval and security controls reference. Retrieved 2026-08-24.

Not sure this is the right pattern?

A Ship Audit checks which of these patterns your system needs. It ranks them by what is most likely to break first.

Book a Ship Audit →

Source: https://customlabs.io/patterns/golden-set-gate-in-ci/

↑↓ navigate ↵ select esc close