Monitoring
Professional Machine Learning Engineer · Lesson 19 of 19 · 2:26:38
YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗
Learning with these videos? Subscribe for new courses and exam-style questions.
Subscribe on YouTube (opens in a new tab)In this lesson
Prepare for the Google Cloud Professional Machine Learning Engineer exam, on the official exam guide. In this lesson: Model Monitoring v1 and v2, training-serving skew, data and inference drift, feature attribution drift, concept drift, Jensen-Shannon divergence and L-infinity distance, thresholds and alerts, and monitoring generative AI with evaluations, rubrics, Model Armor findings, and human review. Includes three original practice questions, with Cymbal Insurance, a fictional car and home insurer, as the example.
Study notes
The text of this lesson, to read at your own pace. Information as of November 2026.
Two quiet months
Cymbal Insurance's fraud model worked well for six months. Then its performance slipped, quietly, as fraudsters changed their methods. Nobody noticed for two months, until the losses showed up in the accounts.
Model Monitoring
Agent Platform offers two versions of Model Monitoring. Version two, in preview, ties all monitoring to a model version, while version one, generally available, is set up on endpoints. A model monitor defines what to watch, a baseline dataset, a target dataset, the metrics, and their thresholds. Monitoring jobs run on demand, or on a schedule for continuous monitoring, and a target window that is too small makes the drift results volatile.
Skew and drift
Each problem compares different data. Training serving skew compares serving data with the training data, which is the baseline. Data drift, or inference drift, compares recent serving data with an earlier period, like the same day one week before. Feature attribution drift tracks whether a feature's contribution to the predictions changes, using SHAP values. And concept drift means that the link between the inputs and the true outcome has changed, which shows only when true labels arrive, as a drop in performance metrics.
Metrics and alerts
Model Monitoring measures distances between distributions. Numeric features use the Jensen Shannon divergence, while categorical features can use the L infinity distance or the Jensen Shannon divergence. You set a threshold for each objective, and alerts go by email, or to Cloud Monitoring notification channels. Then the team investigates, retrains through the pipeline trigger from lesson seventeen, or rolls back to an earlier version.
Monitoring generative AI
Generative answers have no single right value to compare, so monitor them with regular evaluations. Sample real prompts and responses, and score them with the Gen AI evaluation service, using adaptive rubrics and a judge model. Run the same evaluation after every model or prompt change, and track the scores over time. And watch Model Armor findings for attack trends, while people review a sample and read user feedback.
Recap
Let's recap. Model Monitoring version two ties monitoring to a model version, and version one runs on endpoints, with jobs on demand or on a schedule. Skew compares serving data with training data, and drift compares serving data over time. Feature attribution drift uses SHAP values, and concept drift shows as falling performance once labels arrive. Jensen Shannon divergence and L infinity distance measure drift, with thresholds and alerts. And generative AI is monitored with regular evaluations, rubrics, Model Armor findings, and human review.
Quick checks for this lesson
The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.
The team wants to know whether this week's fraud requests look like the data the model was trained on. Which objective, and which baseline?
- Drift, with last week's serving data
- Skew, with the training data
- Performance, with true labels
- Skew, with this week's training data
Show the answer
Skew, with the training data
Training serving skew compares serving data with the training data, used as the baseline. “Drift, with last week's serving data” would compare this week with last week, which shows drift, not a gap with training. “Performance, with true labels” would need true labels, and it measures performance, not the input data. And “Skew, with this week's training data” would compare the training data with itself.
The team wants drift alerts on the claim amount, a numeric feature. Which distance metric does Model Monitoring use for it?
- L-infinity distance
- Root mean squared error
- ROUGE
- Jensen-Shannon divergence
Show the answer
Jensen-Shannon divergence
Numeric features use the Jensen Shannon divergence. “L-infinity distance” only applies to categorical features. “Root mean squared error” measures prediction errors, and needs labels. And “ROUGE” compares texts with reference answers, not feature distributions.
Each month, the team wants to check that production claim summaries still follow their instructions, including after model updates. No reference summaries exist. What should it do?
- Evaluate a sample with adaptive rubrics
- Compute ROUGE against references
- Monitor drift on the input features
- Track the endpoint's latency
Show the answer
Evaluate a sample with adaptive rubrics
Evaluating a monthly sample of real prompts and responses with adaptive rubrics checks the instructions, with no references needed. “Compute ROUGE against references” needs reference summaries, which do not exist. “Monitor drift on the input features” measures feature distributions, not whether answers follow instructions. And “Track the endpoint's latency” only measures speed.