Skip to content
AWS Certified Machine Learning Engineer – Associate (MLA-C02) Exam Prep

Lesson 4 of 8 · 18 min

x
4/8

Domain 2: ML Model and Foundation Model (FM) Development (Part 2 of 2)

This lesson covers 5 exam topics: Overfitting, Catastrophic Forgetting and Ensembles, FM Customization: Prompts and Fine-Tuning, Experiments, Baselines and Shadow Testing, Explainability and Convergence Debugging, Evaluating ML and GenAI Models. Each topic has a short video, then the notes: key facts, exam traps and what to check in the official docs.

1. Overfitting, Catastrophic Forgetting and Ensembles

Video lesson: MLA-C02 16/35: Overfitting, Catastrophic Forgetting and Ensembles

Central question: How do you keep models general, keep fine-tuned FMs capable, and combine models well?

Over- and underfitting (general background)

ProblemSignsFixes
OverfittingTrain ≫ validation scoreMore/augmented data, regularization (L1/L2), dropout, early stopping, simpler model, fewer features
UnderfittingBoth scores lowMore features, bigger model, train longer, less regularization

Catastrophic forgetting (general background)

Fine-tuning on narrow data can make a model lose general abilities it had. Mitigate with: - Parameter-efficient fine-tuning (LoRA/adapters) that leaves base weights frozen. - Mixing general data into the fine-tuning set (rehearsal). - Lower learning rates, fewer epochs; evaluate on general benchmarks as well as the target task.

Ensembles (skill 2.2.6; general background)

MethodHowGoal
Bagging (e.g. random forest)Average many models on bootstrapped dataLower variance
Boosting (XGBoost, LightGBM)Sequential models fix earlier errorsLower bias
StackingA meta-model combines model outputsBest of several
CascadesCheap model first, expensive model for hard casesLower cost

Exam traps

  • Training longer to fix overfitting.
  • Full fine-tuning on a tiny dataset without checking general skills.
  • Ensembles when latency budget is tight, without measuring.

2. FM Customization: Prompts and Fine-Tuning

Video lesson: MLA-C02 17/35: FM Customization: Prompts and Fine-Tuning

Central question: Prompt engineering, RAG, or fine-tuning — and which fine-tuning strategy?

Customization ladder (design guidance; Bedrock facts verified)

  1. Task-specific prompt engineering: instructions, examples (few-shot), output schema. Cheapest.
  2. RAG: current or private facts without training.
  3. Fine-tuning when behaviour, format or style must change consistently.

Fine-tuning strategies (skill 2.1.2)

StrategyDataWhere
Supervised fine-tuningLabelled prompt–response pairsBedrock; SageMaker AI
Reinforcement fine-tuningPrompts + reward functions (e.g. in Lambda)Bedrock
DistillationPrompts; teacher responses train a smaller studentBedrock
Continued pre-trainingUnlabelled domain textSageMaker AI (and older Bedrock docs)
Parameter-efficient (LoRA)Labelled pairs; trains small adaptersSageMaker JumpStart (lora_r, lora_alpha)

Bedrock training is billed by training tokens × epochs, plus storage; serve with provisioned throughput or on-demand custom model deployment (verified).

Exam traps

  • Fine-tuning to inject changing facts. Use RAG.
  • Full fine-tuning when LoRA would do.
  • Skipping prompt engineering before paying for training.

3. Experiments, Baselines and Shadow Testing

Video lesson: MLA-C02 18/35: Experiments, Baselines and Shadow Testing

Central question: Can you reproduce results, spot drift, and test a new model safely on live traffic?

Reproducible experiments

  • Managed MLflow on SageMaker AI: track experiments, compare runs' parameters and metrics, MLflow Model Registry (register to SageMaker and deploy), and tracing of GenAI application steps.
  • Bedrock evaluations for repeatable FM comparisons; Bedrock Prompt Management for versioned prompts.
  • Version data, code, config and random seeds (design guidance).

Baselines and drift detection (skill 2.3.2)

  • Record a baseline: training data statistics and model metrics at launch.
  • Compare production data and predictions to the baseline (statistical distance tests; Clarify for bias drift).
  • SageMaker Model Monitor offered data quality, model quality, bias drift and feature attribution drift monitoring — closed to new customers (verified). New designs build drift pipelines with Processing jobs, Clarify and CloudWatch (design guidance).

