What you will be able to do
- Explain why a deployed model decays and what a Snowflake model version monitor records to detect it
- Query drift and statistical metrics that compare production data with a baseline
- Pick the right performance metric (accuracy, precision, recall, ROC_AUC, RMSE) for a model type and name the columns each one needs
- Read monitor results by segment, recover a suspended monitor, and know where alerts fit
Key concept
Baseline (for drift detection) — A baseline is a snapshot of reference data, usually data like the training data, that is stored inside a model version monitor. The monitor measures drift by comparing production data with this baseline, so a monitor created without one cannot report drift.
1.Why deployed models decay, and what a monitor watches
A model that scored well at training time is not guaranteed to keep scoring well. Snowflake's ML Observability documentation names the usual causes: the inputs change, the assumptions baked in at training go stale, and upstream pipelines break. Traffic also changes over time. This gradual loss of quality is what the exam guide calls model decay. Deciding whether to retrain starts with measuring the deployed model against two references: the data it was trained on, and the outcomes that actually happened.
Snowflake does this measuring with a model version monitor. The monitor works on stored inference data. When you run a registered model, its predictions come back as a DataFrame, and teams usually write them to a Snowflake table even when inference runs outside Snowflake. Each row in the monitoring logs holds an ID, a timestamp, the features, the prediction, and (once known) the ground-truth value. Keeping features and predictions together over time is what makes both questions in the exam guide answerable: has the input data moved away from training, and are the predictions themselves shifting?
A monitor is tied to one model version. It refreshes its logs by querying the source data, and it aggregates them over an aggregation window, currently at least one day. An optional baseline table holds the reference data that drift is measured against. Monitors support regression, binary classification and multi-class classification models, and only single-output models.
CREATE [ OR REPLACE ] MODEL MONITOR [ IF NOT EXISTS ] <monitor_name> WITH
MODEL = <model_name>
VERSION = '<version_name>'
FUNCTION = '<function_name>'
SOURCE = <source_name>
WAREHOUSE = <warehouse_name>
REFRESH_INTERVAL = '<num> { seconds | minutes | hours | days }'
AGGREGATION_WINDOW = '<num> days'
TIMESTAMP_COLUMN = <timestamp_name>
[ BASELINE = <baseline_name> ]
[ ID_COLUMNS = <id_column_name_array> ]
[ PREDICTION_CLASS_COLUMNS = <prediction_class_column_name_array> ]
[ PREDICTION_SCORE_COLUMNS = <prediction_column-name_array> ]
[ ACTUAL_CLASS_COLUMNS = <actual_class_column_name_array> ]
[ ACTUAL_SCORE_COLUMNS = <actual_column_name_array> ]
[ SEGMENT_COLUMNS = <segment_column_name_array> ]
[ CUSTOM_METRIC_COLUMNS = <custom_metric_column_name_array> ]
[ COMMENT = '<string_literal>' ]The column rules matter later. Timestamp columns must be TIMESTAMP_NTZ, and prediction and actual columns must be NUMBER. Each column can appear only once across the monitor's parameters, so the ID column cannot also serve as the prediction column. Invalid values, such as nulls, NaNs, infinities or probability scores outside 0–1, can make the monitor fail and suspend. A monitor reports three families of metrics: drift, performance, and statistical counts such as nulls.
Checkpoint 1 of 8· Check yourself
A team has deployed versions V1 and V2 of the same registered model and wants a model version monitor on each. What do they need?
A model version monitor and a model version are paired one-to-one, so monitoring two versions takes two monitor objects, each created explicitly.
“Each model version can have exactly one monitor, and each monitor can monitor exactly one model version; they cannot be shared.”Source: docs.snowflake.com
Sources1
2.Data drift: comparing production data with the baseline
The exam guide's first drift question is: do the data making predictions look like the training data? In Snowflake, you answer it with the baseline. The baseline table holds a snapshot of data similar to the source, and that snapshot is stored inside the monitor object. Drift metrics compare the distribution of a column in production with the same column in the baseline, one time bucket at a time. Without a baseline, MODEL_MONITOR_DRIFT_METRIC returns an error.
The column you compare does not have to be an input. For a model version monitor, column_name can be a feature column, a prediction column or an actual column. Drift on a feature answers "are the inputs different from training?" Drift on the prediction column answers "has the model's output distribution moved?" That is how the sources address the exam guide's second question about whether the deployed model behaves as it did. The sources do not describe a row-by-row check that identical inputs still produce identical predictions. What they offer is distribution drift on the prediction column, plus the stored log of IDs, features and predictions you can query yourself.
Four drift metric names are valid: JENSEN_SHANNON, DIFFERENCE_OF_MEANS, WASSERSTEIN and POPULATION_STABILITY_INDEX. The reference gives no formulas or alert thresholds for them, so don't rely on memorised cut-offs here. (One example on the observability page passes 'PSI', but the function reference lists POPULATION_STABILITY_INDEX as the valid value.) Requesting a numerical drift metric for a non-numeric feature is listed as an error. The optional arguments are granularity (default 1 DAY), start time (default 60 days ago) and end time (default now).
Checkpoint 2 of 8· Fill the gap
Which function completes this query for 30 days of Jensen-Shannon drift on the prediction column?
SELECT * FROM TABLE( ? (
'MY_MONITOR', 'JENSEN_SHANNON', 'MODEL_PREDICTION', '1 DAY', DATEADD('DAY', -30, CURRENT_DATE()), CURRENT_DATE())
)Jensen-Shannon is a drift metric, so it comes from MODEL_MONITOR_DRIFT_METRIC, which also takes the column name to compare against the baseline.
Source: docs.snowflake.comDrift works alongside a simpler signal. MODEL_MONITOR_STAT_METRIC returns COUNT, COUNT_NULL, MIN, MAX, AVG and SUM for a column. The count metrics work on any column type, while the other four work only on numeric columns. A sudden jump in nulls or a collapse in row count usually points to a broken pipeline, not real-world drift, and the two call for different fixes.
Checkpoint 3 of 8· Exam question
A retail team's demand-forecasting model was trained on 2023 data. Six months after deployment, the monitored `STORE_FOOTFALL` feature has a clearly higher mean and wider spread than in the training table, while the model code and registered version are unchanged. Which term describes this situation?
Correct answer: B — Data drift, because the distribution of an input feature in production has moved away from the distribution seen during training
- A. Overfitting concerns model complexity versus training data and would show at validation time. A shifted production feature distribution is a separate, post-deployment phenomenon.
- B. Data drift is exactly a change in the input feature distribution relative to training, which is what the higher mean and wider spread show. It can degrade accuracy even though the model artifact is untouched.
- C. Nothing in the scenario involves two model versions disagreeing, and the version is unchanged. The observed change is in the incoming feature values.
- D. Label leakage concerns target information contaminating training features and inflates offline scores. It does not describe a feature whose live distribution shifts after deployment.
3.Accuracy, precision and recall: what they measure and what the monitor needs
Drift tells you the data has moved. It does not tell you the model is now wrong. To measure that, you need ground truth. For classifiers, Snowflake's documentation builds the metrics from four counts: true positives (TP, correct predictions of positive instances), true negatives (TN), false positives (FP, incorrect predictions of positive instances) and false negatives (FN).
- Precision = TP / (TP + FP): of everything predicted positive, how much really was positive. - Recall (sensitivity) = TP / (TP + FN): of everything really positive, how much the model caught. - F1 is the harmonic mean of precision and recall. - Accuracy = (TP + TN) / all predictions. The documentation warns this metric can be misleading in unbalanced cases.
Accuracy = (30 + 940) / 1000 = 0.97. Precision = 30 / (30 + 10) = 0.75. Recall = 30 / (30 + 20) = 0.60. Accuracy looks excellent because negatives dominate, but the model misses 40% of actual fraud. This is the unbalanced case the documentation warns about.
In a model monitor, these metrics come from MODEL_MONITOR_PERFORMANCE_METRIC, and the names you can request depend on the model type. Binary classifiers accept CLASSIFICATION_ACCURACY, PRECISION, RECALL, F1_SCORE and ROC_AUC. Multi-class classifiers accept CLASSIFICATION_ACCURACY plus MACRO_AVERAGE_PRECISION, MACRO_AVERAGE_RECALL, MICRO_AVERAGE_PRECISION and MICRO_AVERAGE_RECALL. The sources name the macro and micro variants without defining how each one averages, so learn the names here. The documentation also notes that for binary classification you can use the micro-average metrics much as you would use classification accuracy in multi-class classification.
Every accuracy-family metric needs actual values. Actual columns are optional when you create the monitor, but if you leave them out these metrics are not computed. Leaving the actual column empty also causes errors.
| Metric name(s) | Model type | Required columns |
|---|---|---|
| CLASSIFICATION_ACCURACY | Binary and multi-class | prediction_class + actual_class |
| PRECISION, RECALL, F1_SCORE | Binary | prediction_class + actual_class |
| ROC_AUC | Binary | prediction_score + actual_class |
| MACRO_AVERAGE_PRECISION, MACRO_AVERAGE_RECALL, MICRO_AVERAGE_PRECISION, MICRO_AVERAGE_RECALL | Multi-class | prediction_class + actual_class |
| RMSE, MAE, MAPE | Regression | prediction_score + actual_score |
Checkpoint 4 of 8· Check yourself
A binary churn monitor was created with PREDICTION_CLASS_COLUMNS but no ACTUAL_CLASS_COLUMNS. Drift queries work. What happens when the team requests PRECISION?
Precision needs prediction_class and actual_class. Without an actual column the monitor has no ground truth to score against, even though drift (which only needs a baseline) still works.
“At least one prediction column (class or score) is required; actual columns are optional but needed for accuracy metrics.”Source: docs.snowflake.com
Checkpoint 5 of 8· Exam question
A data scientist monitors a churn model with a Snowflake model monitor. Feature distributions look unchanged, yet the share of correct predictions has steadily fallen since a competitor launched a new pricing plan that changed why customers leave. What is the MOST accurate diagnosis?
Correct answer: D — Concept drift: the relationship between the features and churn has changed, so the model decays even though input distributions are stable
- A. Imbalance in the training set would affect performance from deployment onward. It cannot explain a steady decline that began after the pricing change.
- B. Skew would appear as a feature mismatch from the first day of scoring. Here the decline began gradually after an external market change.
- C. The scenario states that feature distributions are unchanged, so feature-level drift metrics would stay quiet. The cause lies in the changed target relationship.
- D. When the mapping from features to the target changes, performance falls without any shift in input distributions. Only metrics comparing predictions with actual outcomes reveal this decay.
4.Area under the ROC curve: a score-based metric
Here is why AUC is different. A classifier turns a probability into a class by comparing it with a threshold: a sample belongs to a class if its predicted probability exceeds the threshold. Precision, recall and accuracy are each measured at one threshold. Snowflake's classification documentation describes threshold metrics that sweep the threshold from 0 to 1. At each threshold it computes the true positive rate (TPR, the same as recall) and the false positive rate (FPR, the share of actual negatives wrongly predicted positive). These pairs can be used to plot ROC and PR curves. The area under the ROC curve therefore summarises performance across all thresholds, which is why it needs the raw score. A hard class label has already lost the threshold information.
In practice, if your inference table stores only a 0/1 label, ROC_AUC cannot be computed. When you design the source table, keep the probability in a PREDICTION_SCORE_COLUMNS column as well as the class. Remember that probability scores outside 0–1 count as invalid values that can suspend the monitor.
AUC also differs on confidence intervals. The performance function's CI_VALUE column returns a Wilson interval for CLASSIFICATION_ACCURACY, PRECISION, RECALL, F1_SCORE and the micro-average metrics. ROC_AUC is not in that list, so its CI_VALUE is NULL.
Checkpoint 6 of 8· Match them up
Match each quantity to its definition
Tap a term, then the definition that fits it.
TPR and FPR are the two axes swept across thresholds to draw a ROC curve. Precision and accuracy are single-threshold ratios built from the same four counts.
“True positive rate (TPR): The proportion of actual positive instances that the model correctly identifies (equivalent to Recall).”Source: docs.snowflake.com
5.RMSE for regression, then reading and acting on the results
Regression models get a separate set of performance metrics: RMSE, MAE, MAPE and MSE. RMSE, MAE and MAPE all need prediction_score and actual_score, because a regression output is a number, not a class. The sources do not give the RMSE formula. They expand the name (Root Mean Square Error), list its required columns, and say that CI_VALUE for RMSE, MSE and MAE is a Wald interval, where the classification metrics use Wilson. The query pattern matches the other metrics, here with daily buckets over the last 30 days:
SELECT * FROM TABLE(MODEL_MONITOR_PERFORMANCE_METRIC(
'MY_MONITOR', 'RMSE', '1 DAY', DATEADD('DAY', -30, CURRENT_DATE()), CURRENT_DATE())
)Each result row has EVENT_TIMESTAMP, METRIC_VALUE, COUNT_USED and COUNT_UNUSED. Check the counts: a metric computed on few records is weak evidence either way.
An overall average can hide a segment that is failing. If the monitor was created with SEGMENT_COLUMNS, you can pass a JSON extra_args value to get any drift, performance or stat metric for one segment. Segment columns must be string categorical columns, with at most 5 per monitor (a hard limit) and fewer than 25 unique values each (a recommendation). Segment values are case sensitive, special characters are not supported in segment queries, and each call accepts only one column:value pair.
'{"SEGMENTS": [{"column": "<segment_column_name>", "value": "<segment_value>"}]}'You can view results in two places. The Snowsight ML Monitoring dashboard (AI & ML » Models, then a model's Monitors list) plots metrics over time and can compare two version monitors. The metric functions return rows you can feed into Streamlit or another monitoring tool. You can also set up alerts and notifications on monitoring metrics. The sources here point to a separate Alerts and Notifications page and do not describe its mechanics.
A monitor can also stop reporting on its own. After five consecutive refresh failures related to the source tables, it suspends refreshes. DESCRIBE MODEL MONITOR shows aggregation_status (with SUSPENDED values) and aggregation_last_error (the SQL error). After you fix the cause, ALTER MODEL MONITOR … RESUME restarts refreshes. A flat dashboard may mean a suspended monitor, not a healthy model.
Rising drift or falling precision, recall, AUC or RMSE quality is the evidence for retraining. How you schedule and promote a retrained version is covered in the neighbouring lessons, not here.
Checkpoint 7 of 8· Put it in order
A monitor's dashboard has stopped updating. Put the recovery steps in order.
- 1.Issue ALTER MODEL MONITOR … RESUME
- 2.Fix the root cause of the refresh failure in the source data
- 3.The monitor hits five consecutive refresh failures related to its source tables and suspends refreshes
- 4.Run DESCRIBE MODEL MONITOR and read aggregation_status and aggregation_last_error
Suspension is automatic. DESCRIBE shows why it happened, and you resume only after the root cause is fixed.
“After resolving the root cause of the refresh failure, resume the monitor by issuing ALTER MODEL MONITOR … RESUME.”Source: docs.snowflake.com
Checkpoint 8 of 8· Exam question
A team creates a model monitor for a fraud model and supplies a baseline table built from the training set. What does Snowflake use the baseline table for?
Correct answer: A — It provides reference distributions that production rows in the source table are compared against when drift metrics are computed
- A. The optional baseline table exists for comparative operations such as drift. Without it, drift metrics have no reference distribution to compare live data with.
- B. Computed metrics are managed by the monitor itself and read through the monitor functions. The baseline is user-supplied input, not output storage.
- C. Model monitors observe and compute metrics; they never retrain a model. The baseline is a reference dataset, not a retraining queue.
- D. The baseline does not filter the source table. Time windows come from the timestamp column and the aggregation settings.
Exam traps
Each one states something that sounds right. Open it to see what is actually true.
1.A monitor created without a BASELINE can be given one later with ALTER MODEL MONITOR so drift starts working.Why is that wrong?
Drift needs baseline data, and a baseline cannot be added afterwards. You must drop the monitor and create it again with BASELINE set.
Covered in Data drift: comparing production data with the baseline
2.ROC_AUC can be computed from the same prediction_class column used for precision and recall.Why is that wrong?
ROC_AUC reads the predicted score, not the class, so the monitor needs a prediction_score column alongside actual_class.
3.High accuracy on an imbalanced dataset shows the model is performing well.Why is that wrong?
Accuracy counts true negatives, so a dominant negative class can inflate it while recall on the rare class stays poor.
Covered in Accuracy, precision and recall: what they measure and what the monitor needs
4.One segment query can filter on REGION and CHANNEL together by passing two entries in SEGMENTS.Why is that wrong?
Each call accepts only one segment column:value pair, so querying two segments takes two separate calls.
Covered in RMSE for regression, then reading and acting on the results
Sources
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.https://docs.snowflake.com/en/developer-guide/snowflake-ml/model-registry/model-observabilityOfficial docs
“Model behavior can change over time due to input drift, stale training assumptions, and data pipeline issues”
↩︎ Why deployed models decay, and what a monitor watches“The monitoring logs store the inference data and the predictions so that the ML Observability feature can observe changes in predictions over time.”
↩︎ Why deployed models decay, and what a monitor watches“The minimum time granularity at which data is stored (aggregation window), currently 1 day minimum.”
↩︎ Why deployed models decay, and what a monitor watches“Timestamp columns must be of type TIMESTAMP_NTZ; prediction and actual columns must be NUMBER.”
↩︎ Why deployed models decay, and what a monitor watches“A maximum of 5 segment columns per model version monitor (hard limit).”
↩︎ RMSE for regression, then reading and acting on the results“Model monitors automatically suspend refreshes when they encounter five consecutive refresh failures related to the source tables.”
↩︎ RMSE for regression, then reading and acting on the results“You can set up alerts and notifications for your monitoring metrics.”
↩︎ RMSE for regression, then reading and acting on the results“You can use the results from the metric functions to create custom dashboards in Streamlit or other centralized monitoring tools.”
↩︎ RMSE for regression, then reading and acting on the results“Drift calculation requires baseline data; without it, to add baseline data, you must drop the monitor and create it again.”
↩︎ Exam trap 1“Currently, segment queries support only 1 segment column:value pair per query.”
↩︎ Exam trap 4“Each model version can have exactly one monitor, and each monitor can monitor exactly one model version; they cannot be shared.”
↩︎ Checkpoint“Drift calculation requires baseline data; without it, to add baseline data, you must drop the monitor and create it again.”
↩︎ Prediction“At least one prediction column (class or score) is required; actual columns are optional but needed for accuracy metrics.”
↩︎ Checkpoint“After resolving the root cause of the refresh failure, resume the monitor by issuing ALTER MODEL MONITOR … RESUME.”
↩︎ Checkpoint - 2.
“Although this parameter is optional, if it is not set, the monitor cannot detect drift.”
↩︎ Data drift: comparing production data with the baseline“Although this parameter is optional, if it is not set, the monitor cannot detect drift.”
↩︎ Key concept - 3.
“For model version monitors, any string that exists as a feature column, prediction column, or actual column.”
↩︎ Data drift: comparing production data with the baseline“Valid values: 'JENSEN_SHANNON' 'DIFFERENCE_OF_MEANS' 'WASSERSTEIN' 'POPULATION_STABILITY_INDEX'”
↩︎ Data drift: comparing production data with the baseline“Request a numerical drift metric for a non-numeric feature.”
↩︎ Data drift: comparing production data with the baseline - 4.
“'COUNT' and 'COUNT_NULL' are supported for all column types.”
↩︎ Data drift: comparing production data with the baseline - 5.
“Precision: The ratio of true positives to the total predicted positives.”
↩︎ Accuracy, precision and recall: what they measure and what the monitor needs“Recall (Sensitivity): The ratio of true positives to the total actual positives.”
↩︎ Accuracy, precision and recall: what they measure and what the monitor needs“Accuracy: The ratio of correct predictions (both true positives and true negatives) to the total number of predictions”
↩︎ Accuracy, precision and recall: what they measure and what the monitor needs“The sample is classified as belonging to a class if the predicted probability of being in that class exceeds the specified threshold.”
↩︎ Area under the ROC curve: a score-based metric“This can be used to plot ROC and PR curves or do threshold tuning if desired.”
↩︎ Area under the ROC curve: a score-based metric“False positive rate (FPR): The proportion of actual negative instances that were incorrectly predicted as positive.”
↩︎ Area under the ROC curve: a score-based metric“This metric can be misleading in unbalanced cases.”
↩︎ Exam trap 3“True positive rate (TPR): The proportion of actual positive instances that the model correctly identifies (equivalent to Recall).”
↩︎ Checkpoint - 6.
“For binary classification, you can use micro-average precision and recall metrics similarly to how you use classification accuracy in multi-class classification.”
↩︎ Accuracy, precision and recall: what they measure and what the monitor needs“Fail to provide data in the actual_score or actual_class column.”
↩︎ Accuracy, precision and recall: what they measure and what the monitor needs“ROC_AUC: Requires the prediction_score and actual_class columns”
↩︎ Area under the ROC curve: a score-based metric“Valid values if the model monitor is attached to a regression model: 'RMSE' 'MAE' 'MAPE' 'MSE'”
↩︎ RMSE for regression, then reading and acting on the results“RMSE: Requires the prediction_score and actual_score columns”
↩︎ RMSE for regression, then reading and acting on the results“Wald CI for MSE, RMSE, and MAE.”
↩︎ RMSE for regression, then reading and acting on the results“ROC_AUC: Requires the prediction_score and actual_class columns”
↩︎ Exam trap 2