Courseiva

CCNA Applications of Foundation Models Questions

23 of 98 questions · Page 2/2 · Applications of Foundation Models · Answers revealed

76
MCQmedium

A company is using Amazon Bedrock to generate images from text prompts. They need to ensure the generated images do not contain offensive content. Which feature should be enabled?

A.VPC endpoints
B.AWS WAF
C.Content moderation with AI
D.IAM policies
AnswerC

Bedrock's content moderation uses AI to detect and block offensive content.

Why this answer

Amazon Bedrock's content moderation with AI feature allows you to filter generated images for offensive or inappropriate content by applying predefined or custom moderation policies. This is the correct choice because it directly addresses the requirement to ensure generated images do not contain offensive material, leveraging machine learning models to detect and block such content at inference time.

Exam trap

The trap here is that candidates may confuse network-level or access-control services (like VPC endpoints, WAF, or IAM policies) with content-level filtering, assuming they can be repurposed for moderation, but only Bedrock's built-in content moderation feature directly analyzes and filters generated image content.

How to eliminate wrong answers

Option A is wrong because VPC endpoints are used to privately connect your VPC to AWS services without traversing the public internet, and they do not provide any content filtering or moderation capabilities for generated images. Option B is wrong because AWS WAF is a web application firewall that protects web applications from common exploits like SQL injection and cross-site scripting, but it operates at the HTTP/HTTPS request layer and cannot inspect or moderate the content of images generated by Bedrock. Option D is wrong because IAM policies control access permissions to AWS resources, such as who can invoke Bedrock models, but they do not inspect or filter the actual content of generated outputs.

77
MCQhard

An organization uses SageMaker JumpStart to deploy a foundation model for real-time inference. They observe high latency. What is the most effective way to reduce latency?

A.Compile the model with SageMaker Neo
B.Use a larger instance with more memory
C.Use batch transform instead
D.Enable SageMaker Inference Recommender
AnswerA

Neo compiles models for faster inference on specific hardware.

Why this answer

SageMaker Neo compiles the model to optimize it for the target hardware, reducing inference latency by applying hardware-specific optimizations such as kernel fusion, quantization, and memory layout tuning. This directly addresses the high latency issue for real-time inference without changing the instance type or inference mode.

Exam trap

AWS often tests the misconception that increasing instance size or switching to batch processing is the primary solution for latency, when in fact model compilation with SageMaker Neo is the most direct and cost-effective optimization for real-time inference.

How to eliminate wrong answers

Option B is wrong because using a larger instance with more memory may reduce latency due to increased compute capacity, but it is less effective and more costly than model compilation, which optimizes the model itself for the existing hardware. Option C is wrong because batch transform is designed for offline, asynchronous inference on large datasets, not for real-time inference, and it would not reduce latency for a real-time endpoint. Option D is wrong because SageMaker Inference Recommender helps select the optimal instance type and configuration for a given model, but it does not directly reduce latency; it recommends deployment parameters, whereas compilation actively optimizes the model.

78
Multi-Selecthard

Which THREE are benefits of using Amazon Bedrock over self-managing foundation models on EC2? (Choose THREE.)

Select 3 answers
A.Built-in integration with AWS services such as AWS CloudWatch and AWS CloudTrail.
B.Lower data transfer costs between cloud regions.
C.Access to a curated set of foundation models from different providers.
D.Managed infrastructure for model hosting and scaling.
E.Greater control over model fine-tuning and customization.
AnswersA, C, D

Bedrock natively logs to CloudWatch and CloudTrail for monitoring and auditing.

Why this answer

Amazon Bedrock provides built-in integration with AWS services like CloudWatch for monitoring model invocation metrics and CloudTrail for auditing API calls. This eliminates the need to manually set up logging and monitoring infrastructure when self-managing foundation models on EC2, where you would have to configure these integrations yourself.

Exam trap

The trap here is that candidates may confuse 'managed infrastructure' with 'greater control'—Bedrock simplifies operations but reduces customization flexibility, so option E is a common distractor for those who think managed services offer more control than self-managed solutions.

79
MCQmedium

A financial services company is deploying a foundation model to analyze customer sentiment from call transcripts. The model outputs must be consistent and deterministic for auditing purposes. Which parameter configuration should the company use?

