AWS Certified AI Practitioner (AIF-C01) & Machine Learning Engineer Associate (MLA-C01)

High-yield AWS AI/ML certification flashcards covering AIF-C01 and MLA-C01 blueprints, Amazon Bedrock (Knowledge Bases RAG, Agents, Guardrails, inference parameters, PEFT/LoRA), Amazon SageMaker (Data Wrangler, Feature Store, Clarify SHAP/bias, Model Monitor, deployment strategies), and ML/LLM evaluation metrics.

Category
Project Management, Agile & AI/Data Certifications — PMI PMP, PRINCE2 7th Ed., Scrum (PSM/CSPO) & ITIL 4 + AWS AI/ML, Databricks & Snowflake
Level
intermediate
Languages
en → en
Cards
32
Markdown
AWS Certified AI Practitioner (AIF-C01) & Machine Learning Engineer Associate (MLA-C01) (.md)

Flashcards (32)

#Front (Term / Question)Back (Definition / Answer)ExampleMultiple-Choice Options
1How does Amazon SageMaker Clarify measure Pre-Training Bias, Post-Training Bias, and model explainability?Clarify computes Pre-Training bias (CI, DPL) on datasets, Post-Training bias (DI, DPPL) on predictions, and Kernel SHAP values for feature attribution explainability.In production, SageMaker Clarify integrates with Model Monitor to send a CloudWatch alarm if SHAP feature importance shifts away from income toward zip code, signaling emerging demographic bias.
  • Clarify computes Pre-Training bias (CI, DPL) on datasets, Post-Training bias (DI, DPPL) on predictions, and Kernel SHAP values for feature attribution explainability.
  • Uses CI and DPL for pre-training dataset bias, DI and DPPL for post-training prediction bias, and SHAP (Shapley Additive Explanations) for local/global explainability.
  • SHAP values quantify each feature's marginal contribution to an individual prediction as well as global model behavior.
2How do the AWS Certified AI Practitioner (AIF-C01) and AWS Certified Machine Learning Engineer Associate (MLA-C01) exams compare in question count, duration, and passing score?Both have 65 questions (50 scored + 15 unscored); AIF-C01 allows 90 minutes (pass 700/1000), while MLA-C01 allows 130 minutes (pass 720/1000).Both exams include multiple-choice, multiple-response, ordering, matching, and case study item types on a 100–1000 scaled score, with Foundational AIF-C01 requiring 700 and Associate MLA-C01 requiring 720.
  • AIF-C01: 65 items, 90 min, 700/1000 pass; MLA-C01: 65 items, 130 min, 720/1000 pass.
  • Both exams administer 50 scored + 15 pretest items; AIF-C01 allows 90 minutes (pass 700) and MLA-C01 allows 130 minutes (pass 720).
  • Both have 65 questions (50 scored + 15 unscored); AIF-C01 allows 90 minutes (pass 700/1000), while MLA-C01 allows 130 minutes (pass 720/1000).
3In Amazon SageMaker Data Wrangler, how do you detect target leakage and handle imbalanced datasets before training?Run the Data Quality and Insights Report to flag abnormal feature-target correlation (target leakage), and apply SMOTE or undersampling transforms for class imbalance.If a churn model includes 'cancellation_confirmation_email_sent' as a feature and achieves 99.9% validation accuracy, Data Wrangler's Target Leakage analysis flags that feature for removal.
  • Run the Data Quality and Insights Report to flag abnormal feature-target correlation (target leakage), and apply SMOTE or undersampling transforms for class imbalance.
  • Data Wrangler's Data Quality and Insights Report automatically detects target leakage, duplicate rows, anomalous values, and class imbalance.
  • Apply SMOTE in SageMaker Data Wrangler to oversample rare fraud cases, and fit scalers/imputers only on the training split to prevent data leakage.
