Curated

ML Model and Foundation Model (FM) Development (2.1–2.3)

0 votes

Questions72

  1. Question 1

    ML Model and Foundation Model (FM) Development

    A recommendation model uses extremely sparse user, item, and context features. It must learn pairwise feature interactions through low-dimensional latent factors without explicitly generating feature crosses. Which SageMaker AI built-in algorithm best fits?

    Show the answer

    Correct answerD. Factorization Machines

    AWhy not this: Linear Learner does not learn pairwise feature interactions unless interaction features are explicitly supplied.

    BWhy not this: K-nearest neighbors predicts from nearby examples rather than learning latent-factor feature interactions.

    CWhy not this: XGBoost learns tree-based interactions, not the required low-dimensional latent-factor representation.

    DWhy this is right: Factorization Machines efficiently learn pairwise interactions through latent factors in sparse feature spaces.

    Factorization Machines model pairwise feature interactions using low-dimensional latent factors, making them suitable for sparse recommendation data. XGBoost can learn interactions through trees, but it does not represent them as latent-factor products.

    Open this question
  2. Question 2

    ML Model and Foundation Model (FM) Development

    Which SageMaker AI built-in algorithm groups unlabeled records into a specified number of clusters based on feature similarity?

    Show the answer

    Correct answerB. K-means

    AWhy not this: Principal Component Analysis projects features into a lower-dimensional space rather than creating clusters.

    BWhy this is right: K-means assigns records to clusters based on their distance from cluster centers.

    CWhy not this: Random Cut Forest assigns anomaly scores rather than partitioning records into a requested number of clusters.

    DWhy not this: Linear Learner trains supervised classification or regression models using labeled examples.

    K-means partitions unlabeled records into a specified number of similarity-based clusters. Principal Component Analysis reduces feature dimensionality rather than assigning records to clusters.

    Open this question
  3. Question 3

    ML Model and Foundation Model (FM) Development

    An engineer has numerical equipment measurements but no labeled failures. Which SageMaker AI built-in algorithm should the engineer use to assign each measurement record an anomaly score?

    Show the answer

    Correct answerA. Random Cut Forest

    AWhy this is right: Random Cut Forest produces anomaly scores from unlabeled numerical data.

    BWhy not this: XGBoost typically learns supervised prediction tasks from labeled examples rather than directly scoring unlabeled anomalies.

    CWhy not this: The built-in K-nearest neighbors algorithm requires labels for classification or regression.

    DWhy not this: Linear Learner requires target labels for its classification or regression tasks.

    Random Cut Forest detects unusual records without requiring labeled anomalies and produces anomaly scores. The SageMaker AI K-nearest neighbors algorithm performs supervised classification or regression, so it requires labeled training data.

    Open this question
  4. Question 4

    ML Model and Foundation Model (FM) Development

    An engineer has a PyTorch training script and local helper modules that use only libraries already included in a supported SageMaker AI PyTorch container. How should the engineer run them with the least container maintenance?

    Show the answer

    Correct answerA. Set entry_point to the script and source_dir to its code directory in a PyTorch estimator.

    AWhy this is right: The PyTorch estimator packages the entry-point script and supporting source directory for execution in its framework container.

    BWhy not this: A custom image can work, but maintaining it is unnecessary when the supported framework container meets the requirements.

    CWhy not this: A training data channel supplies input data; it does not replace the script-mode entry-point configuration.

    DWhy not this: Hyperparameters pass configuration values to the script; they do not package helper module files.

    Script mode uses entry_point for the training script and source_dir to package supporting code with it in a managed framework container. A custom image can run the code but adds unnecessary container maintenance when the supported image already has the dependencies.

    Open this question
  5. Question 5

    ML Model and Foundation Model (FM) Development

    Which Amazon Bedrock model capability should a company select to convert product descriptions into vectors for semantic similarity search?

    Show the answer

    Correct answerD. Text embeddings

    AWhy not this: Image generation produces images rather than numerical representations of product descriptions.

    BWhy not this: Document reranking scores or reorders candidate documents rather than creating the vectors used for semantic indexing.

    CWhy not this: Text generation produces language responses rather than the embedding vectors needed for a similarity index.

    DWhy this is right: Text embeddings represent descriptions as vectors that support semantic similarity comparisons.

    Text embedding models encode descriptions as numerical vectors whose similarity can reflect meaning. Reranking models reorder retrieved candidates by relevance rather than producing the vectors used to index descriptions.

    Open this question
  6. Question 6

    ML Model and Foundation Model (FM) Development

    A provider must customize one pre-trained FM for many customers using each customer's labeled examples, while keeping the shared base weights unchanged. Training memory and stored customization artifacts must be much smaller than those required for a separate full model per customer. Which strategy best fits?

    Show the answer

    Correct answerC. LoRA fine-tuning with customer-specific adapter weights

    AWhy not this: Full fine-tuning updates base weights and requires storing a full customized checkpoint for each customer.

    BWhy not this: Conventional continued pre-training updates model weights and does not satisfy the frozen-base or small-artifact requirements.

    CWhy this is right: LoRA freezes base weights and trains compact adapters that can be stored separately for each customer.

    DWhy not this: A retrieval index supplies context but does not fine-tune the FM using each customer's labeled examples.

    LoRA trains small low-rank adapter matrices while freezing the base model, reducing training memory and per-customer artifact size. RAG can supply customer-specific information but does not learn response behavior from labeled examples.

    Open this question
  7. Question 7

    ML Model and Foundation Model (FM) Development

    A company has 20,000 curated customer requests paired with ideal responses in its required tone and output structure. Which approach should it use to adapt a pre-trained FM to reproduce that response behavior?

    Show the answer

    Correct answerD. Supervised fine-tuning on the request-response pairs

    AWhy not this: Retrieving manuals supplies factual context rather than training the model on the demonstrated response behavior.

    BWhy not this: Unpaired documents support domain adaptation but do not directly demonstrate the required response behavior.

    CWhy not this: Generic teacher responses do not capture the company's curated target behavior; no model-compression requirement is stated.

    DWhy this is right: The curated requests and target responses provide supervised examples of the desired tone and structure.

    Supervised fine-tuning learns desired response behavior from paired inputs and target outputs. Continued pre-training learns from unpaired domain text but does not directly teach the required request-to-response mapping.

    Open this question
  8. Question 8

    ML Model and Foundation Model (FM) Development

    A company evaluates Amazon Bedrock FMs for requests containing 60,000 input tokens and requiring up to 4,000 output tokens; requests cannot be split or truncated. Using representative workload measurements, it requires at least 92% accuracy and p95 end-to-end latency of at most 5 seconds, then minimizes cost per request. Which candidate should it select?

    Show the answer

    Correct answerA. Model A: 64K context, 8K maximum output, 94% accuracy, 4.8 seconds, $0.04/request

    AWhy this is right: Its context and output limits accommodate the request, and it meets both performance thresholds at the lowest eligible cost.

    BWhy not this: Its measured p95 latency exceeds the 5-second limit, despite its higher accuracy.

    CWhy not this: It meets all requirements but costs more per request than another eligible candidate.

    DWhy not this: Its maximum output length is below the required 4,000 tokens, despite its sufficient context window.

    Model A accommodates the combined input and output, meets the accuracy and latency thresholds, and costs less than the other eligible candidate. Model B is cheaper but cannot generate the required output length.

    Open this question
  9. Question 9

    ML Model and Foundation Model (FM) Development

    A SageMaker AI fraud classifier receives verified labels seven days after inference, and legitimate seasonal changes frequently trigger feature-distribution alerts. The team needs alerts for declining recall against an approved labeled baseline without treating seasonal input shifts as proof of degradation; which design is BEST?

    Show the answer

    Correct answerC. Capture inference IDs, join matured labels to predictions, and monitor recall against model-quality baseline constraints.

    AWhy not this: Prediction-rate differences between variants do not measure recall against verified outcomes.

    BWhy not this: Feature statistics measure input drift, not recall; daily rebasing can also normalize a developing problem.

    CWhy this is right: Joining matured labels to captured predictions enables recall comparisons against approved quality constraints.

    DWhy not this: Confidence is not recall and can remain high even when classification performance deteriorates.

    Model-quality monitoring measures recall using predictions joined to ground truth; evaluation windows must allow labels to mature. Feature-distribution drift can identify input changes, but it does not establish a decline in recall.

    Open this question
  10. Question 10

    ML Model and Foundation Model (FM) Development

    A team compares two prompt templates using Amazon Bedrock model evaluations with an LLM judge. The second evaluation also changes the judge model and rubric; how should the team isolate the effect of the prompt change?

    Show the answer

    Correct answerA. Evaluate both templates with the same dataset, generation settings, judge model, and rubric.

    AWhy this is right: A common evaluation configuration makes the prompt template the variable being compared.

    BWhy not this: Different rubrics still confound the comparison even when humans provide the ratings.

    CWhy not this: Separate baselines do not establish that score differences result from the prompt change.

    DWhy not this: More examples do not remove the confounding caused by different judge models and rubrics.

    Holding the dataset, generation settings, judge, and rubric constant isolates the prompt template as the changed variable. More examples can reduce sampling uncertainty but cannot remove confounding from different evaluators.

    Open this question
  11. Question 11

    ML Model and Foundation Model (FM) Development

    Which practices help another engineer reproduce a training experiment tracked with MLflow on SageMaker AI? (Choose two.)

    Choose 2 answers

    Show the answer

    Correct answersB. Retain the exact training code and dataset versions.F. Record the training hyperparameters in the run.

    AWhy not this: Semantic similarity evaluates generated text rather than preserving experiment provenance.

    BWhy this is right: Exact code and dataset versions preserve the implementation and training inputs.

    CWhy not this: Distribution alerts detect data drift rather than preserving training inputs and settings.

    DWhy not this: Shadow comparisons assess deployment behavior rather than reconstructing a training experiment.

    EWhy not this: Feature attribution explains predictions rather than preserving the training configuration.

    FWhy this is right: Hyperparameters document the training configuration needed to repeat the experiment.

    Recorded hyperparameters and retained code and dataset versions let another engineer reconstruct the experiment. Feature attribution explains predictions but does not preserve the experiment's inputs or configuration.

    Open this question
  12. Question 12

    ML Model and Foundation Model (FM) Development

    An application uses a prompt maintained in Amazon Bedrock Prompt Management. An engineer must preserve the tested prompt configuration while colleagues continue editing it; what should the engineer do?

    Show the answer

    Correct answerB. Create a prompt version and reference its version-specific ARN.

    AWhy not this: Evaluation scores preserve results, not the prompt configuration that produced them.

    BWhy this is right: A versioned prompt preserves the tested configuration independently of subsequent draft edits.

    CWhy not this: An editable draft can change after testing; a timestamp does not freeze its configuration.

    DWhy not this: Responses and a display name do not uniquely preserve the tested prompt configuration.

    A prompt version preserves a snapshot of the prompt configuration, and its version-specific ARN identifies that snapshot. A working draft remains editable, so a timestamp alone does not preserve the tested configuration.

    Open this question
  13. Question 13

    ML Model and Foundation Model (FM) Development

    A manufacturer wants a pre-trained language model to better understand specialized terminology before adapting it to downstream tasks. It has millions of unlabeled technical documents but no curated instruction-response pairs. Which customization strategy is MOST appropriate?

    Show the answer

    Correct answerD. Continued pre-training

    AWhy not this: Preference-based fine-tuning requires preference feedback, such as ranked responses, rather than only domain documents.

    BWhy not this: Few-shot prompting supplies examples at inference time without updating the model's learned domain representations.

    CWhy not this: Instruction fine-tuning requires input-output examples, which the manufacturer does not have.

    DWhy this is right: Continued pre-training learns domain language from unlabeled documents through a self-supervised training objective.

    Continued pre-training adapts a model to domain language using unlabeled text. Supervised instruction fine-tuning instead requires examples of inputs and desired outputs.

    Open this question
  14. Question 14

    ML Model and Foundation Model (FM) Development

    A retailer predicts product ratings from sparse user-item interactions and has category and brand metadata for every product. It must also score newly listed products with no interaction history by learning interactions between user and product features. Which approach BEST fits?

    Show the answer

    Correct answerD. Factorization machines using IDs and metadata

    AWhy not this: An additive linear model does not learn the requested interactions between user and product features.

    BWhy not this: Rating-based item similarity requires interaction history for the new product.

    CWhy not this: ID-only matrix factorization lacks a learned item representation for a newly listed product with no interactions.

    DWhy this is right: Factorization machines learn interactions from sparse features and can use shared metadata when an item lacks history.

    Factorization machines model feature interactions efficiently in sparse data and can use metadata to score new products. ID-only matrix factorization cannot learn an item representation for a product with no interactions.

    Open this question
  15. Question 15

    ML Model and Foundation Model (FM) Development

    A retailer wants to group customers by purchasing behavior without predefined customer labels. Which algorithm is MOST appropriate?

    Show the answer

    Correct answerB. K-means

    AWhy not this: Linear regression predicts a continuous target rather than grouping customers.

    BWhy this is right: K-means discovers groups of customers with similar purchasing features without predefined labels.

    CWhy not this: Latent Dirichlet allocation discovers latent topics in document collections rather than directly clustering purchasing features.

    DWhy not this: Logistic regression learns to predict known class labels rather than discovering unlabeled customer groups.

    K-means groups similar observations without requiring labels. Logistic regression predicts predefined classes and therefore requires labeled training examples.

    Open this question
  16. Question 16

    ML Model and Foundation Model (FM) Development

    An insurer needs a model whose individual predictions can be explained directly as a short sequence of feature-threshold decisions, without a separate explanation method. Which model BEST meets this requirement?

    Show the answer

    Correct answerD. A shallow decision tree

    AWhy not this: A neural network combines learned weights and activations rather than exposing a short sequence of threshold rules.

    BWhy not this: A radial-basis-function model uses kernel similarities rather than a short sequence of feature-threshold decisions.

    CWhy not this: A boosted ensemble combines many trees rather than producing its prediction through one short decision path.

    DWhy this is right: A shallow tree provides a short, directly inspectable path of feature-threshold decisions for each prediction.

    A shallow decision tree explains each prediction through a short root-to-leaf path of threshold decisions. A boosted tree ensemble combines many trees, so its prediction is not represented by one short decision path.

    Open this question
  17. Question 17

    ML Model and Foundation Model (FM) Development

    Where should a SageMaker AI script-mode training script save model files so that SageMaker AI packages them as training output?

    Show the answer

    Correct answerA. The directory specified by SM_MODEL_DIR

    AWhy this is right: SageMaker AI packages files saved in this directory as the model artifact.

    BWhy not this: Files in the working directory are not automatically included in the model artifact.

    CWhy not this: SM_CHANNEL_TRAIN identifies the location of data supplied through the train input channel.

    DWhy not this: Temporary storage is not the designated location for automatically packaged model files.

    SageMaker AI packages model files saved in SM_MODEL_DIR and uploads the resulting model artifact to Amazon S3. SM_CHANNEL_TRAIN identifies an input data channel, not the model output directory.

    Open this question
  18. Question 18

    ML Model and Foundation Model (FM) Development

    An engineer tunes a learning rate from 0.00001 to 0.1 with SageMaker AI AMT. Equal multiplicative intervals should receive comparable search coverage rather than concentrating trials near the upper bound; which range configuration should the engineer use?

    Show the answer

    Correct answerC. A continuous range with logarithmic scaling

    AWhy not this: An integer range cannot represent the fractional learning rates in the specified interval.

    BWhy not this: Reverse logarithmic scaling concentrates coverage near the upper bound rather than evenly across orders of magnitude.

    CWhy this is right: Logarithmic scaling gives comparable coverage to multiplicative intervals across the range.

    DWhy not this: Linear scaling treats equal additive intervals equally, rather than equal multiplicative intervals.

    Logarithmic scaling distributes search coverage across orders of magnitude, making it suitable for learning rates spanning a wide range. Linear scaling gives equal coverage to equal additive intervals, concentrating most values in the largest order of magnitude.

    Open this question
  19. Question 19

    ML Model and Foundation Model (FM) Development

    A neural network's parameters exceed one GPU's memory even at batch size 1, but fit across several GPUs. Which distributed training approach allows training to proceed?

    Show the answer

    Correct answerD. Partition the model across GPUs using model parallelism

    AWhy not this: Replicating the full model leaves each GPU with the same parameter memory requirement.

    BWhy not this: Early stopping can shorten a run but cannot make an oversized model fit in GPU memory.

    CWhy not this: Gradient accumulation reduces the microbatch memory requirement but does not partition model parameters.

    DWhy this is right: Partitioning places different parts of the model on different GPUs, addressing model parameter memory limits.

    Model parallelism partitions a model across devices, allowing its parameters to exceed one GPU's memory. Standard data parallelism replicates the model on each GPU, so each replica must still fit on its device.

    Open this question
  20. Question 20

    ML Model and Foundation Model (FM) Development

    A team has capacity for 40 simultaneous AMT trials and a deadline allowing only one full training wave, with no useful intermediate metrics. It needs to search continuous ranges without discretizing them or waiting for completed trials to guide new candidates; which configuration best fits?

    Show the answer

    Correct answerD. Random search with 40 total trials and 40 parallel trials

    AWhy not this: Discretizing the continuous ranges violates the stated search requirement.

    BWhy not this: Four parallel trials require multiple waves, exceeding the available training window.

    CWhy not this: Hyperband relies on intermediate objective metrics to allocate resources and stop unpromising trials.

    DWhy this is right: Independent sampling supports continuous ranges and launches the entire trial budget concurrently.

    Random search samples candidates independently, allowing all 40 trials to run in one wave over continuous ranges. Bayesian search with limited parallelism requires successive waves; Hyperband needs intermediate progress information, and discretized grid search violates the range requirement.

    Open this question
  21. Question 21

    ML Model and Foundation Model (FM) Development

    A custom training script prints validation F1 scores to its logs. How should an engineer configure SageMaker AI AMT to select the trial with the highest validation F1?

    Show the answer

    Correct answerA. Define a metric extraction expression and maximize that metric

    AWhy this is right: The metric definition extracts validation F1, and maximization favors the highest score.

    BWhy not this: The extraction expression exposes the metric, but minimizing F1 favors lower scores.

    CWhy not this: Training loss is not validation F1, and maximizing loss generally favors worse training performance.

    DWhy not this: A fixed hyperparameter is a training input, not an observed metric used to rank trials.

    For a custom logged metric, AMT needs a metric definition that extracts its value and a matching objective metric configured for maximization. Minimizing F1 would favor worse scores.

    Open this question
  22. Question 22

    ML Model and Foundation Model (FM) Development

    A shadow variant has lower latency than production, but it uses a larger instance and receives substantially fewer requests per second. What should the engineer do before attributing the improvement to the candidate model?

    Show the answer

    Correct answerD. Compare latency with matched instance types and per-instance load.

    AWhy not this: Feature attributions explain predictions but do not control the infrastructure and load affecting latency.

    BWhy not this: Training duration does not establish inference latency under production serving conditions.

    CWhy not this: Matched accuracy evaluation measures predictive quality, not the source of a latency improvement.

    DWhy this is right: Matching compute capacity and load reduces serving-environment confounders in the latency comparison.

    Instance capacity and request load affect inference latency, so a model-level comparison requires comparable serving conditions. Accuracy evaluation is useful for promotion but cannot explain the observed latency difference.

    Open this question
  23. Question 23

    ML Model and Foundation Model (FM) Development

    Which SageMaker Clarify output helps explain how individual input features contributed to a specific prediction?

    Show the answer

    Correct answerA. SHAP feature attribution values

    AWhy this is right: SHAP values attribute a prediction's difference from a baseline to its input features.

    BWhy not this: Feature distribution statistics describe the data and support drift detection rather than local explanations.

    CWhy not this: A confusion matrix summarizes predicted and actual classes, not individual feature contributions.

    DWhy not this: A training loss curve shows optimization progress rather than why a particular prediction occurred.

    SHAP feature attribution values describe how features contribute to a prediction relative to a baseline. A confusion matrix summarizes classification outcomes across examples rather than explaining an individual prediction.

    Open this question
  24. Question 24

    ML Model and Foundation Model (FM) Development

    A SageMaker AI shadow test mirrors a share of production requests to a candidate variant. Which evidence BEST supports promoting the shadow variant to production?

    Show the answer

    Correct answerB. Its latency and error rates match or beat production on the same mirrored requests

    AWhy not this: Offline accuracy compared with training accuracy measures neither model on live requests.

    BWhy this is right: Metrics from the same mirrored requests compare the two variants under identical live conditions.

    CWhy not this: The shadow variant receives at most the sampled share of requests, and a request count says nothing about quality.

    DWhy not this: Shadow responses are discarded rather than returned, so no customer sees or rates them.

    A shadow test is a fair comparison because both variants handle the same live requests; SageMaker AI shows their latency and error metrics side by side, and promotion is justified when the shadow variant matches or beats production. Shadow responses are never returned to customers, and offline accuracy says nothing about behavior on live traffic.

    Open this question
  25. Question 25

    ML Model and Foundation Model (FM) Development

    A deployed classifier has no production labels yet. An engineer needs to detect changes in input feature distributions relative to approved training data. What should the engineer configure?

    Show the answer

    Correct answerD. Data quality monitoring against baseline feature statistics

    AWhy not this: Recall measures predictive performance and requires ground-truth labels, which are not yet available.

    BWhy not this: Bias monitoring evaluates disparities between groups rather than general changes in input feature distributions.

    CWhy not this: Feature attribution monitoring detects changes in how features influence predictions, not input distributions directly.

    DWhy this is right: Baseline feature statistics and constraints support detecting changes in production input distributions.

    SageMaker AI Model Monitor data quality monitoring compares captured inputs with baseline statistics and constraints. Model quality monitoring evaluates predictive performance and requires ground-truth labels.

    Open this question
  26. Question 26

    ML Model and Foundation Model (FM) Development

    A shadow variant receives 10% of production requests. Its accuracy on that sample exceeds production accuracy measured across all requests, but the sample contains fewer difficult cases. Which comparison BEST supports a promotion decision?

    Show the answer

    Correct answerD. Score both variants on the same labeled shadowed requests.

    AWhy not this: Training-set scores do not establish comparative performance on current production traffic.

    BWhy not this: Different request sets retain the difficulty imbalance, so the accuracy difference may not reflect model quality.

    CWhy not this: Agreement measures consistency between models, not whether either model predicts correctly.

    DWhy this is right: Matched requests and labels allow a paired accuracy comparison without the stated case-mix confounder.

    Evaluating both variants on the same labeled requests controls for differences in case difficulty and measures correctness directly. Comparing accuracy across different request sets can confuse traffic composition with model improvement.

    Open this question
  27. Question 27

    ML Model and Foundation Model (FM) Development

    Analysts ask a RAG assistant questions such as 'What was total revenue by region last quarter?' The figures live in Amazon Redshift tables. Vector search over exported text chunks returns partial rows, so the totals are wrong. Which retrieval pattern BEST fits these questions?

    Show the answer

    Correct answerB. Generate SQL from the question and run it against Redshift.

    AWhy not this: Hybrid search improves which chunks match but still returns a handful of chunks rather than a total over all rows.

    BWhy this is right: A generated SQL query aggregates every matching row in Redshift and returns the exact result.

    CWhy not this: More chunks raise the share of rows retrieved but still do not compute a complete, correct total.

    DWhy not this: Reranking reorders the retrieved chunks but cannot add the rows that were never retrieved.

    Aggregate questions need every matching row, so a structured-data retrieval pattern turns the question into a SQL query and runs it on the warehouse, as Amazon Bedrock Knowledge Bases does for Amazon Redshift. Hybrid search, more chunks or reranking still return a sample of text chunks, not a computed total.

    Open this question
  28. Question 28

    ML Model and Foundation Model (FM) Development

    A startup needs document summaries for an application with unpredictable request volume. An existing Amazon Bedrock FM meets its quality requirements without customization, and the startup has no ML operations staff. Which approach BEST minimizes operational effort?

    Show the answer

    Correct answerB. Invoke the existing FM through Amazon Bedrock on-demand inference.

    AWhy not this: Training from scratch adds development work despite an existing FM already meeting quality requirements.

    BWhy this is right: On-demand inference avoids model deployment and provisioned endpoint management for variable request volume.

    CWhy not this: A provisioned endpoint requires deployment and capacity decisions without addressing an unmet requirement.

    DWhy not this: Fine-tuning and self-managed inference add training and server operations that the startup does not need.

    Amazon Bedrock on-demand inference provides access to a suitable FM without model training or endpoint capacity management. A SageMaker AI endpoint offers more deployment control but introduces unnecessary model-serving responsibilities.

    Open this question
  29. Question 29

    ML Model and Foundation Model (FM) Development

    A chatbot must answer from company policies updated daily without retraining its FM. Which architecture should it use?

    Show the answer

    Correct answerD. Retrieve current policy passages into the FM's prompt.

    AWhy not this: Cached answers can become stale and do not retrieve current policy evidence.

    BWhy not this: Pre-training knowledge does not incorporate the company's daily policy updates.

    CWhy not this: Fine-tuning requires training and is not a retrieval mechanism for daily policy updates.

    DWhy this is right: Retrieving current passages grounds generation in updated policies without changing model weights.

    Retrieval Augmented Generation supplies current source passages as context at inference time. Fine-tuning changes model behavior or knowledge through training rather than retrieving updated policies for each request.

    Open this question
  30. Question 30

    ML Model and Foundation Model (FM) Development

    A company has validated a licensed pre-trained model that meets its accuracy target but requires a proprietary inference library and access to model weights; no hosted API meets these requirements. It must launch within two weeks without managing servers or training a model. Which approach BEST meets these constraints?

    Show the answer

    Correct answerB. Deploy the model and library in a custom container on an Amazon SageMaker AI endpoint.

    AWhy not this: EC2 supports the software requirements but makes the application team responsible for managing servers.

    BWhy this is right: A custom container supports the required library and existing weights while SageMaker AI manages the serving infrastructure.

    CWhy not this: Training a replacement conflicts with the no-training constraint and discards an already validated model.

    DWhy not this: Prompt engineering cannot provide model-weight access or install a proprietary library inside a hosted model API.

    A SageMaker AI endpoint supports a custom inference container while managing serving infrastructure, allowing reuse of the validated weights and library. EC2 offers software control but leaves server management to the company.

    Open this question
  31. Question 31

    ML Model and Foundation Model (FM) Development

    A SageMaker AI training job is GPU-compute-bound, and its model fits on each GPU. With input throughput sufficient and gradient communication inexpensive, which approach BEST reduces epoch time while preserving the global batch size?

    Show the answer

    Correct answerD. Replicate the model across GPUs and divide each global batch.

    AWhy not this: Sequential layer partitioning addresses memory capacity but does not exploit concurrent processing of different batch portions.

    BWhy not this: Gradient accumulation supports larger effective batches but does not add parallel compute on the existing GPU.

    CWhy not this: Independent training runs do not reproduce synchronized updates for each global batch and duplicate training work.

    DWhy this is right: Data parallelism spreads each global batch across model replicas, reducing compute per GPU while synchronizing updates.

    Synchronous data parallelism processes different portions of a global batch concurrently and synchronizes gradients. Partitioning layers primarily addresses model capacity and, with sequential processing, does not provide the same batch-level concurrency.

    Open this question
  32. Question 32

    ML Model and Foundation Model (FM) Development

    A cheap classifier handles most requests accurately, while an expensive classifier performs better on difficult cases. Which design choices BEST reduce average inference cost while meeting a required accuracy target? (Choose two.)

    Choose 2 answers

    Show the answer

    Correct answersA. Choose the routing threshold using representative labeled validation data.F. Route low-confidence cheap-model predictions to the expensive model.

    AWhy this is right: Representative validation data supports choosing a threshold that meets accuracy requirements with lower measured cost.

    BWhy not this: Running the expensive model first incurs its cost for every request and escalates uncertainty to the weaker model.

    CWhy not this: Training accuracy can be optimistic and does not establish routing performance on unseen requests.

    DWhy not this: Evaluating both models for every request incurs both inference costs instead of selectively avoiding expensive inference.

    EWhy not this: Running both incurs both costs, and confidence scores from different models may not be directly comparable.

    FWhy this is right: Selective escalation uses the expensive model only when the cheap model is uncertain.

    A cascade reserves expensive inference for cases the cheap model cannot confidently handle. Validation-based threshold selection measures the cost–accuracy tradeoff; running both models for every request forfeits the main cost saving.

    Open this question
  33. Question 33

    ML Model and Foundation Model (FM) Development

    Which technique reduces training time by ending training when validation performance stops improving?

    Show the answer

    Correct answerC. Early stopping

    AWhy not this: Learning-rate warmup gradually increases the learning rate during the initial training steps.

    BWhy not this: Gradient accumulation combines gradients across microbatches before an update; it does not monitor validation progress.

    CWhy this is right: Early stopping avoids additional training after a monitored validation metric stops improving.

    DWhy not this: Batch normalization normalizes intermediate activations rather than stopping training based on validation performance.

    Early stopping ends training when a monitored validation metric stops improving. Learning-rate warmup gradually increases the learning rate at the start; it does not stop unproductive training.

    Open this question
  34. Question 34

    ML Model and Foundation Model (FM) Development

    A model converges with similarly high training and validation errors because it is too simple. Which change MOST directly addresses this underfitting?

    Show the answer

    Correct answerD. Increase model capacity

    AWhy not this: Reducing capacity makes the model less able to represent the required patterns.

    BWhy not this: Stronger dropout increases regularization and can worsen an overly simple model's inability to fit the data.

    CWhy not this: Greater weight decay constrains model parameters rather than addressing insufficient representational capacity.

    DWhy this is right: Greater capacity allows the model to represent patterns that the simpler model cannot learn.

    Increasing model capacity helps an overly simple model learn patterns it cannot currently represent. Stronger dropout or weight decay further restricts learning and can worsen underfitting.

    Open this question
  35. Question 35

    ML Model and Foundation Model (FM) Development

    After fine-tuning on legal documents, a language model improves on legal tasks but loses previously measured general-language capabilities. Which training change MOST directly addresses this regression?

    Show the answer

    Correct answerD. Mix representative general-language examples into fine-tuning.

    AWhy not this: More training exclusively on the new domain can worsen the loss of previously learned capabilities.

    BWhy not this: Removing regularization does not preserve prior knowledge and can increase over-specialization.

    CWhy not this: A higher learning rate can cause larger parameter changes and further disrupt previously learned capabilities.

    DWhy this is right: Rehearsal preserves exposure to earlier tasks while the model learns the new domain.

    Rehearsing representative examples from prior tasks helps prevent catastrophic forgetting during adaptation. Additional epochs on only the new domain can strengthen specialization while further degrading previously learned capabilities.

    Open this question
  36. Question 36

    ML Model and Foundation Model (FM) Development

    During recurrent neural network training, gradient norms suddenly increase by several orders of magnitude and the loss becomes NaN. Which change MOST directly limits the unstable updates?

    Show the answer

    Correct answerC. Apply gradient norm clipping

    AWhy not this: Reducing weight decay weakens regularization but does not directly bound gradient magnitude.

    BWhy not this: A classification threshold changes predicted classes after inference, not gradients during training.

    CWhy this is right: Clipping bounds gradient magnitude and helps prevent excessively large parameter updates.

    DWhy not this: Additional epochs do not constrain exploding gradients or prevent numerical instability.

    Gradient norm clipping limits excessively large gradients before parameter updates, directly addressing exploding gradients. More training epochs do not correct unstable updates and can prolong the failure.

    Open this question
  37. Question 37

    ML Model and Foundation Model (FM) Development

    A credit model's global explanation ranks income highest by mean absolute SHAP value, but its mean signed SHAP value is near zero. Which interpretations are supported? (Choose three.)

    Choose 3 answers

    Show the answer

    Correct answersA. Income's global rank alone does not indicate direction.B. Income's positive and negative attributions largely offset.E. Income has the largest average attribution magnitude.

    AWhy this is right: Ranking by absolute contributions shows importance without establishing whether contributions increase or decrease predictions.

    BWhy this is right: Large absolute contributions with a near-zero signed mean indicate that positive and negative contributions largely cancel.

    CWhy not this: An absolute-value ranking discards signs, and the near-zero signed mean does not support a general push toward approval.

    DWhy not this: A small signed mean can hide large individual contributions that cancel when averaged.

    EWhy this is right: The highest mean absolute SHAP value identifies the largest average contribution magnitude among the features.

    Mean absolute SHAP values summarize contribution magnitude, not direction. A near-zero signed mean alongside large absolute contributions indicates offsetting positive and negative effects; it does not mean the feature has little influence.

    Open this question
  38. Question 38

    ML Model and Foundation Model (FM) Development

    A lending team needs to show an applicant the smallest feasible changes to input features that would change the model's decision from rejection to approval. Which explanation method BEST meets this need?

    Show the answer

    Correct answerC. Counterfactual explanation

    AWhy not this: A confidence score describes prediction certainty rather than changes needed to obtain another decision.

    BWhy not this: Partial dependence summarizes average prediction responses, not the smallest changes needed for one applicant.

    CWhy this is right: Counterfactual explanations identify feasible input changes that lead to a specified alternative prediction.

    DWhy not this: Global importance ranks features across a dataset rather than identifying changes that reverse an applicant's decision.

    A counterfactual explanation identifies input changes that would produce a different model decision, subject to feasibility constraints. A partial dependence plot instead summarizes average model responses as a feature varies.

    Open this question
  39. Question 39

    ML Model and Foundation Model (FM) Development

    Which convergence issue occurs when gradients become extremely small in a deep network's early layers, causing those layers to learn very slowly?

    Show the answer

    Correct answerA. Vanishing gradients

    AWhy this is right: Vanishing gradients shrink during backpropagation, leaving early layers with very small updates.

    BWhy not this: Exploding gradients become excessively large rather than extremely small.

    CWhy not this: Overfitting means learning training-specific patterns that generalize poorly, not necessarily having tiny gradients.

    DWhy not this: Data drift is a change in input distributions, not diminishing gradients during backpropagation.

    Vanishing gradients produce very small parameter updates, slowing learning in early layers. Exploding gradients cause excessively large updates instead.

    Open this question
  40. Question 40

    ML Model and Foundation Model (FM) Development

    Which statements accurately describe common ML training tradeoffs? (Choose three.)

    Choose 3 answers

    Show the answer

    Correct answersA. More model parameters can increase capacity and training compute requirements.C. Distributed training can shorten elapsed time without lowering total compute cost.D. More training data can improve generalization but increase training time.

    AWhy this is right: Larger parameter counts generally require more computation and memory, although added capacity may improve fit.

    BWhy not this: Total training cost depends on billed duration and resource count as well as hourly price.

    CWhy this is right: Additional workers can shorten training while their combined billed usage offsets the time savings.

    DWhy this is right: Additional representative data can improve generalization while requiring more processing per training pass.

    EWhy not this: Higher training accuracy can reflect overfitting; performance on held-out data must also be measured.

    More data and larger models can improve learning while increasing training work; distributed training can reduce elapsed time without reducing cost. Training accuracy does not establish generalization, and hourly pricing alone does not account for training duration.

    Open this question
  41. Question 41

    ML Model and Foundation Model (FM) Development

    A team must run six sequential training trials within 12 hours, each achieving validation F1 of at least 0.90. Benchmarks include all billable time, and each configuration uses one instance; which configuration meets both requirements at the lowest total cost?

    Show the answer

    Correct answerD. F1 0.91; 120 minutes per trial; $2 per hour

    AWhy not this: Six trials cost $15 but take 15 hours, exceeding the deadline.

    BWhy not this: Six trials take 9 hours and cost $36, exceeding the cost of another configuration that meets both requirements.

    CWhy not this: Six trials take 6 hours and cost $6, but validation F1 is below the required threshold.

    DWhy this is right: Six trials take 12 hours and cost $24 while meeting the minimum validation F1.

    The 120-minute configuration completes six trials in 12 hours for $24 and meets the F1 threshold. The 150-minute configuration costs less but needs 15 hours; the 90-minute configuration meets the requirements but costs $36.

    Open this question
  42. Question 42

    ML Model and Foundation Model (FM) Development

    A neural network's training loss continues to decrease, but validation loss has increased for several epochs. Which action BEST reduces further training cost while preserving the best observed generalization?

    Show the answer

    Correct answerB. Stop training and restore the best validation checkpoint

    AWhy not this: Training loss alone does not measure generalization; further reductions can accompany worsening overfitting.

    BWhy this is right: Stopping avoids additional compute, and the best validation checkpoint retains the strongest observed held-out performance.

    CWhy not this: Additional epochs increase cost, and the final checkpoint may generalize worse than an earlier checkpoint.

    DWhy not this: Increasing capacity and restarting adds cost without addressing the observed deterioration in validation performance.

    Early stopping avoids additional training once validation performance deteriorates, and restoring the best validation checkpoint preserves the strongest observed generalization. Continuing to minimize training loss can increase cost and overfitting.

    Open this question
  43. Question 43

    ML Model and Foundation Model (FM) Development

    A multi-tenant RAG assistant uses one Amazon Bedrock knowledge base for all customers. Answers sometimes cite passages from another customer's documents, and each document already carries a tenant ID. Which retrieval pattern BEST keeps results within the requesting customer's documents?

    Show the answer

    Correct answerB. Apply a metadata filter on tenant ID to each retrieval request

    AWhy not this: Reranking reorders the retrieved passages but still includes other tenants' passages that matched the query.

    BWhy this is right: Filtering on the tenant ID metadata restricts the search to the caller's own documents before results are returned.

    CWhy not this: Hybrid search improves matching on exact terms and meaning but does not restrict results by owner.

    DWhy not this: A prompt instruction depends on the model obeying it, and the other tenant's passages are still in the context.

    A metadata filter limits retrieval to chunks whose tenant ID matches the caller, so other customers' passages are never returned to the FM. Reranking and hybrid search change which relevant passages rank highest, and a prompt instruction cannot remove passages already in the context.

    Open this question
  44. Question 44

    ML Model and Foundation Model (FM) Development

    Three regression models make different errors on validation data. An engineer wants to learn how to combine their predictions rather than assign fixed weights; which approach should the engineer use?

    Show the answer

    Correct answerB. Train a meta-model on out-of-fold predictions

    AWhy not this: A lower learning rate changes training updates, not how predictions from multiple models are combined.

    BWhy this is right: A meta-model learns the combination from predictions generated for examples excluded from each base model's training fold.

    CWhy not this: Selecting one model discards the other models rather than combining their complementary predictions.

    DWhy not this: Equal averaging combines predictions using fixed weights rather than learning how to combine them.

    Stacking trains a meta-model to combine base-model predictions; out-of-fold predictions help prevent training leakage. Equal averaging combines predictions but does not learn the combination.

    Open this question
  45. Question 45

    ML Model and Foundation Model (FM) Development

    A single-GPU training job updates weights after each batch of 128 examples, but a replacement GPU fits only 32 examples per batch. Which change preserves 128 examples per optimizer update without adding GPUs?

    Show the answer

    Correct answerD. Accumulate four batches of 32 before each update

    AWhy not this: More epochs increase total data exposure but leave each update based on only 32 examples.

    BWhy not this: Checkpoint averaging combines model weights after separate updates, not gradients for one optimizer update.

    CWhy not this: Changing the learning rate changes update magnitude but does not combine 128 examples into one update.

    DWhy this is right: Accumulating appropriately scaled gradients across four microbatches preserves 128 examples per optimizer update.

    Gradient accumulation combines gradients from four microbatches of 32 to retain an effective batch size of 128 per optimizer update. Increasing epochs changes total training exposure, not the examples contributing to each update.

    Open this question
  46. Question 46

    ML Model and Foundation Model (FM) Development

    An engineer trains several high-variance decision trees independently on bootstrap samples of the same dataset. Which prediction strategy completes a bagging ensemble for classification?

    Show the answer

    Correct answerB. Take a majority vote across the trees

    AWhy not this: Passing outputs between models creates a sequential pipeline rather than aggregating independent predictions.

    BWhy this is right: Majority voting aggregates the independently trained classifiers, completing the bagging ensemble.

    CWhy not this: Sequentially correcting previous errors describes boosting, not independently trained bootstrap models.

    DWhy not this: Choosing one tree discards the variance-reduction benefit of aggregating independently trained trees.

    Bagging aggregates independently trained classifiers through voting to reduce variance. Boosting instead trains models sequentially to address earlier models' errors.

    Open this question
  47. Question 47

    ML Model and Foundation Model (FM) Development

    What does one training epoch represent?

    Show the answer

    Correct answerA. One complete pass through the training dataset

    AWhy this is right: An epoch measures a complete pass through the training examples.

    BWhy not this: A tuning trial runs training with a selected hyperparameter configuration and can contain many epochs.

    CWhy not this: Validation evaluation measures performance and does not define a training epoch.

    DWhy not this: A parameter update usually corresponds to a training step, not a complete dataset pass.

    An epoch is one complete pass through the training dataset. A training step typically processes a batch and can occur many times within one epoch.

    Open this question
  48. Question 48

    ML Model and Foundation Model (FM) Development

    A neural network's training loss repeatedly overshoots and oscillates without trending downward, even with a large, representative batch. Which hyperparameter adjustment should an engineer try first to reduce the update magnitude?

    Show the answer

    Correct answerB. Decrease the learning rate

    AWhy not this: Smaller batches generally introduce more gradient noise and do not directly control update magnitude.

    BWhy this is right: The learning rate scales gradient-based parameter updates, so decreasing it directly reduces their magnitude.

    CWhy not this: Additional steps increase the number of updates rather than reduce the magnitude of each update.

    DWhy not this: Additional epochs allow longer training but do not reduce the size of individual parameter updates.

    Reducing the learning rate directly reduces the magnitude of parameter updates and can limit overshooting. Increasing epochs permits more updates but does not make those updates smaller.

    Open this question
  49. Question 49

    ML Model and Foundation Model (FM) Development

    Human reviewers frequently disagree when rating generated answers for helpfulness, even though model identities are hidden and answer order is randomized. What should the engineer do FIRST to improve rating consistency?

    Show the answer

    Correct answerB. Calibrate reviewers using a shared rubric and scored examples.

    AWhy not this: Averaging summarizes disagreement without addressing why reviewers apply different standards.

    BWhy this is right: Calibration establishes common scoring criteria and exposes ambiguities before the evaluation continues.

    CWhy not this: One reviewer removes visible disagreement but does not establish consistent criteria across a review workforce.

    DWhy not this: More assignments do not address differing interpretations of helpfulness and can increase reviewer fatigue.

    A shared rubric and calibration examples align reviewers' interpretations of helpfulness. Adding more ratings can reduce sampling noise but does not resolve inconsistent scoring criteria.

    Open this question
  50. Question 50

    ML Model and Foundation Model (FM) Development

    A GenAI assistant must meet safety and correctness thresholds in every supported language and a p95 latency limit. One candidate has the highest average quality but fails a low-volume language; which release rule BEST meets these requirements?

    Show the answer

    Correct answerB. Require every language's quality gates and the latency gate before ranking eligible candidates.

    AWhy not this: Traffic weighting can conceal unacceptable performance in a language with few requests.

    BWhy this is right: Independent gates enforce every required language threshold and the latency limit without allowing compensating trade-offs.

    CWhy not this: Aggregate gates do not enforce the required minimum quality in each supported language.

    DWhy not this: A combined score can let strong results compensate for a mandatory threshold violation.

    Mandatory per-language and latency gates enforce all release constraints before candidates are ranked. A traffic-weighted average can hide a failure in a low-volume language, and a combined score permits trade-offs that the requirements do not allow.

    Open this question