A.Set temperature to 0.1 and top_p to 0.9.
B.Set temperature to 0.7 and top_p to 1.0.
C.Set temperature to 0.5 and top_p to 0.5.
D.Set temperature to 0 and top_p to 1.
AnswerD

Temperature 0 makes the model deterministic.

Why this answer

Setting temperature to 0 and top_p to 1 forces the model to always select the highest-probability token at each step, producing deterministic and repeatable outputs. This is essential for auditing and compliance in financial services, where consistency is required. Any nonzero temperature introduces randomness, which undermines determinism.

Exam trap

AWS often tests the misconception that low temperature (e.g., 0.1) is 'deterministic enough,' but only temperature exactly 0 guarantees deterministic outputs, and top_p must be 1 to avoid interfering with the argmax selection.

How to eliminate wrong answers

Option A is wrong because temperature 0.1 still introduces slight randomness, making outputs non-deterministic and unsuitable for auditing. Option B is wrong because temperature 0.7 introduces significant randomness, and top_p 1.0 does not constrain it, leading to high variability. Option C is wrong because temperature 0.5 introduces randomness, and top_p 0.5 further restricts token sampling but does not eliminate the stochastic behavior from the nonzero temperature.

80
MCQhard

Refer to the exhibit. A developer sees this error when calling Amazon Bedrock for inference. What is the MOST likely cause and recommended solution?

A.The model ID is incorrect; use a different model
B.The prompt is too long; reduce the number of tokens in the prompt
C.The request rate exceeds the model's throughput limit; implement retries with exponential backoff
D.Increase the max_tokens_to_sample value
AnswerC

Throttling is due to rate limits; exponential backoff handles it.

Why this answer

The error indicates a throttling exception from Amazon Bedrock, which occurs when the request rate exceeds the model's throughput limit. The recommended solution is to implement retries with exponential backoff to handle transient rate limits gracefully, as this aligns with AWS best practices for managing API call limits.

Exam trap

The trap here is that candidates may confuse a throttling error with a model ID or prompt length issue, because the error message may not explicitly state 'throttling' and instead show a generic 'ServiceUnavailable' or 'TooManyRequests' response, leading them to incorrectly modify the model or prompt instead of implementing retry logic.

How to eliminate wrong answers

Option A is wrong because a model ID error would produce a different error (e.g., 'ValidationException' or 'ResourceNotFoundException'), not a throttling-related error. Option B is wrong because a prompt that is too long would cause a 'ValidationException' regarding token limits, not a throttling error. Option D is wrong because increasing max_tokens_to_sample would increase the output length, potentially worsening throttling or causing a different error, but it does not address the rate limit issue.

81
MCQhard

A research team is using Amazon Bedrock to analyze scientific papers. They want the model to generate answers based only on papers published after 2023. Which approach should they use?

A.Fine-tune the model on a dataset of post-2023 papers and deploy it.
B.Set the maxTokens to a low value to force the model to rely on recent context.
C.Include a system prompt instructing the model to ignore data before 2023.
D.Use Amazon Bedrock Knowledge Bases with a metadata filter to retrieve only papers published after 2023, and generate responses based on retrieved content.
AnswerD

Metadata filtering ensures only relevant recent documents are used, grounding the model in current data.

Why this answer

Amazon Bedrock Knowledge Bases with a metadata filter allows you to restrict retrieval to only documents that match specific metadata criteria, such as publication year. By filtering the vector search to only include papers published after 2023, the model generates responses based solely on that retrieved content, ensuring it does not rely on pre-2023 data. This approach is the only one that guarantees the model's answers are grounded exclusively in the specified time range.

Exam trap

AWS often tests the misconception that a system prompt or fine-tuning can reliably restrict a model's knowledge to a specific time period, when in fact only a retrieval-based approach with metadata filtering can enforce such temporal constraints.

How to eliminate wrong answers