4What are the four monitoring types in Amazon SageMaker Model Monitor, and which requires Ground Truth labels?Data Quality (feature drift), Model Quality (accuracy/F1 drift, which REQUIRES Ground Truth labels), Bias Drift (Clarify), and Feature Attribution Drift (SHAP).When an e-commerce recommender's live inputs deviate from the `constraints.json` and `statistics.json` baseline, Data Quality Monitor fires immediately, whereas Model Quality Monitor waits until actual purchase outcomes (ground truth) are ingested.
  • Data Quality (feature drift), Model Quality (accuracy/F1 drift, which REQUIRES Ground Truth labels), Bias Drift (Clarify), and Feature Attribution Drift (SHAP).
  • Data Quality (feature distribution drift), Model Quality (requires ground truth labels), Bias Drift, and Feature Attribution (SHAP) Drift.
  • Only Model Quality Monitor and certain post-training Bias metrics require joining captured endpoint predictions with delayed Ground Truth labels.
5How do LoRA (Low-Rank Adaptation) and QLoRA reduce memory and compute costs during LLM Parameter-Efficient Fine-Tuning (PEFT)?LoRA freezes base model weights and trains small low-rank adapter matrices; QLoRA additionally quantizes the frozen base model to 4-bit NormalFloat precision.On Amazon SageMaker JumpStart, fine-tuning a 70B-parameter Llama model with QLoRA reduces GPU VRAM requirements by over 75% compared to full-parameter fine-tuning while preserving accuracy.
  • LoRA trains only small low-rank adapter matrices while freezing base weights; QLoRA combines LoRA with 4-bit base-model quantization.
  • LoRA freezes base model weights and trains small low-rank adapter matrices; QLoRA additionally quantizes the frozen base model to 4-bit NormalFloat precision.
  • Freezes billions of base parameters and updates <1% trainable adapter weights, drastically cutting GPU memory and training time.
6How do the Online Store and Offline Store in Amazon SageMaker Feature Store differ in storage architecture and use cases?The Online Store (DynamoDB/In-Memory) serves low-latency latest feature values for real-time inference; the Offline Store (S3 Parquet/Glue) archives historical features for training.During real-time credit card checkout, the fraud endpoint calls `GetRecord` against the SageMaker Feature Store Online Store (<10 ms), while data scientists query the S3 Offline Store via Athena for training.
  • The Online Store (DynamoDB/In-Memory) serves low-latency latest feature values for real-time inference; the Offline Store (S3 Parquet/Glue) archives historical features for training.
  • Online Store = low-latency latest state for real-time inference; Offline Store = S3 historical archive for model training and time-travel queries.
  • Synchronize features across Online Store (real-time `PutRecord`/`GetRecord`) and Offline Store (S3 Iceberg/Parquet for training) to eliminate training-serving skew.
7Which AWS managed AI services should be selected for Speech-to-Text, Text-to-Speech, OCR Document Extraction, Enterprise Search, and PII Discovery in S3?Amazon Transcribe (Speech-to-Text), Amazon Polly (Text-to-Speech), Amazon Textract (OCR forms/tables), Amazon Q Business / Kendra (search), and Amazon Macie (S3 PII discovery).A mortgage lender uses Amazon Textract to extract key-value pairs and tables from scanned tax returns, and Amazon Comprehend to redact PII entities from free-text underwriter notes.
  • Amazon Transcribe (Speech-to-Text), Amazon Polly (Text-to-Speech), Amazon Textract (OCR forms/tables), Amazon Q Business / Kendra (search), and Amazon Macie (S3 PII discovery).
  • Transcribe (audio->text), Polly (text->audio), Textract (document OCR/tables), Comprehend (NLP/sentiment/PII), Rekognition (computer vision), Macie (S3 PII).
  • Use Amazon Textract for scanned PDFs/tables, Amazon Comprehend for NLP entity/PII detection, and Amazon Rekognition for image/video analysis.
