Offline Evaluations
Comparable runs, trusted diffs
Offline evals are deterministic, repeatable runs of the system against golden data — the backbone of trusted iteration. Designing the run (seed, mocks, versions) makes results comparable across code changes.
What you will learn
- Structure reproducible eval runs
- Mock external systems for determinism
- Interpret deltas between versions
What is this?
Offline evaluation runs your system against a fixed golden set in a controlled environment: fixed model params, seeded sampling, mocked external tools — so score deltas mean the code or prompt changed, not the weather. Locking versions and invoking metrics identically makes every run comparable to every baseline.
Why do you need it?
- Comparable runs turn regressions into binary facts.
- Mocks remove flaky external sources of failure.
- Fixed seeds make sampling-effects visible.
- Library/protocol pinning gives long-run comparability.
Mental model
A lab with controlled conditions
Offline evals
You wouldn't compare two drug batches in different weather with different scales. Labs control temperature, instruments, and protocols. Offline evals control seeds, mocks, and versions — so the only variable left is the change you're testing.
How it works
- Freeze the golden set and eval parameters.
- Mock tools/APIs that change answer fate.
- Pin models, SDKs, and prompts (as code).
- Run, record raw outputs + scores.
- Compare against baselines; emit a structured report.
Controlled run.
In production
- Every prompt/model diff runs the full golden suite in CI.
- A/B of prompt-variant sets compare offline before any traffic.
- Release notes carry the eval delta as evidence.
Best practices
- One harness, one set, one metric config per eval family.
- Store outputs + scores, not just scores.
- Pin everything that influences output.
- Gate merges on deltas to baselines.
Common mistakes
- Comparisons across different seeds (phantom deltas).
- Real-network calls in offline runs (flaky + slow).
- No baseline snapshot — deltas are unreadable.
Common issues
Offline differs from prodMocks diverge from real systems
Periodically compare mock vs real; refresh fixtures.
Results not reproducibleUndeterministic calls
Seed sampling and pin versions end-to-end.
Debugging tips
- Score wobble → check seed/mock/pin drift; rerun clean.
- Delta unexplained → diff the recorded outputs, not just scores.
- Suite times out → mocks missing; replace real calls.
Interview checkpoint
Hands-on lab
- Lock a golden set + seeds
- Run a reproducible eval suite
- Diff results against a baseline
Deterministic Golden-Suite Runner
40 min · advanced
Quick quiz
Seeding makes offline runs…
Real network calls belong in offline eval runs.