Option A is wrong because fine-tuning the model on a dataset of post-2023 papers does not prevent the model from using its pre-existing training data (which includes pre-2023 knowledge) during inference; fine-tuning adjusts weights but does not erase prior knowledge, so the model could still generate answers based on older information. Option B is wrong because setting maxTokens to a low value limits the length of the generated response but does not control the temporal scope of the model's knowledge; the model can still draw on pre-2023 training data regardless of token count. Option C is wrong because a system prompt instructing the model to ignore data before 2023 is merely a suggestion and not a technical enforcement; the model has no inherent mechanism to filter its own training data by date, so it may still generate answers based on pre-2023 information, especially if the prompt is not strictly followed.

82
MCQeasy

A data science team is fine-tuning a Llama 2 7B model on Amazon SageMaker for a text classification task. After the first training run, they notice the loss is not decreasing and the model is overfitting to the small training set. What should the team change to mitigate overfitting?

A.Add dropout layers and reduce the learning rate.
B.Increase the number of epochs to allow the model to learn more patterns.
C.Increase the batch size and use gradient accumulation.
D.Remove dropout layers from the model architecture.
AnswerA

Dropout randomly drops neurons to prevent co-adaptation, and a lower learning rate helps stabilize training, both reducing overfitting.

Why this answer

Adding dropout layers introduces regularization by randomly dropping neurons during training, which prevents the model from relying too heavily on specific features and reduces overfitting. Reducing the learning rate helps the model converge more smoothly and avoid oscillating around a suboptimal minimum, which is especially important when fine-tuning a large model like Llama 2 7B on a small dataset. Together, these changes address the core issues of overfitting and non-decreasing loss.

Exam trap

The trap here is that candidates may mistakenly think increasing epochs or batch size helps with overfitting, when in fact these changes often worsen it by allowing the model to memorize the training data more thoroughly.

How to eliminate wrong answers

Option B is wrong because increasing the number of epochs would allow the model to see the small training set more times, which exacerbates overfitting rather than mitigating it. Option C is wrong because increasing the batch size and using gradient accumulation primarily affect training speed and memory usage, not regularization; they do not directly address overfitting and may even lead to sharper minima, worsening generalization. Option D is wrong because removing dropout layers would reduce regularization, making overfitting worse, not better.

83
MCQmedium

A company uses Amazon Bedrock to generate marketing copy. They want to measure the quality of generated text compared to reference text. Which metric is most appropriate?

A.F1 score
B.BLEU
C.RMSE
D.Accuracy
AnswerB

BLEU calculates n-gram overlap between candidate and reference text, suitable for generation evaluation.

Why this answer

BLEU (Bilingual Evaluation Understudy) is the most appropriate metric for evaluating the quality of generated text against reference text in tasks like machine translation and text generation. It measures n-gram precision between the generated and reference texts, making it ideal for assessing marketing copy generated by Amazon Bedrock.

Exam trap

AWS often tests the distinction between classification/regression metrics and text generation metrics, leading candidates to mistakenly apply F1 score or accuracy to evaluate generated text quality instead of using BLEU or similar sequence-based metrics.

How to eliminate wrong answers

Option A is wrong because F1 score is a classification metric that measures harmonic mean of precision and recall, not suitable for evaluating text generation quality against reference text. Option C is wrong because RMSE (Root Mean Square Error) is a regression metric used for continuous numerical predictions, not for text or sequence evaluation. Option D is wrong because Accuracy is a classification metric that measures the proportion of correct predictions, which does not account for the sequential and linguistic nuances of generated text.

84
MCQmedium

A company is developing a chatbot using Amazon Bedrock and wants to ensure the model's responses do not include toxic or biased language. The company has a labeled dataset of undesirable responses. Which approach should be used to fine-tune the foundation model to reduce harmful outputs?

A.Use reinforcement learning from human feedback (RLHF) with a reward model trained on human preferences.
B.Perform supervised fine-tuning on a curated dataset of safe responses.
C.Use prompt engineering to instruct the model to avoid toxic language.
D.Implement adversarial validation by testing against toxic inputs.
AnswerA

RLHF uses human feedback to train a reward model, which then guides the base model to generate safer outputs.

Why this answer

Reinforcement learning from human feedback (RLHF) is the correct approach because it directly optimizes the model to avoid toxic or biased outputs by training a reward model on human-labeled preferences. The reward model scores the model's responses, and the foundation model is fine-tuned via reinforcement learning to maximize these scores, effectively reducing harmful language. This method is specifically designed to align model behavior with nuanced human values, such as avoiding toxicity, which supervised fine-tuning alone cannot guarantee.