8How do Managed Spot Training and Checkpointing work together in Amazon SageMaker to cut training costs by up to 90%?Enable `use_spot_instances=True`, set `max_wait` >= `max_run`, and write model checkpoints to `checkpoint_s3_uri` (`/opt/ml/checkpoints`) so interrupted jobs resume from the latest epoch.When a 12-hour PyTorch Spot training job is interrupted at hour 9, SageMaker provisions replacement Spot capacity and reloads `/opt/ml/checkpoints/epoch_45.pt` to finish the remaining 3 hours.
  • Enable `use_spot_instances=True` with `checkpoint_s3_uri` (`/opt/ml/checkpoints`) so Spot interruptions resume from the last saved epoch.
  • Managed Spot Training saves up to 90% over On-Demand instances when paired with S3 checkpointing to preserve training state across interruptions.
  • Enable `use_spot_instances=True`, set `max_wait` >= `max_run`, and write model checkpoints to `checkpoint_s3_uri` (`/opt/ml/checkpoints`) so interrupted jobs resume from the latest epoch.
9What six safeguard policies are provided by Guardrails for Amazon Bedrock to enforce Responsible AI?Content Filters, Denied Topics, Word Filters, Sensitive Information Filters (PII redaction/blocking), Contextual Grounding Checks (hallucination detection), and Automated Reasoning checks.A healthcare chatbot attaches an Amazon Bedrock Guardrail to mask Social Security Numbers (PII filter), block investment advice (Denied Topic), and block ungrounded hallucinations (Contextual Grounding check).
  • Content Filters, Denied Topics, Word Filters, Sensitive Information (PII) redaction, Contextual Grounding checks, and Prompt Attack protection.
  • Contextual Grounding checks verify that the FM response is factually grounded in the RAG source context and relevant to the user query.
  • Content Filters, Denied Topics, Word Filters, Sensitive Information Filters (PII redaction/blocking), Contextual Grounding Checks (hallucination detection), and Automated Reasoning checks.
10In Vector Search for RAG (Amazon OpenSearch Serverless and Aurora PostgreSQL `pgvector`), how do HNSW vs. IVF indexing and Cosine vs. Euclidean (L2) vs. Inner Product distance metrics compare?HNSW builds a multi-layer graph for fast, high-recall queries (higher RAM); IVF partitions vectors into clusters (lower RAM); Cosine Similarity measures directional angle between embeddings.When indexing 10 million 1,024-dimensional Titan Text Embeddings v2 in OpenSearch Serverless for low-latency RAG, engineers select an HNSW index with Cosine Similarity (or Inner Product on unit-normalized vectors).
  • HNSW offers superior query speed and recall at higher RAM cost; IVF uses cluster centroids to reduce memory; Cosine Similarity measures directional semantic similarity.
  • Use HNSW for low-latency high-recall ANN search, and use Cosine Similarity or Inner Product for normalized LLM text embeddings.
  • HNSW builds a multi-layer graph for fast, high-recall queries (higher RAM); IVF partitions vectors into clusters (lower RAM); Cosine Similarity measures directional angle between embeddings.
11What are the core dimensions of Responsible AI tested on the AWS Certified AI Practitioner (AIF-C01) exam?Fairness, Explainability, Privacy and Security, Robustness, Governance, Transparency (AWS AI Service Cards), and Veracity/Safety (preventing hallucinations and toxic outputs).Publishing AWS AI Service Cards supports Transparency, using SageMaker Clarify SHAP supports Explainability and Fairness, and applying Bedrock Guardrails enforces Safety and Veracity.
  • Fairness, Explainability, Privacy & Security, Robustness, Governance, Transparency, and Safety/Controllability.
  • Fairness, Explainability, Privacy and Security, Robustness, Governance, Transparency (AWS AI Service Cards), and Veracity/Safety (preventing hallucinations and toxic outputs).
  • Responsible AI combines Fairness (Clarify), Explainability (SHAP), Safety/Veracity (Bedrock Guardrails), Transparency (Service Cards), and Privacy (Macie/KMS).