Shadow testing (skill 2.3.3; verified)

  • SageMaker AI deploys a shadow variant and routes a copy of live requests to it; responses aren't returned to users.
  • Compare latency, errors and outputs with the production variant before promoting a new model, container or instance type.

Exam traps

  • Promoting a model on offline metrics only when shadow testing could validate it on live traffic.
  • No baseline, so drift can't be measured.
  • Recommending Model Monitor to a new customer without noting its status.

4. Explainability and Convergence Debugging

Video lesson: MLA-C02 19/35: Explainability and Convergence Debugging

Central question: Why did the model predict this, and why won't training converge?

Explaining outputs

  • SageMaker Clarify feature attributions with Shapley values explain individual predictions and global feature importance; reports for reviewers.
  • For FMs: ask for citations (RAG), use agent/flow traces, and evaluate with LLM-as-a-judge explanations (design guidance).

Convergence problems (general background)

SymptomLikely causeFix
Loss explodes / NaNLearning rate too high, bad data, no normalizationLower LR, gradient clipping, normalize, check data
Loss flatLR too low, vanishing gradients, dead unitsRaise LR, better init/activations, batch norm
Loss oscillatesLR too high, batch too smallLower LR, larger batch, LR schedule
Train good, validation badOverfittingRegularize, early stopping

Tools

  • SageMaker Debugger monitored tensors in real time and detected non-converging training — no longer open to new customers.
  • Alternatives: framework logging to CloudWatch, MLflow metrics and charts, profiling, TensorBoard (design guidance).

Exam traps

  • Raising the learning rate when loss already explodes.
  • Recommending Debugger to a new customer without noting its status.
  • Model Cards to explain a single prediction. Use Clarify.

5. Evaluating ML and GenAI Models

Video lesson: MLA-C02 20/35: Evaluating ML and GenAI Models

Central question: Which evaluation method and metric fit the model type?

Traditional ML (general background)

Classification: accuracy, precision, recall, F1, ROC-AUC, PR-AUC, confusion matrix. Regression: MAE, RMSE, R². Use held-out test sets and cross-validation.

GenAI (verified where linked)

MethodUse
Bedrock automatic evaluationsAccuracy, robustness, toxicity on built-in or your datasets
LLM-as-a-judge (Bedrock judge model)Open-ended quality with explanations; custom metrics
Human evaluation (Bedrock human jobs; human-in-the-loop workflows)Nuance, tone, high stakes
NLP metricsBLEU (translation, n-gram precision), ROUGE (summaries, overlap), BERTScore and semantic similarity (meaning)
Bias detectionPaired prompts varying one attribute; Clarify for ML models

RAG monitoring (skill 2.3.10)

  • Bedrock RAG evaluations: retrieval relevance and response quality against ground truth.
  • Track retrieval accuracy (context contains the answer), relevance scores and latency over time.

Exam traps

  • BLEU for summaries. ROUGE fits summaries; BLEU fits translation.
  • Accuracy alone on imbalanced data.
  • Evaluating only generation in a RAG system.

References

  1. MLA-C02 Domain 2 — checked Oct 19, 2026
  2. Early stopping — checked Oct 19, 2026
  3. Bedrock customization — checked Oct 19, 2026
  4. JumpStart fine-tuning — checked Oct 19, 2026
  5. Managed MLflow — checked Oct 19, 2026
  6. Shadow tests — checked Oct 19, 2026
  7. Model Monitor — checked Oct 19, 2026
  8. SageMaker Clarify — checked Oct 19, 2026
  9. SageMaker Debugger — checked Oct 19, 2026
  10. Bedrock evaluations — checked Oct 19, 2026
  11. Evaluation metrics — checked Oct 19, 2026
  12. LLM as a judge — checked Oct 19, 2026

Check your understanding

  • Train 99%, validation 72%?Show answer

    Answer

    Overfitting: regularize, more data, early stopping.
  • Responses must always follow a strict house style?Show answer

    Answer

    Supervised fine-tuning (after trying prompts).
  • Test a new model on real traffic with zero user impact?Show answer

    Answer

    Shadow test.
  • Loss becomes NaN after a few steps?Show answer

    Answer

    Lower the learning rate; check data and normalization.
  • Compare summaries with references?Show answer

    Answer

    ROUGE (or BERTScore for meaning).
Previous

Progress is saved in this browser.

Next Lesson