Exam trap

The AIF-C01 exam often tests the misconception that supervised fine-tuning or prompt engineering alone can reliably eliminate harmful outputs, when in fact RLHF is required to align the model with nuanced human preferences through iterative feedback.

How to eliminate wrong answers

Option B is wrong because supervised fine-tuning on a curated dataset of safe responses teaches the model to mimic safe patterns but does not explicitly penalize toxic outputs during generation; it lacks a reward signal to discourage harmful language when the model deviates from the training distribution. Option C is wrong because prompt engineering is a static, instruction-based technique that can be easily bypassed by adversarial inputs or subtle variations in phrasing; it does not modify the model's internal weights to reliably avoid toxic language. Option D is wrong because adversarial validation only tests the model's robustness to toxic inputs without fine-tuning the model itself; it identifies vulnerabilities but does not reduce harmful outputs in production.

85
MCQeasy

A company wants to use a foundation model to automatically summarize lengthy documents. Which capability of foundation models is being utilized?

A.Text generation
B.Sentiment analysis
C.Text classification
D.Machine translation
AnswerA

Summarization is a form of text generation where the model produces concise output.

Why this answer

Summarization is a text generation task where the model produces a concise version of the original content. Foundation models (e.g., GPT, Claude) are pre-trained on vast corpora and can generate coherent summaries by predicting the next tokens conditioned on the input document. This directly utilizes the text generation capability, not classification or translation.

Exam trap

The AIF-C01 exam often tests the distinction between text generation and text classification, so the trap here is that candidates may confuse summarization (a generative task) with classification or analysis tasks, especially when the question emphasizes 'understanding' the document rather than 'producing' new text.

How to eliminate wrong answers

Option B (Sentiment analysis) is wrong because it involves classifying the emotional tone of text (positive, negative, neutral), not generating a summary. Option C (Text classification) is wrong because it assigns predefined labels or categories to text, whereas summarization requires generating new text. Option D (Machine translation) is wrong because it converts text from one language to another, not condensing content within the same language.

86
MCQmedium

A company uses Amazon Bedrock to generate code snippets for internal tools. They notice that the generated code often contains security vulnerabilities such as SQL injection and cross-site scripting. The security team has compiled a comprehensive list of secure coding guidelines and examples of vulnerable patterns. The development team wants to reduce vulnerabilities without significantly slowing down the code generation process. They have tried adding the guidelines to the system prompt, but the model still produces insecure code occasionally. The team is considering additional measures. Which action should they take to most effectively eliminate security vulnerabilities in the generated code?

A.Implement a post-processing step using Amazon CodeGuru or a similar static analysis tool to scan the generated code for vulnerabilities and reject or fix insecure code.
B.Use a larger, more expensive foundation model that specializes in code generation.
C.Include the complete secure coding guidelines in every prompt.
D.Increase the temperature parameter of the foundation model to promote more diverse outputs.
AnswerA

Correct: Post-processing with static analysis reliably catches vulnerabilities and can be automated without slowing down generation significantly.

Why this answer

It introduces a deterministic, post-generation validation layer that catches vulnerabilities the model might miss. Amazon CodeGuru Reviewer or similar static analysis tools can scan generated code for patterns like SQL injection and XSS, then reject or fix insecure code without modifying the generation process itself. This approach directly addresses the security team's guidelines while maintaining generation speed, as the model's inference latency is unaffected.

Exam trap

AWS often tests the misconception that prompt engineering alone can fully control model output, when in reality, deterministic post-processing steps are required to enforce strict security or compliance requirements.

How to eliminate wrong answers

Option B is wrong because using a larger, more expensive foundation model does not guarantee elimination of security vulnerabilities; all models can produce insecure code, and size does not correlate with adherence to specific security guidelines. Option C is wrong because including the complete secure coding guidelines in every prompt increases token usage and may cause the model to ignore or truncate the guidelines, leading to inconsistent results and slower generation due to longer prompts. Option D is wrong because increasing the temperature parameter promotes more diverse and random outputs, which would likely increase the probability of generating insecure code rather than reducing it.