12Which metrics evaluate Generative AI / NLP text summarization, translation, and language modeling on AWS (ROUGE, BLEU, BERTScore, Perplexity)?ROUGE measures n-gram recall (summarization); BLEU measures n-gram precision (translation); BERTScore measures contextual embedding similarity; Perplexity measures token prediction uncertainty (lower is better).When evaluating two Bedrock models for summarizing clinical notes, an ML engineer compares ROUGE-L and BERTScore so paraphrases with identical meaning are not penalized.
  • ROUGE = recall-focused (summarization); BLEU = precision-focused (translation); BERTScore = embedding cosine similarity; Perplexity = token uncertainty (lower is better).
  • Use ROUGE for text summarization, BLEU for translation, BERTScore for semantic equivalence, and Perplexity for LLM fluency.
  • ROUGE measures n-gram recall (summarization); BLEU measures n-gram precision (translation); BERTScore measures contextual embedding similarity; Perplexity measures token prediction uncertainty (lower is better).
13Compare Prompt Engineering, RAG, Instruction Fine-Tuning (PEFT/LoRA), and Continued Pre-Training across cost, effort, and use cases.Prompt Engineering is lowest cost; RAG grounds dynamic private facts; Fine-Tuning (LoRA) adapts task style with labeled pairs; Continued Pre-Training teaches unlabeled domain vocabulary.To keep a bot updated with hourly stock inventory, use RAG; to teach an FM specialized biopharma terminology from 50 GB of unlabeled research journals, use Continued Pre-Training.
  • Use RAG for dynamic factual knowledge; use Fine-Tuning (labeled JSONL) for specialized formatting/tone; use Continued Pre-Training (unlabeled text) for domain vocabulary.
  • Prompt Engineering is lowest cost; RAG grounds dynamic private facts; Fine-Tuning (LoRA) adapts task style with labeled pairs; Continued Pre-Training teaches unlabeled domain vocabulary.
  • Cost ascending order: Prompt Engineering < RAG < Parameter-Efficient Fine-Tuning (LoRA) < Continued Pre-Training < Training from Scratch.
14What is Amazon SageMaker Neo and AWS Inferentia / Trainium, and when should you recommend them on MLA-C01?SageMaker Neo compiles models for target edge/cloud hardware; AWS Trainium (`trn1`) cuts deep learning training cost, and AWS Inferentia (`inf2`) accelerates low-cost inference.To deploy a YOLOv8 defect-detection model onto factory ARM edge cameras with 2× faster inference, compile the model with SageMaker Neo and deploy via SageMaker Edge Manager / IoT Greengrass.
  • SageMaker Neo optimizes models for specific hardware targets (Edge/Cloud); Trainium (`trn1`) reduces LLM training cost; Inferentia (`inf2`) reduces inference cost.
  • SageMaker Neo compiles models for target edge/cloud hardware; AWS Trainium (`trn1`) cuts deep learning training cost, and AWS Inferentia (`inf2`) accelerates low-cost inference.
  • Use `ml.trn1` instances for cost-effective large-scale training, `ml.inf2` for high-throughput LLM inference, and SageMaker Neo for hardware-specific compilation.
15How do Data Parallelism and Model Parallelism (Tensor/Pipeline Parallelism) differ in Amazon SageMaker distributed training?Data Parallelism replicates the model across GPUs and splits mini-batches; Model Parallelism partitions a single huge model's layers/tensors across GPUs when VRAM is exceeded.Training a 500 MB ResNet across 8 GPUs uses Data Parallelism to speed up epoch throughput, whereas training a 70B LLM whose weights exceed a single 80 GB A100 GPU requires SageMaker Model Parallelism.
  • Data Parallelism replicates the model across GPUs and splits mini-batches; Model Parallelism partitions a single huge model's layers/tensors across GPUs when VRAM is exceeded.
  • Data Parallel splits training batches across identical model replicas; Model Parallel splits the model weights/layers across GPUs when VRAM is exceeded.
  • Use Data Parallelism to scale batch size and reduce training time; use Model Parallelism (Sharded Data Parallel / Tensor Parallel) when the model exceeds single-GPU memory.
