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
- List the expected threats (exfiltration, injection)
- Inspect inputs and outputs with Model Armor and safety filters
- Monitor performance by attribute to check for bias
- 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
- Regex filters alone can't stop sophisticated attacks
- Choose explainability methods by model type (Integrated Gradients is for differentiable models)
- Continue bias monitoring after deployment
Mini quiz
Q1. Employees might paste customer data into a generative AI chat. Which countermeasure is best?
- Scan LLM output with Model Armor and block harmful content
- Detect and mask sensitive data before it goes to the LLM
- Write a usage policy and train staff not to enter customer data
- 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?
- It raises accuracy and reduces errors
- It shows how much each feature contributed to an individual prediction
- It shows causality and guarantees how to change outcomes
- 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
- Set baseline data (training data) and thresholds
- Monitor skew and drift and set alerts
- Collect true labels and check for accuracy drops (concept drift)
- 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
- Skew is a training-vs-serving difference; drift is change over time within serving
- Concept drift is hard to detect from input distributions alone
- Connect monitoring alerts to the retraining pipeline
Mini quiz
Q1. What is the most appropriate purpose of setting up Model Monitoring?
- Automatically relabeling training data
- Automatically lowering training loss during training
- Automatically changing the endpoint URL periodically
- 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?
- Training data as the comparison baseline
- Only a list of production endpoint URLs
- Only the model developers' names and contacts
- 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)
- The questions on this site are original practice questions written by this site based on publicly available skills outlines and exam guides. They are not actual exam questions.
- Google Cloud, Gemini, Vertex AI and Google Workspace are trademarks of Google LLC. This site is not affiliated with or endorsed by Google.
- This content is a study aid and does not guarantee a pass. Exam content, format and prerequisites may change without notice; always check the latest information on the official page before taking the exam.
- Your accuracy on the mock exam cannot be converted to the official (scaled) score and does not predict a pass or fail.
- Progress is saved only in this browser (localStorage) unless you sign in with Google to sync it. You can delete it from the Cookie & storage settings page (Japanese).