87
MCQeasy

An e-commerce company uses a foundation model to generate personalized email subject lines. The marketing team notices that the subject lines sometimes contain product recommendations that are out of stock. Which action would best reduce the generation of out-of-stock recommendations without retraining the model?

A.Implement a post-processing step to replace out-of-stock recommendations with in-stock alternatives.
B.Fine-tune the model on a dataset of past successful subject lines that only include in-stock products.
C.Add a system prompt that explicitly instructs the model to only recommend products that are in stock.
D.Use a retrieval-augmented generation (RAG) approach to retrieve a list of in-stock products and include it in the prompt.
AnswerC

A system prompt can constrain the model's output to follow the instruction, reducing unwanted recommendations.

Why this answer

Adding a system prompt that explicitly instructs the model to only recommend in-stock products directly constrains the model's output at inference time without requiring retraining. This leverages the model's instruction-following capability to filter its generated content based on the provided context, which is a lightweight and immediate solution.

Exam trap

AWS often tests the distinction between inference-time interventions (like prompt engineering) and training-time interventions (like fine-tuning), and the trap here is that candidates may confuse RAG (which retrieves external data but does not enforce constraints) with a system prompt that directly instructs the model, leading them to select D instead of C.

How to eliminate wrong answers

Option A is wrong because post-processing replacement of out-of-stock recommendations with in-stock alternatives is reactive and may introduce irrelevant or incorrect substitutions, failing to prevent the model from generating out-of-stock items in the first place. Option B is wrong because fine-tuning the model requires retraining on a new dataset, which contradicts the question's constraint of 'without retraining the model.' Option D is wrong because while RAG can retrieve a list of in-stock products, including it in the prompt does not guarantee the model will exclusively recommend those items; the model may still generate out-of-stock recommendations from its parametric knowledge, especially if the prompt is not strictly enforced.

88
Multi-Selecthard

A data scientist is fine-tuning a foundation model on Amazon Bedrock for a custom summarization task. Which THREE practices should they follow to optimize the fine-tuning process?

Select 3 answers
A.Start with a base model that is already strong in the domain.
B.Use the default hyperparameters without tuning.
C.Use a representative dataset that reflects the target task.
D.Monitor training loss and validation loss to avoid overfitting.
E.Train for as many epochs as possible.
AnswersA, C, D

A good base model reduces training time and improves results.

Why this answer

Starting with a base model that is already strong in the domain (Option A) is correct because it reduces the amount of fine-tuning data and compute required. Amazon Bedrock provides access to various foundation models (e.g., Anthropic Claude, Amazon Titan) that have been pre-trained on diverse corpora; selecting one that is already proficient in the target domain (e.g., legal or medical summarization) means the model's existing knowledge can be adapted with fewer training steps, leading to better performance and lower risk of catastrophic forgetting.

Exam trap

The AIF-C01 exam often tests the misconception that more epochs always improve model performance, when in fact excessive training leads to overfitting, and they expect candidates to recognize that monitoring loss curves and using early stopping are critical practices.

89
MCQmedium

A developer encounters the error shown above when using Amazon Bedrock. What is the most likely cause?

A.The model is not available in the region
B.The IAM role lacks the required permission
C.The request is throttled
D.The model is out of service
AnswerB

The error explicitly states the role is not authorized for the action.

Why this answer

The error indicates an access denied or authorization failure when invoking the Amazon Bedrock model. The most likely cause is that the IAM role used by the developer does not have the required permission, such as `bedrock:InvokeModel`, attached to its policy. Without this permission, the API call to Bedrock is rejected regardless of model availability or service status.

Exam trap

AWS often tests the distinction between service availability errors and authorization errors, so the trap here is that candidates may confuse a permissions failure with a model unavailability or throttling issue, especially when the error message is generic.

How to eliminate wrong answers

Option A is wrong because if the model were not available in the region, the error would typically be a `ModelNotFoundException` or `ValidationException`, not an access denied error. Option C is wrong because throttling errors return a `ThrottlingException` with HTTP 429 status code, not an authorization error. Option D is wrong because if the model were out of service, the error would be a `ServiceUnavailableException` or `ModelNotReadyException`, not a permissions-related error.

90
MCQhard