16What is Model Distillation in Amazon Bedrock, and how does it optimize the cost-latency-accuracy trade-off for production GenAI workloads?Model Distillation trains a smaller, faster 'student' model on synthetic prompt-response pairs generated by a large 'teacher' model to cut cost and latency.By distilling a domain-specific classification task from a large teacher model into a compact student model on Amazon Bedrock, an enterprise achieves up to 75% lower inference cost and 3× lower latency with near-teacher accuracy.
  • Uses a large Teacher FM to generate high-quality synthetic training responses that fine-tune a smaller, faster, cheaper Student FM.
  • Distillation achieves teacher-level task accuracy at student-level token cost and sub-second latency.
  • Model Distillation trains a smaller, faster 'student' model on synthetic prompt-response pairs generated by a large 'teacher' model to cut cost and latency.
17How does Retrieval-Augmented Generation (RAG) work in Knowledge Bases for Amazon Bedrock?S3 documents are chunked, embedded via an embeddings model, and indexed in a vector database; queries retrieve semantically similar chunks to ground FM responses.When an employee asks about 2026 parental leave policy, Knowledge Bases for Amazon Bedrock retrieves the exact HR PDF chunk from OpenSearch Serverless and returns a grounded answer with citations.
  • Ingests S3 documents -> chunks -> embeds via Titan/Cohere -> stores in vector DB -> retrieves relevant context at query time to ground FM responses.
  • Combines semantic vector search (OpenSearch Serverless, Aurora pgvector, Pinecone) with FM generation to eliminate hallucinations on private data.
  • S3 documents are chunked, embedded via an embeddings model, and indexed in a vector database; queries retrieve semantically similar chunks to ground FM responses.
18What is Amazon Bedrock, and how do its On-Demand, Batch Inference, and Provisioned Throughput pricing/invocation modes differ?On-Demand charges per input/output token; Batch Inference processes S3 datasets asynchronously at 50% lower cost; Provisioned Throughput reserves dedicated Model Units for guaranteed capacity.A company running nightly sentiment classification on 5 million archived support tickets in S3 uses Amazon Bedrock Batch Inference, whereas a real-time banking chatbot with strict latency SLAs uses Provisioned Throughput.
  • On-Demand charges per input/output token; Batch Inference processes S3 datasets asynchronously at 50% lower cost; Provisioned Throughput reserves dedicated Model Units for guaranteed capacity.
  • On-Demand (pay-per-token), Batch Inference (asynchronous S3 bulk jobs), and Provisioned Throughput (reserved Model Units required for custom models).
  • Serverless managed FM platform offering pay-per-token On-Demand, discounted asynchronous Batch, and capacity-reserved Provisioned Throughput.
19How do Agents for Amazon Bedrock orchestrate multi-step workflows using Action Groups and the ReAct (Reasoning + Acting) framework?Agents decompose requests via Chain-of-Thought reasoning (ReAct), query Knowledge Bases for context, and invoke Action Groups (AWS Lambda + OpenAPI schemas) for external APIs.When a customer asks to check an order and process a return, an Amazon Bedrock Agent calls the Order API Lambda via an Action Group and checks return rules in a Knowledge Base.
  • Agents decompose requests via Chain-of-Thought reasoning (ReAct), query Knowledge Bases for context, and invoke Action Groups (AWS Lambda + OpenAPI schemas) for external APIs.
  • Combines ReAct reasoning, Knowledge Bases, and Action Groups (OpenAPI schema + AWS Lambda) to autonomously execute multi-step API tasks.
  • Agents parse user intent, generate an orchestration trace, query vector stores, and invoke Lambda functions defined by OpenAPI schemas.
