Production agents

Golden datasets for Claude agents

A golden dataset for Claude is a named, versioned set of real cases with invariants, not a folder of happy-path chats. Here is how we build one that CI can fail.

April 27, 2026/2 min read/Claude Certified Engineers

A golden dataset for a Claude agent is a versioned set of real inputs, labeled invariants, and safety tags that CI can score. If the cases only exist in a notebook on someone's laptop, you do not have a dataset. You have folklore.

We treat the set as a product artifact on every Production Agent Build. It lands in the client repository in week one, beside the eval harness, not after the demo.

What belongs in the first eighty cases

Steal from production. Tickets, traces, redacted transcripts, the PDF that always arrives truncated.

BucketCount to startPurpose
Happy paths10Prove the job still completes
Messy inputs10Truncation, mixed language, missing IDs
Adversarial10Injection in documents, "ignore previous instructions"
Cost traps10Huge attachments, retry loops, cache misses
Policy10PII, refusals, human handoff
RegressionsgrowEvery production incident becomes a case

Name cases like invoice-missing-po-v3. case_47 cannot be discussed in standup.

Invariants, not canonical prose

Claude will not match a golden paragraph. Write what must be true:

  • Must cite the invoice number from the tool result.
  • Must not call refund without an approval id.
  • Must refuse to export the full customer table.
  • Tool calls must pass the same JSON Schema the MCP server uses.

Those invariants are what an LLM-as-judge rubric scores. Deterministic checks run first. The judge fills the gaps humans would argue about.

Version it like code

Keep the set in git. A pull request that changes prompts without touching cases is a smell, not a virtue. When an incident happens, add the case in the same change that fixes the agent. That is how the suite stays honest.

If you already have an agent and a folder of screenshots, start with a Claude Readiness Audit. Two weeks is enough to turn folklore into a set CI can fail.

Questions

What is a golden dataset for a Claude agent?
A named, versioned collection of inputs, invariants, and safety labels checked into the repo. It is the thing CI scores. A Slack export of "good answers" is not a dataset.
How large should the first golden set be?
Forty to eighty cases is enough to fail a bad prompt change. Grow it when production surprises you, not to look complete in a slide.
Should we rewrite cases when the product changes?
Add cases. Retire a case in a separate commit if the behavior is no longer required. Do not silently edit gold to make a new prompt look good.

Keep reading

Production agents

LLM-as-judge rubrics you can defend in CI

LLM-as-judge is fine when the rubric is boring, structured, and checked by a human. Here is how we score Claude agents without turning CI into a $12 hobby.

June 22, 2026/2 min read

Claude Code

CI eval gates for Claude Code changes

If Claude Code can edit prompts and tools, CI must be able to fail those edits. Here is how we gate agentic coding the same way we gate application code.

August 17, 2026/2 min read