Why architecture matters here
LLM eval architecture matters because model behavior is stochastic and change is constant. Systematic eval catches what user complaints eventually would.
Cost is per-eval LLM calls. Scaled evals can cost thousands per candidate; manage with tiered evaluation.
Reliability of eval itself matters. Judge model biases; golden set staleness; benchmark contamination all affect trust.
The architecture: every layer explained
Walk the diagram top to bottom.
Model version. Candidate — base model, fine-tuned adapter, prompt change.
Benchmark suite. MMLU (broad knowledge), HumanEval (code), GSM8K (math), MT-Bench (dialogue).
Scoring. Task-specific: exact match, code execution, LLM-judge.
LLM-as-judge. Strong model scores outputs against rubric. Faster than human but has biases.
Human eval. Spot check high-stakes cases; ground truth for calibration.
Safety eval. Refusal rate on harmful requests; unsafe generation rate.
Adversarial. Red team, jailbreak suite, prompt injection.
Domain-specific. Golden set of your actual queries with expected behavior.
Regression gates. Block model promotion on regression beyond threshold.
Continuous eval. Live sampling of production; drift detection.
End-to-end evaluation flow
Trace an evaluation. New fine-tuned model candidate. CI kicks off eval suite.
MMLU: 68 vs baseline 70 (regression). HumanEval: 55 vs 58 (regression). GSM8K: 82 vs 80 (improvement).
LLM-judge on 500 domain queries: 4.4/5 vs 4.5 baseline (borderline).
Safety: refusal rate on jailbreak set 98% vs 99% (regression).
Human eval on 50 hard cases: mixed, no clear signal.
Regression gate: multiple metrics regressed. Block promotion. Team investigates.
Root cause: fine-tuning data over-represented one style, hurting general capability. Retrain with better data mix.
Second candidate: all metrics within threshold or improved. Canary at 5%; online eval confirms no regression. Ramp.
Continuous: production sampling shows CSAT rising; model working.