Domain 4 · 16% of the exam
Evaluation, Testing & Optimization
Proving a system works: defining metrics, building golden datasets and mixed-method graders, running sound A/B and shadow tests, diagnosing failures, and optimizing token usage, latency and cost.
- 4.1Defining Evaluation MetricsTurn "it should work well" into measurable success criteria across accuracy, latency, cost, safety and security, define them before building, and read results by category rather than by a single average.
- 4.2Evaluation Datasets and Test FrameworksBuild a golden dataset that reflects real traffic and its hard cases, and grade it with the cheapest reliable method for each behaviour: code first, a calibrated model judge where interpretation is needed, and people where stakes or novelty demand it.
- 4.3A/B Testing and Iterative ImprovementProve that a change improves a live system with a properly designed experiment, choose shadow testing when users must not see the new version, and roll out in stages with clear stop rules.
- 4.4Diagnosing System IssuesClassify a production problem before fixing it, telling prompt failures, hallucinations, model mismatches, retrieval failures and orchestration failures apart, and apply the first action that fits the cause.
- 4.5Monitoring with Logging and ObservabilityKeep watching quality, latency and cost after launch, using logs, sampled online evaluation, outcome signals and alerts, and feed what you find back into the evaluation set.
- 4.6Optimizing Tokens, Latency and CostFind where the tokens, time and money actually go, then apply the levers in order of value: trim and cache, right-size the model and thinking, restructure long-running work, and batch what can wait, without giving up the quality bar.