Skip to content
Top 1% Upwork (8 years) 286+ client deployments 2,036+ projects shipped GoHighLevel Certified Partner Featured speaker: GHL Summit 2025 Client Login
← All issues
The Scale Brief · Issue #158

You changed the prompt.
What did you just break?

A prompt tweak is a code change to the least deterministic function in your stack — and most teams ship it after eyeballing two outputs. The golden set is the regression suite that makes AI software safe to change.

You changed the prompt.What did you just break?

Here is how most AI features get "improved." Someone notices the summarizer occasionally rambles. They open the prompt, add "be concise," run it against the two examples they have open, and the outputs look tighter. Ship it.

Three days later, support tickets: the summarizer has started dropping order numbers from confirmation recaps. "Be concise" fixed the case they were looking at and silently broke four they weren't. Nobody connected the tickets to the prompt change, because nothing in the deploy looked like a deploy.

This is the defining failure mode of building on LLMs: every change is global, and your feedback is local. A prompt edit, a model upgrade, a temperature tweak — each one re-rolls behavior across every input your feature will ever see, and you evaluated it on the two you had open.

Traditional software solved this decades ago. The solution is a test suite. Yours is called a golden set.

The pattern

The pattern

A golden set is 25–50 real input cases with per-case assertions, run automatically against every prompt change, model swap, or parameter tweak — exactly like unit tests, except the function under test is stochastic, so you grade rather than assert-equal.

  1. Collect real cases from production. Every input that ever produced a bad output goes in the set — that's your regression corpus. Add representative wins so you notice when a "fix" breaks what already worked. Synthetic-only sets test the inputs you imagined, not the ones you get.
  2. Attach assertions to each case. What must be present (the order number), what must never appear (another customer's data, an invented discount), what shape the output must have (valid JSON, under 120 words).
  3. Gate ships on the pass rate. The new prompt ships when its rate meets or beats the current baseline. "It reads better to me" plus a lower pass rate ships nowhere until the failures are triaged.

The implementation

The implementation

The whole harness is a loop, a validator, and a cheap judge:

const GOLDEN = require('./golden-set.json');
// [{ id, input, checks: { schema, must[], never[], rubric } }]

async function runGoldenSet(promptVersion) {
  const graded = [];
  for (const c of GOLDEN) {
    const out = await feature.run(c.input, { prompt: promptVersion });
    graded.push({
      id: c.id,
      schema: validate(out, c.checks.schema),          // tier 1: code
      musts:  c.checks.must.every(s  => out.includes(s)),
      nevers: c.checks.never.every(s => !out.includes(s)),
      rubric: await judge(out, c.checks.rubric),        // tier 2: cheap model
    });
  }
  const pass = graded.filter(g => g.schema && g.musts && g.nevers && g.rubric);
  return {
    rate: pass.length / GOLDEN.length,
    failures: graded.filter(g => !pass.includes(g)),
  };
}

// Ship rule: newRate >= baselineRate. No exceptions without triage.

Run it in CI if your prompts live in git (they should). Total cost per run: 25–50 calls to your feature plus 25–50 calls to a small judge model — pennies, next to one silent regression reaching customers.

Three tiers of grading

Three tiers of grading

Grade with the cheapest tier that can catch the failure:

When to run it

When to run it

The audit signal

The audit signal

Store every run: { prompt_version, model, case_id, pass, timestamp }. Two queries earn their keep:

The fix list

Every AI feature we ship at AutomateScale carries its golden set from day one: real cases from the client's own leads and conversations, tiered grading, pass-rate gate in the deploy path. The cost is an afternoon. The cost of not having one is finding out about regressions from your customers, one ticket at a time. Want us to build the eval harness around your AI features? Apply for the audit.

The one-line summary

You wouldn't merge a code change with zero tests; a prompt is a code change. Collect 25 real cases, assert what must and must never appear, grade cheap-first, and gate every prompt and model change on the pass rate. Pairs with the router from #147 and the retry-safety layer from #149.

Enjoyed this? One essay like this every Sunday — 12,400+ founders read it.
Subscribe free RSS

Keep reading

Issue #157
Speed to Lead: The 5-Minute Window That Decides Half Your Sales
The decay curve and the instant-response stack.
Issue #149
Your Agent Will Retry. Without Idempotency Keys, It Double-Books.
The retry-safety layer these evals should exercise.
Issue #147
The Cheap-Model Planner: Route, Don't Reason
The same small-model economics, applied to grading.
★★★★★

"Adam was great! He gave me some great actionable advice, I left our consultation with a page full of notes. He is a true expert, highly recommend a consultation with him if you need an experts opinion on sales funnel."

30 minute consultation · 2023 · Upwork verified →
★★★★★

"Adam was great! He gave me some great actionable advice, I left our consultation with a page full of notes. He is a true expert, highly recommend a consultation with him if you need an experts opinion on sales funnel."

30 minute consultation · 2023·Upwork verified → · Upwork ✓
★★★★★

"Adam is very skilled and knowledgable and was a tremendous help in getting us setup and going."

Configure Kajabi to work with our Infusionsfoft / woocommerce to serve up videos · 4.7h·2015·Upwork verified → · Upwork ✓
Run the audit on your AI features

The Scale Audit ships a golden set
with every AI feature we build.

Apply for an audit and we'll build the eval harness around your existing AI features — real cases from your own pipeline, tiered grading, pass-rate gate in your deploy path.

Apply for a free audit All issues