An ML engineer is designing an AI-powered traffic management system to adjust traffic lights during predicted congestion. The system must use near real-time inference to generate predictions to help prevent traffic collisions. The system must use a batch processing pipeline to perform historical analysis of the predictions to continuously refine and improve the model. The historical analysis will take several hours to evaluate how well the predictions correlate with actual outcomes. The system must be able to scale inference endpoints appropriately to meet demand.
Which combination of solutions will meet these requirements? (Choose two.)
A. Use Amazon SageMaker real-time inference endpoints. Configure the endpoints to scale automatically based on a target tracking scaling policy that uses the metric ConcurrentInvocationsPerinstance.
B. Configure reserved concurrency for AWS Lambda functions to process streaming data. Use Lambda SnapStart to connect the Lambda functions to Amazon SageMaker real-time endpoints to support near real-time traffic predictions.
C. Configure an Amazon SageMaker Processing job for batch analysis of historical prediction data. Use Amazon EventBridge to schedule the job to run daily. Allow several hours for in-depth analysis to refine and improve the traffic management model.
D. Use an Amazon EC2 Auto Scaling group to host containers to support the batch analysis of historical prediction data. Configure scaling based on Amazon CloudWatch metrics to analyze historical traffic patterns and model performance over multiple hours.
E. Use an AWS Lambda function to perform the historical analysis. Use Amazon EventBridge to invoke the Lambda function.
Show Answer
Correct Answer: A, C
Explanation: Near real-time inference with automatic scaling is best handled by Amazon SageMaker real-time inference endpoints with target tracking auto scaling using the ConcurrentInvocationsPerInstance metric. Historical analysis that runs for several hours is an appropriate use case for an Amazon SageMaker Processing job scheduled by Amazon EventBridge, providing a batch processing pipeline for model evaluation and refinement.
Question 12
A company is developing an ML model to forecast future values based on time series data. The dataset includes historical measurements collected at regular intervals and categorical features. The model needs to predict future values based on past patterns and trends.
Which algorithm and hyperparameters should the company use to develop the model?
A. Use the Amazon SageMaker AI XGBoost algorithm. Set the scale_pos_weight hyperparameter to adjust for class imbalance.
B. Use k-means clustering with k to specify the number of clusters.
C. Use the Amazon SageMaker AI DeepAR algorithm with matching context_length and prediction_length hyperparameters.
D. Use the Amazon SageMaker AI Random Cut Forest (RCF) algorithm with contamination to set the expected proportion of anomalies.
Show Answer
Correct Answer: C
Explanation: DeepAR is purpose-built for probabilistic time series forecasting using historical observations and can incorporate categorical features. The context_length controls how much historical data the model uses as input, and prediction_length specifies the forecast horizon. XGBoost with scale_pos_weight is for imbalanced classification, k-means is for clustering, and Random Cut Forest is for anomaly detection.
Question 13
A company is developing ML models by using PyTorch and TensorFlow estimators with Amazon SageMaker AI. An ML engineer configures the SageMaker AI estimator and now needs to initiate a training job that uses a training dataset.
Which SageMaker AI SDK method can initiate the training job?
A. fit method
B. create_model method
C. deploy method
D. predict method
Show Answer
Correct Answer: A
Explanation: In the SageMaker Python SDK, the estimator.fit() method starts a training job using the specified training data. create_model() creates a model object from trained artifacts, deploy() deploys a model to an endpoint, and predict() performs inference using a predictor.
Question 14
A company is developing an application that reads animal descriptions from user prompts and generates images based on the information from the prompts. The application reads a message from an Amazon Simple Queue Service (Amazon SQS) queue. Then the application uses Amazon Titan Image Generator on Amazon Bedrock to generate an image based on the information in the message. Finally, the application removes the message from SQS queue.
Which IAM permissions should the company assign to the application’s IAM role? (Choose two.)
A. Allow the bedrock:InvokeModel action for the Amazon Titan Image Generator resource.
B. Allow the bedrock:Get* action for the Amazon Titan Image Generator resource.
C. Allow the sqs:ReceiveMessage action and the sqs:DeleteMessage action for the SQS queue resource.
D. Allow the sqs:GetQueueAttributes action and the sqs:DeleteMessage action for the SQS queue resource.
E. Allow the sagemaker:PutRecord* action for the Amazon Titan Image Generator resource.
Show Answer
Correct Answer: A, C
Explanation: The application must invoke the Amazon Titan Image Generator model through Amazon Bedrock, which requires the bedrock:InvokeModel permission. It also needs to receive messages from the Amazon SQS queue and delete them after successful processing, requiring sqs:ReceiveMessage and sqs:DeleteMessage permissions. The other options either grant unnecessary read-only Bedrock permissions, insufficient SQS permissions, or unrelated SageMaker permissions.
Question 15
A company develops a recommendation model and hosts the model on an Amazon SageMaker AI endpoint. The model uses the SageMaker AI endpoint to perform near real-time inference to deliver personalized product recommendations to customers based on browsing history, purchase records, and in-app user interactions.
After a major marketing campaign, the company observes a sharp drop in the model’s performance. The company needs a solution to proactively monitor, detect, and validate model performance before future marketing campaigns.
Which solution will meet these requirements?
A. Use SageMaker Clarify to analyze changes in feature distribution. Configure SageMaker Model Monitor for near real-time input validation.
B. Use Amazon CloudWatch dashboards to monitor endpoint metrics. Use SageMaker Model Monitor to track feature attribution.
C. Use SageMaker Clarify for bias detection. Set up Amazon CloudWatch alarms to monitor model latency.
D. Use SageMaker Model Monitor to monitor constraints. Use Amazon CloudWatch Logs Insights to analyze error patterns.
Show Answer
Correct Answer: A
Explanation: The issue described is likely model performance degradation caused by data drift after a marketing campaign. SageMaker Clarify can analyze feature distribution changes and explainability-related characteristics, while SageMaker Model Monitor can perform near real-time data quality monitoring and input validation against baselines to detect drift before it impacts model performance. The other options focus primarily on infrastructure metrics, bias, latency, or log analysis rather than proactive validation of model inputs and data drift.
Sources:
https://docs.aws.amazon.com/sagemaker/latest/dg/inference-recommender.html
Question 16
A company is creating an ML model to identify defects in a product. The company has gathered a dataset and has stored the dataset in TIFF format in Amazon S3. The dataset contains 200 images in which the most common defects are visible. The dataset also contains 1,800 images in which there is no defect visible.
An ML engineer trains the model and notices poor performance in some classes. The ML engineer identifies a class imbalance problem in the dataset.
What should the ML engineer do to solves this problem?
A. Use a few hundred images and Amazon Rekognition Custom Labels to train a new model.
B. Undersample the 200 images in which the most common defects are visible.
C. Oversample the 200 images in which the most common defects are visible.
D. Use all 2,000 images and Amazon Rekognition Custom Labels to train a new model.
Show Answer
Correct Answer: C
Explanation: The dataset is highly imbalanced, with only 200 defect images versus 1,800 non-defect images. A standard way to address class imbalance is to oversample the minority class so the model sees defect examples more frequently during training. Undersampling the defect class would worsen the imbalance, and using Amazon Rekognition Custom Labels does not by itself solve the imbalance problem.
Question 17
An ML engineer is building an ML model in Amazon SageMaker AI. The ML engineer needs to load historical data directly from Amazon S3, Amazon Athena, and Snowflake into SageMaker AI.
Which solution will meet this requirement?
A. Use AWS Glue DataBrew to import the data into SageMaker AI.
B. Build a pipeline in SageMaker Pipelines to process the data. Use AWS DataSync to load the processed data into SageMaker AI.
C. Create a feature store in SageMaker Feature Store. Use an Apache Spark connector to Feature Store to access the data.
D. Use SageMaker Data Wrangler to query and import the data.
Show Answer
Correct Answer: D
Explanation: SageMaker Data Wrangler provides built-in connectors to import and prepare data directly from Amazon S3, Amazon Athena, and Snowflake for use in SageMaker. The other options do not directly satisfy the requirement of loading data from all of these sources into SageMaker for model development.
Question 18
A company is using Amazon SageMaker AI to create a classification model to categorize the company’s sales performance for each month of the previous 20 years on a scale from 1 to 5. The dataset includes fields for month, sales region, regional aggregate sales, and the number of stores in each sales region. The company notices that during two months of every year, the aggregate sales values are unexpectedly high. The company performs one-hot encoding on all non-numerical features in the training and validation datasets. The company uses the training dataset to train the classification model. When the company evaluates the model against the validation dataset, the results are less accurate than expected.
The company must improve the model’s accuracy on the validation dataset.
Which solution will meet this requirement?
A. Remove records that include outliers across all features.
B. Use a stratified split on the month and sales region features.
C. Perform normalization on the aggregate sales feature.
D. Perform normalization on the aggregate sales feature for each sales region.
Show Answer
Correct Answer: D
Explanation: The aggregate sales feature is on different scales across sales regions because regions have different numbers of stores. Global normalization does not remove these region-specific scale differences. Normalizing aggregate sales within each sales region preserves seasonal patterns while making values comparable across regions, improving the model's ability to generalize to the validation set. Removing outliers would discard valid seasonal peaks, and stratified splitting does not address the feature scaling issue.
Question 19
An ML engineer needs to develop an AI assistant by using Retrieval Augmented Generation (RAG) in Amazon Bedrock. The company stores a collection of PDF text files in an Amazon S3 bucket. The ML engineer must create an Amazon Bedrock knowledge base to process the PDF files and to store the processed files in a vector store.
Which solution will meet these requirements?
A. Use the latest version of Amazon Titan Text Premier to perform document embedding.
B. Use the latest version of Mistral 7B Instruct to perform instruction tuning.
C. Use the latest version of Anthropic Claude Sonnet to perform instruction tuning.
D. Use Cohere Embed Multilingual to perform document embedding.
Show Answer
Correct Answer: D
Explanation: Amazon Bedrock Knowledge Bases require an embedding model to convert document chunks into vector embeddings for storage in a vector store. Instruction-tuned or text generation models are not used for document embedding. Cohere Embed Multilingual is an embedding model supported for this purpose, whereas the Mistral and Claude options are instruction-tuned LLMs, and Titan Text Premier is a text generation model rather than an embedding model.
Question 20
An ML engineer is tuning an image classification model that shows poor performance on one of two available classes during prediction. Analysis reveals that the images whose class the model performed poorly on represent an extremely small fraction of the whole training dataset.
The ML engineer must improve the model’s performance.
Which solution will meet this requirement?
A. Optimize for accuracy. Use image augmentation on the less common images to generate new samples.
B. Optimize for F1 score. Use image augmentation on the less common images to generate new samples.
C. Optimize for accuracy. Use Synthetic Minority Oversampling Technique (SMOTE) on the less common images to generate new samples.
D. Optimize for F1 score. Use Synthetic Minority Oversampling Technique (SMOTE) on the less common images to generate new samples.
Show Answer
Correct Answer: B
Explanation: The issue is class imbalance in an image classification task. Accuracy is a poor optimization metric because it can remain high while the minority class is predicted poorly. The F1 score better balances precision and recall for the underrepresented class. For image data, image augmentation is the appropriate way to create additional training examples; SMOTE is primarily designed for tabular feature spaces and is generally not appropriate for generating synthetic images.
$19
Get all 235 questions with detailed answers and explanations
Instant download HTML + PDF delivered the moment payment clears.
Secure Stripe checkout we never see or store your card details.
7-day refund if files are defective see our refund policy.