An e-commerce company is using a foundation model to generate product descriptions. They want to reduce costs by caching frequently requested descriptions. Which AWS service should they use to implement a cache?

A.Amazon CloudFront
B.Amazon DynamoDB
C.Amazon S3
D.Amazon ElastiCache
AnswerD

ElastiCache provides low-latency caching for frequently used data.

Why this answer

Amazon ElastiCache is the correct choice because it provides an in-memory caching layer (using Redis or Memcached) that can store frequently requested product descriptions, reducing the need to invoke the foundation model repeatedly. This directly lowers inference costs and latency by serving cached responses instead of generating new ones each time.

Exam trap

The AIF-C01 exam often tests the distinction between caching at the application layer (ElastiCache) versus caching at the content delivery layer (CloudFront), leading candidates to mistakenly choose CloudFront for any caching need.

How to eliminate wrong answers

Option A is wrong because Amazon CloudFront is a content delivery network (CDN) that caches static and dynamic content at edge locations, but it is not designed for application-level caching of model-generated text; it caches HTTP responses, not arbitrary key-value data. Option B is wrong because Amazon DynamoDB is a fully managed NoSQL database optimized for high-throughput, low-latency reads and writes, but it is not a caching service; using it as a cache would incur higher costs and lack native TTL-based eviction policies for transient data. Option C is wrong because Amazon S3 is an object storage service for storing large amounts of unstructured data, not a low-latency cache; retrieving descriptions from S3 would introduce significant latency compared to an in-memory cache, defeating the purpose of cost reduction.

91
Multi-Selectmedium

Which THREE of the following are factors to consider when selecting a foundation model for a text generation task?

Select 3 answers
A.Supported output modalities
B.Pricing per token
C.Model size (parameters)
D.Training data source and diversity
E.Availability of automatic scaling
AnswersB, C, D

Cost per token affects operational expense.

Why this answer

Pricing per token is a critical factor because foundation model APIs (e.g., Amazon Bedrock, OpenAI) charge based on the number of input and output tokens. For text generation tasks, token costs directly impact operational budgets, especially for high-volume or long-context applications. Selecting a model with lower per-token pricing can significantly reduce inference costs without sacrificing quality.

Exam trap

AWS often tests the distinction between model-level attributes (e.g., token pricing, training data, parameter count) and platform-level operational features (e.g., scaling, output modalities), leading candidates to incorrectly select options like automatic scaling or multimodal support for a text-only task.

92
MCQmedium

A company uses Amazon Bedrock to generate summarizations of lengthy reports. Users report that the summaries are too verbose and include excessive detail. Which prompt engineering technique should the team apply to address this issue?

A.Reduce the input context length to limit available information.
B.Increase the maxTokens parameter in the inference request.
C.Include few-shot examples of desired outputs.
D.Add explicit constraints like 'Provide a concise summary in two sentences.'
AnswerD

Explicit constraints directly guide the model to produce shorter output, addressing verbosity effectively.

Why this answer

Adding explicit constraints like 'Provide a concise summary in two sentences' directly instructs the model to limit verbosity and detail. This prompt engineering technique uses clear, specific instructions to control output length and style, which is the most effective way to address overly verbose summaries without altering model parameters or input data.

Exam trap

The trap here is that candidates confuse reducing input length (Option A) with controlling output length, or they mistakenly think increasing maxTokens (Option B) can somehow shorten output, when in fact it does the opposite.

How to eliminate wrong answers

Option A is wrong because reducing input context length does not guarantee concise output; the model may still generate verbose summaries from the remaining text, and it risks losing critical information needed for accurate summarization. Option B is wrong because increasing the maxTokens parameter actually allows the model to generate longer outputs, which would exacerbate the verbosity issue rather than solve it. Option C is wrong because few-shot examples can guide output format but are less direct and reliable than explicit constraints; they may not consistently enforce conciseness, especially if the examples themselves are not perfectly aligned with the desired brevity.

93
Multi-Selecteasy

Which TWO AWS services can be used together to build a chatbot that leverages a foundation model for natural language understanding?

Select 2 answers
A.Amazon Rekognition
B.Amazon Lex
C.Amazon Polly
D.AWS Glue
E.Amazon Bedrock
AnswersB, E

