Skip to content
mentoor

Topic 6 of 6 · 5 min read

Evals across the product lifecycle

Goal: Map each stage of an LLM feature's lifecycle to the kind of eval that guards it and spot the stage left unguarded.

One eval file guards four moments in a feature's life: while you build it, before each merge, when you change the model, and while it runs in production. The cases and graders are shared; what changes is when they run and what you do with the result.

Check yourself · 1 of 3

Which stage of the lifecycle is guarded by sampling real traffic and checking it?

Choose one answer

Why it matters

Many teams run an eval once, at launch, and then stop. LLM features keep changing after launch: someone edits the prompt, a provider retires a model, users start asking things nobody planned for. If only launch is guarded, every later change is a vibe check again.

The four stages

  1. Development. You run the eval by hand while changing a prompt or retrieval step. It is quick, uses your full case set and prints the failures. You are looking for what to fix.
  2. Regression gate in CI. On every change to a prompt, tool definition or retrieval setting, the eval runs automatically and fails the build if the pass rate drops below the agreed level or a protected case fails. A cheaper, smaller subset can run on every commit and the full set before release.
  3. Model-upgrade comparison. Before moving to a new model or provider, run the same cases on both and compare dimension by dimension, including latency and cost. A newer model is not always better on your cases, and an old one may be retired on a date you do not control.
  4. Online monitoring. In production, sample real traffic, grade it with the same checks that work without a reference answer (format, faithfulness to retrieved text, refusals), track failure rates and alert on a rise. Send failures you review into the case set.

The feedback loop is the point: production failures become development cases, which become CI gates.

Before and after

Before:

launch: eval run once, 82 percent
since: 3 prompt edits, 1 model alias change, no reruns

After:

dev:      full set by hand on every prompt edit
CI:       12-case smoke set per commit, full set before release; block under 80 percent
upgrade:  both models on full set, compare quality, latency, cost
online:   5 percent of traffic sampled, format and faithfulness checks, alert on a rise

What goes wrong

  • A gate nobody trusts. If the CI eval is flaky, people bypass it. Use several runs per case, and a pass-rate threshold.
  • No online stage. Pre-launch cases cannot include inputs nobody imagined.
  • Production failures never reaching the set. The same bug returns.
  • Cost surprises. A full eval on every commit can cost real money; use a smaller set per commit.

Examples

A lifecycle plan with a gap

A team has a full eval in development and a CI check on every pull request. They have no sampling of live traffic. After launch, users start sending PDFs the prompt never saw, and nothing alerts. The unguarded stage is online monitoring.

The provider retires a model

The provider announces a model will be retired in 90 days. The team runs the full case set on the replacement, finds format failures on 4 of 30 cases and a higher cost per request, tunes the prompt, reruns, and migrates with the numbers in hand.

Key points

  • The same cases and graders serve development, CI gates, model upgrades and production monitoring.
  • A CI gate should fail on a pass-rate drop or a protected case, not on a single flaky run.
  • Model upgrades and retirements are planned changes; compare old and new on the same cases, including cost and latency.
  • Online monitoring uses checks that need no reference answer, such as format and faithfulness to retrieved text.
  • Failures found in production should be added as cases, closing the loop.

Common mistakes

  • Running the eval once at launch and never again.
  • Putting a flaky, single-run eval in CI until people learn to ignore failures.
  • Switching to a newer model without running the old cases on both.
  • Sampling production only for uptime and never for answer quality.

Check yourself · 2 of 3

A provider announces that your model will be retired. Which eval step best prepares the move?

Choose one answer

Check yourself · 3 of 3

A team runs one eval at launch, then edits the prompt three times. What is the most direct fix?

Choose one answer

Practice items, not counted towards your mastery.

Start here

More for this topic