Skip to main content

Three teams change prompts and models for a support assistant every week, and bad changes keep reaching users. Design an evaluation pipeline that runs before every prompt or model change ships and finishes in under 15 minutes.

System design · Pro 1

Short answer

Build a versioned test set from real cases and past failures. On every change, CI runs the set and scores with code checks first, then an LLM judge calibrated against human labels. Compare with the current baseline, block on regressions in key slices, and show a diff. Keep a small fast set per change and a larger nightly set.

Deeper answer

Clarify what a good answer means for this assistant and who decides. Then build the test set: a few hundred real questions with expected facts or behaviours, grouped into slices such as refunds, safety refusals and each language. Every production failure becomes a new case.

Pipeline: a change to a prompt, model or retrieval setting opens a pull request. CI runs the candidate on the set, with response caching and parallel calls to stay inside 15 minutes. Scoring is layered: exact and schema checks in code, then an LLM judge with a clear rubric for open-ended answers. Calibrate the judge against human labels and re-check it when the judge model changes. The report compares candidate and baseline per slice and shows changed answers side by side.

Trade-offs: a larger set catches more but is slower and costs more, so run a fast set per change and the full set nightly. Model outputs vary, so use thresholds and repeated runs instead of exact equality. The first thing to break is trust: flaky results make teams ignore the gate. Offline evaluation also does not replace a gradual rollout with online metrics.

What a strong answer covers

Answer it out loud in the mock interview about 2.5 min

Follow-ups to expect

Common mistakes

Learn it

Test sets and evals

Practice System design questions

More on this topic

Today's AI turns are used

Lessons, roadmaps, videos, practice cards and the code playground stay free with your account, with no limit.