Which AWS service makes foundation models (FMs) available to help users build and scale generative AI applications?
Answer : B
The correct answer is Amazon Bedrock, AWS's fully managed service for building and scaling generative AI applications using foundation models (FMs). Bedrock gives developers access to models from leading providers such as Anthropic (Claude), Meta (Llama), Mistral, Cohere, and Amazon Titan. Users can invoke these models via API without managing infrastructure or model training. According to AWS documentation, Bedrock supports tasks such as text generation, summarization, question answering, image generation, and RAG workflows with minimal setup. It supports both on-demand and provisioned throughput modes and integrates with features like Guardrails, Knowledge Bases, and Agents for secure, enterprise-grade applications. Amazon Q Developer is a generative AI tool for developers, but it doesn't host or scale models. Amazon Kendra is an intelligent search engine, and Amazon Comprehend is used for NLP tasks like entity extraction---not foundation model access.
Referenced AWS AI/ML Documents and Study Guides:
Amazon Bedrock Developer Guide -- Foundation Models and Use Cases
AWS Certified ML Specialty Guide -- Generative AI on AWS
A company wants to use a large language model (LLM) to generate product descriptions. The company wants to give the model example descriptions that follow a format.
Which prompt engineering technique will generate descriptions that match the format?
Answer : D
The correct answer is D because Few-shot prompting involves providing the LLM with a few examples of the expected input-output format. This helps the model learn and mimic the pattern or structure required in the response --- such as generating product descriptions that follow a specific template.
From AWS documentation:
'Few-shot prompting helps guide the model to produce structured and domain-specific outputs by supplying a small number of example inputs and corresponding outputs.'
Explanation of other options:
A . Zero-shot prompting provides no examples, which may lead to inconsistent formatting.
B . Chain-of-thought prompting is used to guide reasoning steps, not formatting.
C . One-shot prompting uses a single example, but few-shot typically yields better structure adherence.
Referenced AWS AI/ML Documents and Study Guides:
AWS Prompt Engineering Guide
Amazon Bedrock Developer Documentation -- Prompting Techniques
AWS ML Specialty Study Guide -- LLM Prompting Patterns
A company wants to improve a large language model (LLM) for content moderation within 3 months. The company wants the model to moderate content according to the company's values and ethics. The LLM must also be able to handle emerging trends and new types of problematic content.
Which solution will meet these requirements?
Answer : D
Reinforcement learning from human feedback (RLHF) is the most effective approach to align large language models with company-specific values, ethics, and evolving moderation requirements. AWS documentation explains that RLHF uses direct human input to guide model behavior, enabling models to learn preferences that cannot be fully captured through static datasets or generic fine-tuning.
In this scenario, the company requires improvement within a short time frame of three months, alignment with organizational ethics, and adaptability to emerging trends and new forms of harmful content. RLHF meets these needs by incorporating real-time feedback from skilled human moderators, allowing the model to rapidly adjust its responses based on expert judgment.
AWS highlights that RLHF is particularly valuable for content moderation, safety alignment, and policy enforcement, where nuanced decisions and evolving standards are common. By rewarding desirable behaviors and penalizing undesirable outputs, the model continuously improves in a controlled and targeted manner.
The other options are less suitable. Continuous pre-training on large internet datasets is time-consuming, resource-intensive, and may introduce content misaligned with company values. Historical moderation datasets may not reflect new or emerging content patterns. Fine-tuning on general ethical guidelines lacks the specificity required for company-defined moderation policies and does not adapt quickly to new risks.
AWS positions RLHF as a key technique in responsible generative AI development, enabling organizations to maintain human oversight while improving model safety and alignment. Therefore, using RLHF with real-time input from skilled moderators is the most effective and compliant solution for this use case.
A company is using a pre-trained large language model (LLM) to extract information from documents. The company noticed that a newer LLM from a different provider is available on Amazon Bedrock. The company wants to transition to the new LLM on Amazon Bedrock.
What does the company need to do to transition to the new LLM?
Answer : C
Transitioning to a new large language model (LLM) on Amazon Bedrock typically involves minimal changes when the new model is pre-trained and available as a foundation model. Since the company is moving from one pre-trained LLM to another, the primary task is to ensure compatibility between the new model's input requirements and the existing application. Adjusting the prompt template is often necessary because different LLMs may have varying prompt formats, tokenization methods, or response behaviors, even for similar tasks like document extraction.
Exact Extract from AWS AI Documents:
From the AWS Bedrock User Guide:
'When switching between foundation models in Amazon Bedrock, you may need to adjust the prompt template to align with the new model's expected input format and optimize its performance for your use case. Prompt engineering is critical to ensure the model understands the task and generates accurate outputs.'
(Source: AWS Bedrock User Guide, Prompt Engineering for Foundation Models)
Detailed
Option A: Create a new labeled dataset.Creating a new labeled dataset is unnecessary when transitioning to a new pre-trained LLM, as pre-trained models are already trained on large datasets. This option would only be relevant if the company were training a custom model from scratch, which is not the case here.
Option B: Perform feature engineering.Feature engineering is typically associated with traditional machine learning models, not pre-trained LLMs. LLMs process raw text inputs, and transitioning to a new LLM does not require restructuring input features. This option is incorrect.
Option C: Adjust the prompt template.This is the correct approach. Different LLMs may interpret prompts differently due to variations in training data, tokenization, or model architecture. Adjusting the prompt template ensures the new LLM understands the task (e.g., document extraction) and produces the desired output format. AWS documentation emphasizes prompt engineering as a key step when adopting a new foundation model.
Option D: Fine-tune the LLM.Fine-tuning is not required for transitioning to a new pre-trained LLM unless the company needs to customize the model for a highly specific task. Since the question does not indicate a need for customization beyond document extraction (a common LLM capability), fine-tuning is unnecessary.
AWS Bedrock User Guide: Prompt Engineering for Foundation Models (https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-engineering.html)
AWS AI Practitioner Learning Path: Module on Working with Foundation Models in Amazon Bedrock
Amazon Bedrock Developer Guide: Transitioning Between Models (https://docs.aws.amazon.com/bedrock/latest/devguide/)
A design company is using a foundation model (FM) on Amazon Bedrock to generate images for various projects. The company wants to have control over how detailed or abstract each generated image appears.
Which model parameter should the company modify?
Answer : C
The correct answer is C because in image generation tasks using foundation models like Stable Diffusion on Amazon Bedrock, the number of generation steps directly influences the fidelity and level of detail of the generated image. Fewer steps can produce more abstract or less defined images, while more steps allow the model to refine details, resulting in higher realism.
From AWS documentation:
'In diffusion-based image generation models, the number of inference steps (generation steps) determines how refined the final image is. Lower steps produce faster but less detailed outputs. Increasing steps results in more detailed and higher-quality images.'
Explanation of other options:
A . Model checkpoint refers to saved versions of the model during training, not inference-time generation settings.
B . Batch size affects training/inference throughput, not image detail.
D . Token length is relevant for text models, not image generation.
Referenced AWS AI/ML Documents and Study Guides:
Amazon Bedrock Documentation -- Model Parameters for Image Generation
Stable Diffusion on Amazon Bedrock -- Developer Guide
AWS ML Specialty Guide -- Generative AI Configuration
An AI practitioner needs to improve the accuracy of a natural language generation model. The model uses rapidly changing inventory data.
Which technique will improve the model's accuracy?
Answer : C
The requirement is to improve the accuracy of a natural language generation (NLG) model that relies on rapidly changing inventory data. Let's evaluate the options:
A . Transfer learning: This involves pre-training a model on a large dataset and fine-tuning it for a specific task. While effective for general model improvement, it does not specifically address the challenge of incorporating rapidly changing inventory data into the model's responses.
B . Federated learning: This technique trains models across decentralized devices while keeping data localized, primarily for privacy purposes. It is not designed to handle rapidly changing data or improve NLG model accuracy in this context.
C . Retrieval Augmented Generation (RAG): RAG combines a language model with a retrieval mechanism that fetches relevant, up-to-date information (e.g., inventory data) from an external source during inference. This is ideal for scenarios with dynamic data, as it ensures the model's responses are grounded in the latest information, improving accuracy.
D . One-shot prompting: This involves providing a single example to guide the model's output. While useful for specific tasks, it does not scale well for rapidly changing data or ensure consistent accuracy with dynamic inventory updates.
Exact Extract Reference: According to AWS documentation on generative AI techniques, ''Retrieval Augmented Generation (RAG) enhances large language models by retrieving relevant documents or data at inference time, enabling the model to generate accurate and contextually relevant responses, especially for dynamic or frequently updated datasets.'' (Source: AWS Generative AI Glossary, https://aws.amazon.com/what-is/retrieval-augmented-generation/). This directly addresses the need for accuracy with rapidly changing inventory data.
RAG is the most suitable technique for this scenario, as it allows the model to access and incorporate the latest inventory data, making C the correct answer.
AWS Generative AI Glossary: Retrieval Augmented Generation (https://aws.amazon.com/what-is/retrieval-augmented-generation/)
AWS Bedrock Documentation (contextual use of RAG in LLMs)
AWS AI Practitioner Study Guide (focus on generative AI techniques for dynamic data)
A hospital is developing an AI system to assist doctors in diagnosing diseases based on patient records and medical images. To comply with regulations, the sensitive patient data must not leave the country the data is located in.
Which data governance strategy will ensure compliance and protect patient privacy?
Answer : A
The correct answer is Data residency, which ensures that data remains stored and processed within specific geographical or jurisdictional boundaries. AWS defines data residency as the practice of keeping sensitive or regulated data, such as healthcare records, inside designated regions to meet local privacy laws like HIPAA or GDPR. Amazon SageMaker, Bedrock, and other AWS services allow region-specific resource deployment, guaranteeing data never leaves the country. Data quality refers to accuracy and consistency, while discoverability and enrichment concern accessibility and augmentation, not compliance. Data residency is central to AWS's Shared Responsibility Model, ensuring organizations maintain sovereignty over healthcare data.
Referenced AWS AI/ML Documents and Study Guides:
AWS Data Privacy Whitepaper -- Data Residency and Compliance
AWS ML Specialty Guide -- Data Governance and Security