20Which built-in Amazon SageMaker algorithms match tabular classification/regression, unsupervised anomaly detection, topic modeling, and probabilistic time-series forecasting?XGBoost/LightGBM handle tabular data; Random Cut Forest (RCF) detects unsupervised anomalies; LDA/NTM model topics; DeepAR performs probabilistic multi-series time-series forecasting.To forecast demand across 10,000 retail SKUs including brand-new cold-start items with related category metadata, an ML engineer trains a SageMaker DeepAR model.
  • XGBoost/LightGBM handle tabular data; Random Cut Forest (RCF) detects unsupervised anomalies; LDA/NTM model topics; DeepAR performs probabilistic multi-series time-series forecasting.
  • XGBoost (structured tabular), Random Cut Forest (anomalies), DeepAR (time-series forecasting), K-Means (clustering), BlazingText (Word2Vec/text classification).
  • Random Cut Forest (RCF) assigns an anomaly score to each data point without requiring labeled fraud/failure examples.
21In Knowledge Bases for Amazon Bedrock, how do Fixed-Size, Hierarchical, and Semantic chunking strategies compare?Fixed-size splits text into uniform token blocks; Hierarchical searches small child chunks but returns larger parent chunks; Semantic splits text where embedding similarity shifts.For complex legal contracts where a single clause requires surrounding section context to interpret accurately, Hierarchical chunking retrieves the matched sub-clause's parent section.
  • Fixed-size (simple token counts + overlap), Hierarchical (child search + parent retrieval), Semantic (splits at topic boundaries using embeddings).
  • Semantic chunking uses embedding similarity between sentences, while Hierarchical chunking links small child chunks to larger parent chunks.
  • Fixed-size splits text into uniform token blocks; Hierarchical searches small child chunks but returns larger parent chunks; Semantic splits text where embedding similarity shifts.
22In Amazon SageMaker Pipelines and Model Registry, how is end-to-end MLOps governance enforced across dev, staging, and production?SageMaker Pipelines runs DAG steps (`Processing`, `Training`, `ConditionStep`) and registers passing models in Model Registry, triggering automated CodePipeline/EventBridge deployment upon approval.If a retrained churn model achieves F1 >= 0.85 in the `ConditionStep`, SageMaker Pipelines registers it in the Model Package Group, where a lead scientist switches status to `Approved` to trigger automated production deployment.
  • Combine SageMaker Pipelines (`ConditionStep` quality gates), SageMaker Model Registry (versioning + approval status), and EventBridge to automate CI/CD.
  • SageMaker Lineage Tracking automatically records trial artifacts, datasets, images, and parameters for audit reproducibility.
  • SageMaker Pipelines runs DAG steps (`Processing`, `Training`, `ConditionStep`) and registers passing models in Model Registry, triggering automated CodePipeline/EventBridge deployment upon approval.
23What is the role of Stop Sequences and Max Length (Max Tokens) when invoking an LLM on Amazon Bedrock?Stop Sequences halt token generation immediately when a specified string is emitted; Max Tokens caps output token count to control latency and cost.When prompting Claude on Amazon Bedrock to return only a JSON object, setting '</json>' as a Stop Sequence prevents the model from appending conversational commentary after the closing tag.
  • Stop Sequences halt token generation immediately when a specified string is emitted; Max Tokens caps output token count to control latency and cost.
  • Stop Sequences terminate generation as soon as a specified string is produced; Max Tokens sets a hard ceiling on output token count.
  • Control generation cost and structure by capping output length with Max Tokens and halting output at delimiter strings via Stop Sequences.
24Compare the four Amazon SageMaker inference endpoint types: Real-Time, Serverless, Asynchronous, and Batch Transform.Real-Time serves persistent low-latency traffic; Serverless scales to zero for intermittent traffic; Asynchronous queues up to 1 GB payloads; Batch Transform scores offline S3 datasets.A medical imaging pipeline processing 400 MB 3D MRI scans that take 8 minutes per inference uses a SageMaker Asynchronous Endpoint with auto-scaling down to zero instances when the queue is empty.
  • Real-Time (steady low latency), Serverless (bursty/idle traffic, 4 MB limit), Asynchronous (up to 1 GB payload & 15-60 min timeout), Batch Transform (offline S3 datasets).
  • Real-Time serves persistent low-latency traffic; Serverless scales to zero for intermittent traffic; Asynchronous queues up to 1 GB payloads; Batch Transform scores offline S3 datasets.
  • Choose Serverless Inference to save costs on spiky traffic with idle periods; choose Asynchronous Inference for large payloads (up to 1 GB) or long inference times.
