Domain 2 of 4 · Chapter 3 of 3

Evaluate ML and AI system performance

Unlock the complete study guide.

Bundled into the existing AWS Certified Machine Learning Engineer - Associate premium course — no separate purchase.

14-day money-back guarantee — no questions asked.

Included in this chapter:

  • What an evaluation compares against
  • Tools closed to new customers and their replacements
  • Reproducible experiments with managed MLflow
  • Repeatable generative AI experiments
  • Debugging training convergence
  • Classification and regression metrics
  • Held-out validation and k-fold cross-validation
  • Text-similarity metrics for generated text
  • Amazon Bedrock evaluation jobs
  • Safety criteria for generated responses
  • Detecting bias across groups
  • Semantic and adversarial robustness
  • Human evaluation and human-in-the-loop review
  • Evaluating and diagnosing RAG
  • Explaining predictions with SHAP
  • Shadow testing a candidate variant
  • Performance baselines and drift detection

Evaluation families: metric-based (labels, reference text) vs model-based vs human

CriterionMetric-based: labelsMetric-based: reference textModel-based (LLM-as-a-judge)Human evaluation
Output is compared againstGround-truth labels or target valuesA reference answer or reference textCriteria you select, scored by an evaluator modelCriteria and instructions, rated by a work team
Typical metricsPrecision, recall, F1, ROC AUC, MAE, RMSEBLEU, ROUGE, BERTScore, exact matchCorrectness, completeness, faithfulness, harmfulnessRatings of tone, usefulness or preference
Needs ground truthYesYes, as reference textOptional; correctness and completeness use it when suppliedOptional
Blind spotCannot judge free-text qualityLexical metrics penalize valid rewordingThe evaluator model can be biased or wrongSlow, costly and can be inconsistent
AWS mechanism on this pageValidation and test metrics; Bedrock automatic jobs for text classificationBedrock automatic evaluation jobsBedrock judge-based and RAG evaluation jobsBedrock human evaluation jobs
Fits whenEach example has one known class label or numeric targetOutput should closely match a referenceCriteria need judgment at scaleJudgment is subjective or the decision is critical

Decision tree

One known class label ornumeric target per example?Metric-based: labelsprecision, recall, RMSEMust the output closelymatch a reference text?Metric-based:reference textBLEU, ROUGE, BERTScoreSubjective criterion orcritical decision?Human evaluationBedrock human jobsModel-based (LLM-as-a-judge)Bedrock judge jobsPair a lexical score with a judge or human check when rewording is validCritical decision: keep human review as the final gate on any branchYesNoYesNoYesNo

Cheat sheet

  • MLflow connects experiment results with the parameters and artifacts that produced them
  • Managed MLflow separates service-hosted metadata from customer-owned artifact storage
  • A prompt version preserves a tested configuration while the draft continues to change
  • MLflow traces connect an AI response to the components that produced it
  • Bedrock can evaluate saved responses without invoking the generator again
  • Repeating an experiment requires preserving its inputs and execution environment
  • Data-quality monitoring compares observations with baseline statistics and constraints
  • A legitimate model-data update can require a new monitoring baseline
  • Model-quality monitoring requires actual outcomes as well as predictions
  • Feature-attribution drift tracks changes in model reliance on input features
  • A model performance baseline records predictive quality and acceptable metric boundaries
  • Shadow testing copies production requests without returning shadow responses to callers
  • Shadow tests evaluate serving changes as well as model changes
  • Prediction comparisons require retaining shadow outputs rather than discarding them
  • Shadow testing is restricted by endpoint feature compatibility
  • Local and global feature attributions answer different explanation questions
  • Removing one feature at a time can miss importance shared by correlated features
  • Training convergence diagnostics need training metrics and tensors rather than production drift checks
  • NaN or infinite training tensors indicate numerical instability
  • Poor weight initialization can prevent effective learning from the first steps
  • Persistently inactive ReLU units are a distinct training diagnostic
  • Precision is important when false positive predictions are costly
  • Recall is important when missing positive cases is costly
  • F1 summarizes the joint precision and recall tradeoff
  • ROC AUC compares binary ranking performance across thresholds
  • Balanced accuracy reduces the dominance of a majority class in evaluation
  • Log loss evaluates prediction probabilities and penalizes confident mistakes
  • RMSE emphasizes large regression errors more than MAE
  • Macro F1 gives each class equal influence in the final score
  • K-fold validation assesses performance across multiple held-out partitions
  • BLEU evaluates reference overlap through candidate n-gram precision
  • ROUGE measures lexical overlap useful for summary evaluation
  • ROUGE-L compares the longest shared word subsequence
  • BERTScore compares contextual representations rather than only exact words
  • Exact-match evaluation is appropriate only when exact answer equality is meaningful
  • An LLM judge evaluates generated responses against selected criteria
  • Human evaluation can assess subjective output quality with explicit instructions
  • The configured worker count determines how many ratings each prompt receives
  • Human evaluation can compare Bedrock outputs with supplied outputs from another model
  • An evaluation task label does not replace instructions to the model
  • A correct answer can still be incomplete or fail the requested format
  • Safety evaluation separates harmful content, stereotyping, and refusal behavior
  • Semantic robustness tests stability under meaning-preserving input changes
  • An evaluation score must be interpreted alongside missing model responses
  • Human-in-the-loop evaluation connects flagged outputs to review and corrective feedback
  • Bias detection requires comparing model behavior across relevant groups
  • Adversarial robustness evaluation tests deliberate attempts to mislead a model
  • Retrieve-only evaluation isolates retrieval quality from answer generation
  • Relevant retrieved passages may still omit information needed for the answer
  • Faithfulness checks whether generated claims are supported by retrieved evidence
  • Correct citations and complete citation support are separate quality requirements
  • RAG diagnosis needs the query, retrieved context, and generated answer together
  • A grounding judge must evaluate against the supplied evidence rather than the generator's prior conversation

