Curated

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

0 votes

Questions72

  1. Question 51

    ML Model and Foundation Model (FM) Development

    Which AWS service integrates human review into an ML prediction workflow?

    Show the answer

    Correct answerB. Amazon Augmented AI

    AWhy not this: SageMaker Clarify supports bias analysis and model explanations, rather than human review orchestration.

    BWhy this is right: Amazon Augmented AI supports integrating human review of ML predictions into application workflows.

    CWhy not this: SageMaker Ground Truth primarily supports data labeling for creating training and evaluation datasets.

    DWhy not this: SageMaker Model Monitor detects production data and model-quality issues, rather than routing predictions to reviewers.

    Amazon Augmented AI provides human review workflows for ML predictions. SageMaker Ground Truth primarily supports building labeled datasets rather than integrating review of predictions into an application workflow.

    Open this question
  2. Question 52

    ML Model and Foundation Model (FM) Development

    Only 0.2% of transactions are fraudulent. An engineer wants to compare classifiers across thresholds while emphasizing fraud detection and the reliability of fraud alerts; which metric is MOST appropriate?

    Show the answer

    Correct answerD. Area under the precision-recall curve

    AWhy not this: ROC AUC includes false-positive rate, which can remain small despite many false alerts when negatives greatly outnumber positives.

    BWhy not this: Mean absolute error is not the appropriate summary of the precision-recall trade-off for binary fraud alerts.

    CWhy not this: Accuracy is dominated by legitimate transactions and can be high even when the classifier misses most fraud.

    DWhy this is right: Precision measures alert reliability, and recall measures fraud detection; their curve compares these across thresholds.

    The precision-recall curve evaluates the trade-off between finding fraud and keeping fraud alerts reliable across thresholds. ROC AUC can appear strong on highly imbalanced data even when the volume of false alerts makes precision poor.

    Open this question
  3. Question 53

    ML Model and Foundation Model (FM) Development

    A demand model predicts next month's sales using features available at prediction time. Random cross-validation performs well, but sales patterns change seasonally; which evaluation BEST estimates future performance?

    Show the answer

    Correct answerA. Use chronological folds with training preceding each validation period.

    AWhy this is right: Training on earlier periods and validating on later periods simulates forecasting under changing seasonal patterns.

    BWhy not this: Preserving the sales distribution does not preserve the temporal separation required for forecasting.

    CWhy not this: Mixing months across folds allows future patterns into training rather than testing generalization to later periods.

    DWhy not this: Resampling the full history mixes time periods and does not simulate predictions made before future observations exist.

    Chronological validation evaluates predictions on later periods using only earlier training data, matching deployment. Balancing months across random folds mixes past and future patterns and can give an optimistic estimate.

    Open this question
  4. Question 54

    ML Model and Foundation Model (FM) Development

    An accounts-payable team receives scanned invoices with widely varying layouts. It needs standardized vendor and total fields plus grouped line items without building template-specific mappings; which approach BEST meets these requirements?

    Show the answer

    Correct answerA. Use Amazon Textract AnalyzeExpense.

    AWhy this is right: Expense analysis extracts standardized invoice summary fields and groups related line-item information.

    BWhy not this: Image text detection does not provide invoice-specific field normalization or grouped expense line items.

    CWhy not this: Table extraction preserves cell relationships but does not supply expense-specific standardized summary fields.

    DWhy not this: Basic OCR returns detected text and geometry rather than normalized invoice fields and line-item groups.

    Amazon Textract AnalyzeExpense provides expense-specific extraction, including standardized summary fields and line-item groups. AnalyzeDocument with TABLES extracts table structure but does not provide the same expense-specific field normalization.

    Open this question
  5. Question 55

    ML Model and Foundation Model (FM) Development

    An Amazon Bedrock assistant produces unnecessarily long answers that increase response time and output-token charges. Testing shows that concise answers preserve task accuracy; which change BEST addresses both problems?

    Show the answer

    Correct answerB. Request concise answers and lower the output-token limit.

    AWhy not this: Streaming makes tokens visible sooner but does not itself reduce answer length or output-token charges.

    BWhy this is right: Shorter validated answers require fewer output tokens, reducing generation time and token-based charges.

    CWhy not this: More input context adds processing and input-token charges without addressing unnecessary output.

    DWhy not this: Provisioned capacity changes capacity allocation and pricing, not the number of tokens generated per answer.

    Requesting concise answers and lowering the output-token limit reduces generation work and output-token charges while preserving the validated quality. Streaming improves time to the first visible token but does not itself reduce total generated tokens.

    Open this question
  6. Question 56

    ML Model and Foundation Model (FM) Development

    A manufacturer must extract proprietary component names and failure codes from scanned maintenance narratives, returning each mention's character offsets in the extracted text. It has labeled examples, prohibits generative models, and wants managed extraction without maintaining a custom model endpoint; which approach BEST fits?

    Show the answer

    Correct answerD. Use Textract OCR, then Comprehend custom entity recognition in batch.

    AWhy not this: Custom classification labels documents but does not locate individual component and failure-code mentions.

    BWhy not this: Custom token classification could extract mentions but requires more custom model development and operation.

    CWhy not this: Built-in entity types do not learn the manufacturer's proprietary component and failure-code categories from labeled examples.

    DWhy this is right: OCR supplies text, custom entities capture proprietary types, and batch inference avoids a maintained real-time endpoint.

    Textract supplies text from scans, and Comprehend custom entity recognition learns proprietary entity types and returns mention offsets. Asynchronous batch inference avoids maintaining a real-time endpoint. Custom classification assigns document labels rather than locating entity mentions.

    Open this question
  7. Question 57

    ML Model and Foundation Model (FM) Development

    A company needs transcripts that distinguish speakers in recorded interviews containing several people on a single audio channel. Which Amazon Transcribe capability should it use?

    Show the answer

    Correct answerB. Speaker partitioning

    AWhy not this: Language identification determines the spoken language rather than labeling different speakers.

    BWhy this is right: Speaker partitioning assigns speaker labels to speech segments within the same audio channel.

    CWhy not this: A custom vocabulary improves recognition of specified words rather than separating speakers.

    DWhy not this: Channel identification separates audio by channel rather than distinguishing speakers sharing one channel.

    Speaker partitioning distinguishes speakers within an audio channel and labels their speech segments. Channel identification distinguishes audio channels, so it cannot separate people who share a single channel.

    Open this question
  8. Question 58

    ML Model and Foundation Model (FM) Development

    What is a typical tradeoff when quantizing an AI model's weights to lower precision for inference?

    Show the answer

    Correct answerC. Lower memory use, with possible accuracy loss

    AWhy not this: Quantization changes numerical representation, not the number of tokens in an answer.

    BWhy not this: Weight quantization for inference does not add parameters or inherently accelerate model training.

    CWhy this is right: Lower-precision weights occupy less memory, but rounding and reduced numerical range can affect accuracy.

    DWhy not this: Weight precision does not determine context-window capacity, and reduced precision can hurt accuracy.

    Quantization represents weights at lower numerical precision, reducing memory requirements and potentially inference cost, but it can reduce accuracy. It does not inherently expand the model's context window or improve accuracy.

    Open this question
  9. Question 59

    ML Model and Foundation Model (FM) Development

    A team has 30,000 approved input-output examples for a stable response style, but few-shot prompts exceed its input-token budget. It must customize a supported foundation model with limited GPU memory and maintain separate task-specific adaptations; which approach BEST fits?

    Show the answer

    Correct answerA. Train and store a separate LoRA adapter for each task

    AWhy this is right: LoRA supports supervised adaptation with fewer trainable parameters and small, separately stored task adapters.

    BWhy not this: Continued pre-training learns from unlabeled text rather than directly learning the approved input-output behavior.

    CWhy not this: Full fine-tuning uses more training memory and requires storing a complete set of model weights for each task.

    DWhy not this: Adding retrieved examples consumes prompt tokens, conflicting with the stated input-token budget.

    LoRA learns small task-specific adapters while keeping base weights frozen, reducing trainable parameters and adaptation storage. Full fine-tuning can learn the style but requires more training memory and separate full-model weights.

    Open this question
  10. Question 60

    ML Model and Foundation Model (FM) Development

    Which prompt-engineering technique provides several example inputs and desired outputs in the prompt without changing model weights?

    Show the answer

    Correct answerD. Few-shot prompting

    AWhy not this: Zero-shot prompting provides instructions without example demonstrations.

    BWhy not this: Supervised fine-tuning updates model weights using labeled input-output examples.

    CWhy not this: Continued pre-training updates model weights using additional training text.

    DWhy this is right: Few-shot prompting supplies example inputs and outputs as inference-time context without updating weights.

    Few-shot prompting demonstrates the desired behavior through examples included in the prompt. Supervised fine-tuning also uses input-output examples, but updates model weights instead of supplying examples only at inference time.

    Open this question
  11. Question 61

    ML Model and Foundation Model (FM) Development

    A support assistant's vector search finds conceptual matches but misses documents containing exact product error codes. Users search with both error codes and natural-language descriptions; which retrieval change BEST supports both?

    Show the answer

    Correct answerD. Combine keyword and vector search with result fusion

    AWhy not this: Keyword-only retrieval helps exact codes but can miss semantically relevant descriptions with different wording.

    BWhy not this: Output-token limits affect answer length, not which source documents are retrieved.

    CWhy not this: Chunk overlap preserves boundary context but does not directly address the lack of lexical matching.

    DWhy this is right: Hybrid retrieval preserves semantic matches while adding lexical matching for exact identifiers.

    Hybrid search combines keyword matching for exact error codes with vector matching for semantic descriptions. Keyword-only search helps with codes but sacrifices the semantic matching needed for natural-language queries.

    Open this question
  12. Question 62

    ML Model and Foundation Model (FM) Development

    A RAG application stores 1,024-dimension vectors from Amazon Titan Text Embeddings V2. Vector storage and memory costs are too high, and tests show a small recall loss is acceptable. Which change BEST cuts the index size?

    Show the answer

    Correct answerA. Re-embed the documents at 256 dimensions and rebuild the index

    AWhy this is right: Fewer dimensions per vector shrink the index directly, with a small and measurable loss in recall.

    BWhy not this: Smaller chunks produce more vectors, which makes the index larger, not smaller.

    CWhy not this: Returning more neighbors changes retrieval depth but leaves the stored vectors the same size.

    DWhy not this: Higher-dimension vectors take more storage and memory, the opposite of the goal.

    Titan Text Embeddings V2 can output 256, 512 or 1,024 dimensions, and smaller vectors cut storage and memory roughly in proportion at a modest recall cost. The documents must be re-embedded at the new size so that query and document vectors still match.

    Open this question
  13. Question 63

    ML Model and Foundation Model (FM) Development

    Evaluation shows that a retriever's top 50 chunks usually contain the answer, but its top five often do not. The generator can accept only five chunks, and latency permits an additional relevance-scoring pass; which change BEST addresses the failure?

    Show the answer

    Correct answerC. Rerank 50 candidates and pass the highest-scoring five

    AWhy not this: Longer outputs do not improve the relevance of the five chunks supplied as evidence.

    BWhy not this: A larger candidate pool without improved ordering does not address poor relevance among the first five results.

    CWhy this is right: Reranking scores query-chunk relevance to select better evidence from the high-recall candidate set.

    DWhy not this: Generator fine-tuning does not directly correct the retriever's ordering of source chunks.

    Reranking improves the ordering of an already useful candidate set, placing relevant chunks within the five-chunk context budget. Retrieving more candidates without changing their ranking does not resolve the observed top-five relevance problem.

    Open this question
  14. Question 64

    ML Model and Foundation Model (FM) Development

    A team evaluates generated answers against reference answers that often express the same meaning using different words. Which metric BEST captures this similarity through contextual token embeddings?

    Show the answer

    Correct answerB. BERTScore

    AWhy not this: Exact match rejects wording differences even when the answers convey the same meaning.

    BWhy this is right: BERTScore uses contextual token embeddings to compare generated text with reference text.

    CWhy not this: Perplexity measures how well a model predicts text, not similarity to a reference answer.

    DWhy not this: BLEU primarily measures modified n-gram precision rather than contextual embedding similarity.

    BERTScore compares contextual token embeddings, allowing semantically similar wording to receive credit. BLEU primarily measures n-gram overlap and can penalize valid paraphrases.

    Open this question
  15. Question 65

    ML Model and Foundation Model (FM) Development

    Which metric measures the fraction of reference-summary unigrams that also appear in a generated summary?

    Show the answer

    Correct answerC. ROUGE-1 recall

    AWhy not this: BLEU-1 precision measures matched unigrams relative to generated unigrams, not reference unigrams.

    BWhy not this: Distinct-1 measures unique unigrams relative to generated tokens, not reference coverage.

    CWhy this is right: ROUGE-1 recall measures how much of the reference's unigram content the generated summary covers.

    DWhy not this: Token-level accuracy typically requires agreement at corresponding token positions.

    ROUGE-1 recall measures unigram overlap relative to the reference summary's unigram count. BLEU-1 precision instead uses the generated text's unigram count as its precision denominator.

    Open this question
  16. Question 66

    ML Model and Foundation Model (FM) Development

    A team must send high-risk generated answers for human approval and estimate the error rate across all generated answers. Which workflow features support these goals while preserving review traceability? (Choose three.)

    Choose 3 answers

    Show the answer

    Correct answersB. Route answers flagged as high risk to reviewers before release.D. Audit a random sample of unflagged answers and weight results by sampling rates.E. Record reviewer decisions with the associated answer and model version.

    AWhy not this: Input drift monitoring does not establish whether generated answers contain errors.

    BWhy this is right: Human review before release provides the required approval for answers identified as high risk.

    CWhy not this: Model confidence does not supply the required human approval and may be poorly calibrated.

    DWhy this is right: Random sampling covers unflagged answers, and sampling weights account for unequal review probabilities.

    EWhy this is right: Linking decisions to answers and model versions enables review audits and investigation.

    FWhy not this: High-risk answers are a selected population; their error rate does not represent all generated answers.

    Risk-based routing provides approval, probability sampling supports an overall error estimate, and linked review records preserve traceability. High-risk reviews alone produce a selected sample that cannot represent all answers.

    Open this question
  17. Question 67

    ML Model and Foundation Model (FM) Development

    An LLM judge prefers whichever candidate answer appears first, even when the same answer pair is reversed. Which change BEST addresses this bias before using judge scores to rank models?

    Show the answer

    Correct answerD. Judge both answer orders and route inconsistent preferences for human review.

    Evaluating both orders exposes position-dependent preferences, and human review resolves inconsistent judgments. Repeating evaluations with a fixed order can reproduce the same systematic bias rather than remove it.

    Open this question
  18. Question 68

    ML Model and Foundation Model (FM) Development

    Which RAG monitoring measure checks whether generated claims are supported by the retrieved context?

    Show the answer

    Correct answerD. Faithfulness

    AWhy not this: Answer relevance measures how well the response addresses the query rather than its support in retrieved context.

    BWhy not this: Context relevance evaluates whether retrieved material relates to the query, not whether generated claims are supported.

    CWhy not this: Retrieval latency measures retrieval duration rather than evidential support for claims.

    DWhy this is right: Faithfulness evaluates whether generated claims are supported by the supplied context.

    Faithfulness assesses whether generated claims are supported by retrieved context. Answer relevance assesses whether an answer addresses the user's request, which does not establish evidential support.

    Open this question
  19. Question 69

    ML Model and Foundation Model (FM) Development

    After a reranker update, a RAG system retrieves the same ten documents per query but places highly useful evidence below marginally relevant passages. With graded relevance labels available, which metric should the team monitor to detect this regression?

    Show the answer

    Correct answerB. Normalized discounted cumulative gain at 10

    AWhy not this: Precision remains unchanged when the same documents occupy the retrieval window.

    BWhy this is right: NDCG rewards highly relevant documents near the top and captures regressions involving graded relevance.

    CWhy not this: Recall remains unchanged when the retrieved document set stays the same, regardless of ordering.

    DWhy not this: Reciprocal rank tracks the first relevant result but does not distinguish graded usefulness throughout the ranking.

    NDCG@10 uses graded relevance and rank discounts to detect highly useful evidence moving downward. Recall@10 and precision@10 remain unchanged for the same result set; reciprocal rank considers only the first relevant result.

    Open this question
  20. Question 70

    ML Model and Foundation Model (FM) Development

    A RAG team has evaluation queries with complete sets of relevant document IDs. It needs to monitor how much relevant evidence is missed among the five retrieved documents per query; which metric BEST fits?

    Show the answer

    Correct answerB. Recall@5

    AWhy not this: Mean reciprocal rank considers the first relevant result rather than coverage of the relevant document set.

    BWhy this is right: Recall measures the fraction of the known relevant document set recovered within the retrieval cutoff.

    CWhy not this: Precision measures the relevant fraction of retrieved results rather than coverage of all relevant documents.

    DWhy not this: Answer similarity evaluates generated text rather than whether retrieval recovered the relevant documents.

    Recall@5 measures the fraction of known relevant documents found in the five retrieved results. Precision@5 measures how many retrieved documents are relevant, not how much of the relevant evidence was recovered.

    Open this question
  21. Question 71

    ML Model and Foundation Model (FM) Development

    A team suspects that a GenAI hiring assistant gives different recommendations when applicants have equivalent qualifications but different demographic identities. Which evaluation BEST isolates this potential bias?

    Show the answer

    Correct answerC. Compare recommendations for matched profiles that vary only demographic cues.

    AWhy not this: Differences in qualifications between unrelated samples can confound the comparison.

    BWhy not this: Training representation can reveal data imbalance but does not directly establish bias in generated recommendations.

    CWhy this is right: Holding qualifications fixed isolates the effect of demographic cues on recommendations.

    DWhy not this: Semantic similarity measures resemblance to references, not differential treatment across demographic identities.

    Matched profiles isolate whether demographic cues affect recommendations while qualifications remain fixed. Comparing unrelated applicant samples can confound demographic effects with differences in qualifications.

    Open this question
  22. Question 72

    ML Model and Foundation Model (FM) Development

    An LLM judge favors whichever candidate response appears first, and agreement with expert ratings is lower for medical answers than general answers. With expert review limited to a small sample, which evaluation design BEST supports a trustworthy comparison?

    Show the answer

    Correct answerC. Evaluate both response orders and validate against expert ratings stratified by subject.

    AWhy not this: Randomization addresses ordering effects but repeated judgments do not validate medical evaluation quality.

    BWhy not this: Fixed ordering retains position bias, and aggregate calibration can hide subject-specific disagreement.

    CWhy this is right: Order reversal addresses position effects, and stratified expert validation checks reliability within each subject.

    DWhy not this: Separate judges can have different scoring behavior; combining uncalibrated scores does not establish comparability.

    Evaluating both orders reduces position effects, while subject-stratified expert validation exposes domain-specific judge errors. Randomizing order alone does not establish that the judge evaluates medical answers reliably.

    Open this question