25How do Blue/Green Deployments (All-at-Once, Canary, Linear) and Shadow Testing differ when updating a production SageMaker Real-Time Endpoint?Canary shifts a small initial percentage of live traffic; Linear shifts traffic in equal steps; Shadow Testing mirrors live traffic silently without returning shadow predictions.Before replacing a mission-critical pricing model, the ML team deploys the candidate model in Shadow mode for 7 days to validate latency and prediction distribution under real traffic with zero customer impact.
  • Canary shifts a small initial percentage of live traffic; Linear shifts traffic in equal steps; Shadow Testing mirrors live traffic silently without returning shadow predictions.
  • Blue/Green shifts live user responses (Canary = small initial slice; Linear = stepped slices) with automatic CloudWatch rollback; Shadow mirrors traffic silently.
  • Use Shadow Variants to test new models against live production requests without exposing end users to the candidate model's predictions.
26How do the LLM inference parameters Temperature, Top-P (Nucleus Sampling), and Top-K control Foundation Model output randomness?Lowering Temperature (toward 0), Top-P, or Top-K makes outputs deterministic and factual by restricting token selection to highest-probability tokens; raising them increases creativity and diversity.For an enterprise SQL code generator or financial compliance Q&A bot on Amazon Bedrock, set Temperature = 0.0 and Top-P = 0.1 to ensure deterministic, repeatable syntax.
  • Lowering Temperature (toward 0), Top-P, or Top-K makes outputs deterministic and factual by restricting token selection to highest-probability tokens; raising them increases creativity and diversity.
  • Temperature scales logits before softmax; Top-K limits choices to the K likeliest tokens; Top-P samples from the smallest token set whose cumulative probability >= P.
  • Use Temperature near 0 for factual/extraction tasks and higher Temperature (0.7–1.0) for creative brainstorming.
27How do you secure an Amazon SageMaker Studio domain and training jobs so no traffic traverses the public internet?Deploy SageMaker Studio in `VPCOnly` mode inside private subnets, enable container Network Isolation, and configure AWS PrivateLink VPC Endpoints for S3, ECR, and SageMaker.In a regulated banking account, configuring `VPCOnly` mode with S3 Gateway Endpoints and `com.amazonaws.<region>.sagemaker.api` Interface Endpoints ensures training jobs read encrypted S3 data (SSE-KMS) entirely over the AWS private network.
  • Use `VPCOnly` mode in private subnets with VPC Endpoints (S3, ECR, SageMaker API/Runtime, STS, Logs), IAM execution roles, and KMS encryption at rest.
  • Combine private subnets (`VPCOnly`), Security Groups, VPC Endpoints via AWS PrivateLink, and KMS volume/S3 encryption.
  • Deploy SageMaker Studio in `VPCOnly` mode inside private subnets, enable container Network Isolation, and configure AWS PrivateLink VPC Endpoints for S3, ECR, and SageMaker.
28In binary classification on the MLA-C01 exam, how are Precision, Recall (Sensitivity), F1-Score, ROC-AUC, and PR-AUC defined, and which is best for extreme class imbalance?Precision = TP/(TP+FP); Recall = TP/(TP+FN); F1 is their harmonic mean; use PR-AUC rather than ROC-AUC when positive cases are extremely rare.In cancer screening where missing a malignant tumor (False Negative) is life-threatening, optimize for high Recall; when positive cases are 0.05% of data, high True Negatives inflate ROC-AUC, so evaluate PR-AUC.
  • Precision = TP/(TP+FP), Recall = TP/(TP+FN), F1 = 2×(P×R)/(P+R); PR-AUC is preferred over ROC-AUC on heavily imbalanced datasets.
  • Maximize Recall to minimize False Negatives (disease/fraud detection); maximize Precision to minimize False Positives (spam filter).
  • Precision = TP/(TP+FP); Recall = TP/(TP+FN); F1 is their harmonic mean; use PR-AUC rather than ROC-AUC when positive cases are extremely rare.
