PMLE · LESSON 6

Section 6: Monitoring AI solutions約13% · 2 topics

Learn AI risks, responsible AI and explainability, and continuous monitoring and evaluation of models.

6.1AI risks, responsible AI and explainability

AI risks (data exfiltration, malicious prompts, sharing confidential information with LLMs; Regex, safety filters, Model Armor), responsible AI (bias monitoring), Explainable AI

Concept

AI risks include data exfiltration, malicious prompts (prompt injection, jailbreaks) and entering confidential information into LLMs. Countermeasures include input and output filters such as regular expressions, safety filters, and Model Armor, which inspects prompts and responses. Responsible AI monitors bias, and Explainable AI (feature attributions: Sampled Shapley, Integrated Gradients, etc.) shows the reasons for predictions.

How it works / steps

  1. List the expected threats (exfiltration, injection)
  2. Inspect inputs and outputs with Model Armor and safety filters
  3. Monitor performance by attribute to check for bias
  4. Show feature contributions with Explainable AI

Workplace example

In a customer-facing chat, Model Armor inspects for prompt injection and confidential information in output, and blocks problematic responses.

Common confusions and exam tips

Mini quiz

Q1. Employees might paste customer data into a generative AI chat. Which countermeasure is best?

  1. Scan LLM output with Model Armor and block harmful content
  2. Detect and mask sensitive data before it goes to the LLM
  3. Write a usage policy and train staff not to enter customer data
  4. Store prompt logs in Cloud Logging and audit later
Show answer and explanation

Answer: B Detect and mask sensitive data before it goes to the LLM

Combine Model Armor and Sensitive Data Protection. [Other options] Log audits are after the fact. Training matters but does not prevent mistakes. Output scanning does not stop sensitive input from being shared.

Q2. You want to show reviewers why each credit decision was made. Which benefit of Explainable AI is most accurate?

  1. It raises accuracy and reduces errors
  2. It shows how much each feature contributed to an individual prediction
  3. It shows causality and guarantees how to change outcomes
  4. It guarantees model fairness automatically
Show answer and explanation

Answer: B It shows how much each feature contributed to an individual prediction

Attributions are a reference for explanation, not proof of causation. [Other options] Attributions indicate contribution, not causality. It does not guarantee fairness or improve accuracy.

Reference links

6.2Model Monitoring and continuous evaluation

Continuous evaluation with Model Monitoring; training-serving skew, data drift, concept drift and feature attribution drift; monitoring, testing and evaluating generative AI

Concept

Model Monitoring watches production inputs and predictions and detects training-serving skew (the difference between training data and production inputs), data drift (changes in production inputs over time) and feature attribution drift. Concept drift is a change in the relationship between inputs and correct answers itself, found by comparing with true labels. For generative AI, measure quality regularly with the evaluation service and keep testing.

How it works / steps

  1. Set baseline data (training data) and thresholds
  2. Monitor skew and drift and set alerts
  3. Collect true labels and check for accuracy drops (concept drift)
  4. Measure generative AI quality regularly on evaluation data

Workplace example

During the pandemic, buying behavior changed: input distributions looked similar, but their relationship to demand changed (concept drift), so the model was retrained on the latest data.

Common confusions and exam tips

Mini quiz

Q1. What is the most appropriate purpose of setting up Model Monitoring?

  1. Automatically relabeling training data
  2. Automatically lowering training loss during training
  3. Automatically changing the endpoint URL periodically
  4. Detecting and notifying about skew and drift
Show answer and explanation

Answer: D Detecting and notifying about skew and drift

Set continuous evaluation metrics and connect alerts to retraining.

Q2. What is most appropriate as a requirement for detecting skew?

  1. Training data as the comparison baseline
  2. Only a list of production endpoint URLs
  3. Only the model developers' names and contacts
  4. Only a list of notebook files
Show answer and explanation

Answer: A Training data as the comparison baseline

Compare the training data distribution with production. Drift compares with past production data.

Reference links

Lessons are written by this site based on public information and do not guarantee exam content. Product specifications change, so check the latest information at the reference links.

Notes (unofficial, original questions, no pass guarantee)