Lex handles dialog management and intent recognition.

Why this answer

Amazon Lex provides the conversational interface and natural language understanding (NLU) to interpret user intents and manage dialog, while Amazon Bedrock gives access to foundation models (FMs) for advanced natural language generation and understanding. Together, Lex can route utterances to a Bedrock FM via a Lambda function or direct integration, enabling a chatbot that leverages a pre-trained FM for richer responses.

Exam trap

AWS often tests the distinction between services that handle conversational interfaces (Lex) versus those that provide generative AI models (Bedrock), tempting candidates to pick Polly (speech output) or Rekognition (vision) as part of a chatbot, when they are not core to NLU or FM integration.

94
MCQhard

A team is fine-tuning a foundation model using SageMaker. They want to minimize training time while keeping the model's original knowledge. Which technique is BEST suited?

A.Use Parameter Efficient Fine-Tuning (PEFT) such as LoRA
B.Use distributed training across multiple GPUs
C.Use prompt engineering instead of fine-tuning
D.Full fine-tuning on the new dataset
AnswerA

PEFT methods adapt the model with fewer trainable parameters, reducing training time and preserving original knowledge.

Why this answer

Parameter Efficient Fine-Tuning (PEFT) methods like LoRA (Low-Rank Adaptation) are best suited because they freeze the pre-trained model weights and inject trainable low-rank matrices into specific layers, drastically reducing the number of trainable parameters. This minimizes training time and computational cost while preserving the model's original knowledge, as only a small fraction of parameters are updated during fine-tuning.

Exam trap

AWS often tests the distinction between techniques that modify the model (fine-tuning) versus those that only change the input (prompt engineering), and the trap here is that candidates may choose distributed training (Option B) thinking it reduces time, but it does not address parameter efficiency or knowledge preservation as directly as PEFT.

How to eliminate wrong answers

Option B is wrong because distributed training across multiple GPUs accelerates training but does not inherently preserve the model's original knowledge or reduce the number of updated parameters; it still requires full or partial parameter updates and does not address the goal of minimizing training time through parameter efficiency. Option C is wrong because prompt engineering is a zero-shot or few-shot inference technique that does not involve training at all, so it cannot be used to fine-tune the model on a new dataset. Option D is wrong because full fine-tuning updates all model parameters, which is computationally expensive, time-consuming, and risks catastrophic forgetting of the original knowledge, contrary to the goal of minimizing training time while preserving original knowledge.

95
MCQhard

A data scientist is fine-tuning a foundation model on a custom dataset using Amazon SageMaker. After training, the model shows high accuracy on training data but poor on validation. Which action should be taken?

A.Add dropout layers
B.Reduce training epochs or add regularization
C.Increase learning rate
D.Use a different foundation model
AnswerB

Reducing epochs prevents overfitting; regularization also helps.

Why this answer

The model is overfitting, as indicated by high training accuracy but poor validation performance. Reducing training epochs or adding regularization (e.g., L1/L2 weight decay) directly addresses overfitting by limiting the model's capacity to memorize noise. In Amazon SageMaker, this can be implemented via hyperparameter tuning or by modifying the training script to include regularization terms.

Exam trap

AWS often tests the misconception that overfitting is solved by increasing model complexity or data augmentation, but the correct approach is to reduce capacity or add regularization.

How to eliminate wrong answers

Option A is wrong because adding dropout layers is a regularization technique that could help, but it is not the only or most direct action; the question asks for a single action, and reducing epochs or adding regularization (Option B) is a more fundamental fix for overfitting. Option C is wrong because increasing the learning rate can cause the model to diverge or overshoot minima, worsening generalization and potentially increasing overfitting. Option D is wrong because using a different foundation model does not address the root cause of overfitting; the current model is capable of learning the training data, and the issue is with training dynamics, not model architecture.

96
MCQeasy

Refer to the exhibit. A developer runs this command but gets an error: 'An error occurred (AccessDeniedException) when calling the ListFoundationModels operation'. What is the most likely cause?

A.The IAM role does not have bedrock:ListFoundationModels permission
B.The AWS CLI version is outdated
C.The foundation model is not available in us-west-2
D.The region us-west-2 does not support Bedrock
AnswerA