29For regression models, how do RMSE (Root Mean Squared Error), MAE (Mean Absolute Error), and MAPE (Mean Absolute Percentage Error) differ in sensitivity to outliers?RMSE squares errors and heavily penalizes large outliers; MAE averages absolute errors linearly (robust to outliers); MAPE measures relative percentage error.When forecasting house prices where a few $50M mansions skew squared errors, MAE provides a robust median-aligned error metric, whereas RMSE is chosen when large prediction errors are disproportionately costly.
  • RMSE penalizes large outlier errors heavily due to squaring; MAE weights all errors linearly and is robust to outliers.
  • RMSE squares errors and heavily penalizes large outliers; MAE averages absolute errors linearly (robust to outliers); MAPE measures relative percentage error.
  • Choose RMSE when large errors are catastrophic; choose MAE when outliers should not dominate model evaluation.
30What are the differences between Zero-Shot, Few-Shot, Chain-of-Thought (CoT), and Prompt Injection/Jailbreaking in LLM prompt engineering?Zero-Shot gives instructions without examples; Few-Shot includes input-output examples; Chain-of-Thought prompts step-by-step reasoning; Prompt Injection hijacks system instructions via untrusted input.Adding three labeled sentiment examples before the target review is Few-Shot prompting; appending 'Think step-by-step before calculating the tax liability' invokes Chain-of-Thought reasoning.
  • Zero-Shot gives instructions without examples; Few-Shot includes input-output examples; Chain-of-Thought prompts step-by-step reasoning; Prompt Injection hijacks system instructions via untrusted input.
  • Zero-Shot (no examples), Few-Shot (in-context examples), Chain-of-Thought (step-by-step reasoning), and Prompt Injection (malicious instruction override).
  • Protect against Prompt Injection using Guardrails for Amazon Bedrock Prompt Attack filters and strict system-prompt delimiters.
31How do you prevent Overfitting vs. Underfitting when tuning hyperparameters in Amazon SageMaker Automatic Model Tuning (AMT)?Reduce Overfitting using L1/L2 regularization, dropout, early stopping, or shallower trees (`max_depth`); fix Underfitting by increasing model capacity, features, or training epochs.When an XGBoost job shows 99% training accuracy but 68% validation accuracy, the ML engineer decreases `max_depth`, increases `subsample` / `eta` regularization (`alpha`, `lambda`), and enables early stopping in SageMaker AMT.
  • Fix Overfitting with L1/L2 regularization, dropout, data augmentation, early stopping, or shallower trees; fix Underfitting with deeper models and more features.
  • SageMaker AMT uses Bayesian Optimization or Hyperband (faster early-stopping for iterative neural networks) to search hyperparameter ranges.
  • Reduce Overfitting using L1/L2 regularization, dropout, early stopping, or shallower trees (`max_depth`); fix Underfitting by increasing model capacity, features, or training epochs.
32How does Multi-Model Endpoints (MME) differ from Multi-Container Endpoints (MCE) in Amazon SageMaker cost optimization?Multi-Model Endpoints dynamically load/unload thousands of homogeneous models from S3 onto shared instances; Multi-Container Endpoints run up to 15 distinct containers per instance.A SaaS company serving 2,000 tenant-specific XGBoost models where only 5% are invoked in any given minute uses a SageMaker Multi-Model Endpoint to cut instance costs by 90%.
  • Multi-Model Endpoints dynamically load/unload thousands of homogeneous models from S3 onto shared instances; Multi-Container Endpoints run up to 15 distinct containers per instance.
  • MME dynamically caches thousands of homogeneous models from S3 on shared instances; MCE hosts up to 15 heterogeneous framework containers with direct invocation or serial inference pipelines.
  • Use Multi-Model Endpoints (MME) when serving many similar models with variable invocation patterns from a shared container.