Unlock with Premium — includes all practice exams and the complete study guide.

Also tested in

References

  1. https://docs.aws.amazon.com/aws-certification/latest/machine-learning-engineer-associate-02/machine-learning-engineer-associate-02-domain2.html
  2. https://docs.aws.amazon.com/aws-certification/latest/machine-learning-engineer-associate-02/machine-learning-engineer-associate-02-domain4.html
  3. https://docs.aws.amazon.com/prescriptive-guidance/latest/gen-ai-lifecycle-operational-excellence/dev-experimenting-quality.html
  4. https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor-availability-change.html
  5. https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-availability-change.html
  6. https://docs.aws.amazon.com/sagemaker/latest/dg/debugger-availability-change.html
  7. https://docs.aws.amazon.com/sagemaker/latest/dg/mlflow.html
  8. https://docs.aws.amazon.com/ko_kr/whitepapers/latest/ml-best-practices-healthcare-life-sciences/reproducibility.html
  9. https://docs.aws.amazon.com/sagemaker/latest/dg/mlflow-app-setup.html
  10. https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-deploy.html
  11. https://docs.aws.amazon.com/bedrock/latest/userguide/evaluation-judge.html
  12. https://docs.aws.amazon.com/machine-learning/latest/dg/learning-algorithm.html
  13. https://docs.aws.amazon.com/sagemaker/latest/dg/ll_hyperparameters.html
  14. https://docs.aws.amazon.com/sagemaker/latest/dg/debugger-built-in-rules.html
  15. https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-metrics-validation.html
  16. https://docs.aws.amazon.com/machine-learning/latest/dg/binary-model-insights.html
  17. https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-accuracy-evaluation.html
  18. https://docs.aws.amazon.com/bedrock/latest/userguide/model-evaluation-report-programmatic.html
  19. https://docs.aws.amazon.com/bedrock/latest/userguide/evaluation.html
  20. https://docs.aws.amazon.com/bedrock/latest/userguide/model-evaluation-metrics.html
  21. https://docs.aws.amazon.com/decision-guides/latest/decision-guides/genai-guide.html
  22. https://docs.aws.amazon.com/bedrock/latest/userguide/model-evaluation-jobs-management-create-human.html
  23. https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-evaluation-metrics.html
  24. https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-evaluation-prompt-retrieve-generate.html
  25. https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-shapley-values.html
  26. https://docs.aws.amazon.com/sagemaker/latest/dg/model-validation.html
  27. https://docs.aws.amazon.com/sagemaker/latest/dg/shadow-tests.html
  28. https://docs.aws.amazon.com/sagemaker/latest/dg/shadow-tests-create.html
  29. https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor-model-quality.html
  30. https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor-create-baseline.html
  31. https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-model-monitor-feature-attribution-drift.html