AccessDeniedException is due to missing IAM permissions.

Why this answer

The error 'AccessDeniedException' when calling ListFoundationModels indicates that the IAM role or user executing the AWS CLI command lacks the required permission to list foundation models in Amazon Bedrock. The specific permission needed is bedrock:ListFoundationModels, which must be attached to the IAM identity via a policy. Without this permission, the API call is denied regardless of other factors like region or CLI version.

Exam trap

AWS often tests the distinction between service availability errors (e.g., region not supported) and IAM permission errors, where candidates mistakenly attribute an AccessDeniedException to regional or model availability issues rather than missing IAM permissions.

How to eliminate wrong answers

Option B is wrong because an outdated AWS CLI version would typically produce a different error (e.g., 'InvalidClientTokenId' or 'UnrecognizedClientException'), not an AccessDeniedException, and the ListFoundationModels API is available in recent CLI versions. Option C is wrong because the error is an access denial, not a model availability issue; if a model were unavailable, the error would be something like 'ValidationException' or 'ResourceNotFoundException' when trying to use that specific model. Option D is wrong because us-west-2 (Oregon) fully supports Amazon Bedrock and its APIs; the error is explicitly an IAM permissions issue, not a regional unsupported service error.

97
MCQmedium

A company is building a chatbot using Amazon Bedrock to answer customer questions about their product catalog. The chatbot should only use information from the company's internal knowledge base and should not generate answers based on the model's pre-training data. Which feature should be enabled?

A.Use prompt engineering to instruct the model to only use the knowledge base
B.Configure a knowledge base with Retrieval Augmented Generation (RAG)
C.Enable model invocation logging to review responses
D.Fine-tune the model on the product catalog data
AnswerB

RAG grounds responses in the provided knowledge base, avoiding use of pre-training data.

Why this answer

Configuring a knowledge base with Retrieval Augmented Generation (RAG) allows the chatbot to retrieve relevant documents from the company's internal knowledge base and use them as context for generating answers. This ensures the model's responses are grounded solely in the provided data, preventing reliance on its pre-training knowledge.

Exam trap

The trap here is that candidates often confuse fine-tuning with RAG, assuming fine-tuning alone can restrict the model to a specific knowledge domain, when in fact fine-tuning does not prevent the model from using its pre-training data and can still produce off-topic responses.

How to eliminate wrong answers

Option A is wrong because prompt engineering alone cannot reliably prevent the model from using its pre-training data; it only provides instructions that the model may still override with its internal knowledge. Option C is wrong because model invocation logging only records responses for auditing and debugging, it does not constrain the model's source of information. Option D is wrong because fine-tuning adapts the model to the product catalog but does not guarantee that the model will ignore its pre-training data; it can still generate answers from its original training corpus.

98
MCQhard

An enterprise deploys a foundation model on Amazon Bedrock with a knowledge base. Users report that the model is returning outdated information. What is the most likely cause?

A.The model was fine-tuned
B.The model is not the latest version
C.The knowledge base data source is not refreshed
D.The inference parameters are incorrect
AnswerC

If the underlying data source hasn't been updated, the knowledge base contains stale data.

Why this answer

When a knowledge base is attached to a foundation model on Amazon Bedrock, the model retrieves information from the data source to augment its responses. If the data source is not refreshed, the model will return outdated information even if the model itself is current. Option C directly addresses this by identifying the stale data source as the root cause.

Exam trap

The trap here is that candidates may confuse model versioning (Option B) with data freshness, but the question specifically ties the symptom to the knowledge base, making the refresh cycle the critical factor.

How to eliminate wrong answers

Option A is wrong because fine-tuning adjusts the model's weights on a specific dataset, which does not inherently cause outdated information; in fact, fine-tuning could update the model with newer data. Option B is wrong because using an older model version might affect performance or capabilities, but the question specifically states the model is returning outdated information, which points to the knowledge base content, not the model version. Option D is wrong because inference parameters (e.g., temperature, top_p) control randomness and creativity of responses, not the freshness or accuracy of the information retrieved from the knowledge base.

← PreviousPage 2 of 2 · 98 questions total

Ready to test yourself?

Try a timed practice session using only Applications of Foundation Models questions.