Introduction

Great generative systems don’t rely on “looks good.” They ship with tests, telemetry, and rollback. Evaluation for GenAI is different from supervised ML: labels are scarce, outputs are open-ended, and quality drifts with prompts, parameters, and data. This playbook shows how to measure and gate quality using artifacts you can build today—no massive human labeling effort required.


What “Good” Means (Define It Once, Reuse Everywhere)

Before tooling, freeze the target:

Write this as a policy JSON (contract version, validator settings, decoder defaults). Every eval method below reads from the same policy.


Golden Sets (Your Non-Negotiables)

Golden sets are small, fixed test collections (30–200 items per route) built from real, anonymized cases.

Contents

How to use

Why it works: Goldens test behavioral guarantees—the part of quality most likely to regress.


Constraint Pass-Rate (CPR): Your Primary KPI

CPR = % of generations that pass all hard checks on the first attempt.

Typical checks:

Track CPR by route, locale, model version, and template. If CPR drops ≥2–3 points in a canary, auto-pause the rollout.


Self-Consistency & n-Best Selection (Quality Without Labels)

When exact ground truth is fuzzy, generate N variants and select the best:

Metrics to log: n-best win-rate, variance among variants, selector disagreement (good canary signal).


Live Canaries (Reality Check Before Full Traffic)

Push changes to 5–10% of traffic stratified by locale/persona.

Guardrails

Operationalize


Metrics That Matter (Dashboards You’ll Actually Use)

Show by release version and traffic segment. Keep a 7-day moving window and a static “golden” panel.


Failure Taxonomy (Make Bugs Fixable)

Classify failures into a small, actionable set:

Every failed sample carries one of these tags. Owners fix categories, not one-offs.


Test Harness (Thin, But Strict)

A minimal runner that accepts:

Outputs:

Use it locally (devs) and in CI (blocking). Save artifacts for diffing between versions.


Sampling Plans (Get Signal With Small Budgets)

For new features, require N≥50 canary samples passing CPR with stable time-to-valid before widening rollout.


Human QA Where It Pays

Labels are expensive—spend them well:

Keep rubric tiny (5–7 questions). Aim for inter-rater agreement ≥ 0.7; if lower, fix the rubric.


Cost & Latency in the Loop

Quality that’s too slow or costly won’t ship. Track:

Target: reduce time-to-valid each release without sacrificing CPR.


Release Gates (Copy/Paste Policy)

A change may ship only if:

If any breach → auto-rollback, open an issue with failing samples attached.


Worked Example (Composite)

A team upgrades its style frame and decoder policy. In canary:

Decision: hold rollout, refine lexicon (over-tight banned list caused extra repairs), re-canary. After tweak: CPR 92.1%, time-to-valid +12% vs. baseline → green-light.


Anti-Patterns (Don’t Do These)


Conclusion

Evaluation for generative systems is about guarantees over vibes. Small, durable artifacts—golden sets, policy JSON, constraint validators, n-best selectors, and live canaries—turn creativity into governed computation with clear rollbacks. When CPR, time-to-valid, and citation quality are first-class metrics, you can change prompts, models, and templates with confidence—and ship faster, safer, cheaper.