A grocery store wants to create a chatbot to help customers find products in the store. The chatbot must check the inventory in real time and provide the product location in the store.
Which prompt engineering technique should the store use to build the chatbot?
A. Zero-shot prompting
B. Few-shot prompting
C. Least-to-most prompting
D. Reasoning and acting (ReAct) prompting
Show Answer
Correct Answer: D
Explanation: The chatbot must reason about a customer’s request and then take actions such as querying a real-time inventory system or store database. ReAct prompting is designed to combine reasoning steps with tool or API calls, making it the best fit for real-time product lookup and location retrieval.
Question 111
A bank is fine-tuning a large language model (LLM) on Amazon Bedrock to assist customers with questions about their loans. The bank wants to ensure that the model does not reveal any private customer data.
Which solution meets these requirements?
A. Use Amazon Bedrock Guardrails.
B. Remove personally identifiable information (PII) from the customer data before fine-tuning the LLM.
C. Increase the Top-K parameter of the LLM.
D. Store customer data in Amazon S3. Encrypt the data before fine-tuning the LLM.
Show Answer
Correct Answer: B
Explanation: To ensure an LLM does not reveal private customer data, the most effective approach is to prevent the model from ever learning that data. Removing or anonymizing PII before fine-tuning eliminates the risk of memorization and leakage and aligns with privacy-by-design and compliance best practices. Guardrails act at inference time and cannot fully mitigate the risk of sensitive data being encoded during training. Other options do not address model exposure to private data.
Question 112
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?
A. Zero-shot prompting
B. Chain-of-thought prompting
C. One-shot prompting
D. Few-shot prompting
Show Answer
Correct Answer: D
Explanation: Providing the model with several example product descriptions that already follow the desired format allows it to infer the structure and style and replicate them in new outputs. This technique is known as few-shot prompting and is specifically used to enforce consistent formatting or patterns.
Question 113
A company is making a chatbot. The chatbot uses Amazon Lex and Amazon OpenSearch Service. The chatbot uses the company's private data to answer questions. The company needs to convert the data into a vector representation before storing the data in a database.
Which type of foundation model (FM) meets these requirements?
A. Text completion model
B. Instruction following model
C. Text embeddings model
D. Image generation model
Show Answer
Correct Answer: C
Explanation: The requirement is to convert private text data into vector representations so it can be stored and searched in Amazon OpenSearch for semantic retrieval. Text embeddings models are specifically designed to transform text into numerical vectors that capture semantic meaning, which is essential for similarity search and retrieval-augmented chatbot use cases. Other model types (text completion, instruction following, image generation) do not produce embeddings for vector storage.
Question 114
Which large language model (LLM) parameter controls the number of possible next words or tokens considered at each step of the text generation process?
A. Maximum tokens
B. Top K
C. Temperature
D. Batch size
Show Answer
Correct Answer: B
Explanation: Top K controls how many of the most probable next tokens are considered at each generation step; the model samples only from this top-K set. The other options affect length (maximum tokens), randomness scaling (temperature), or training/inference batching (batch size).
Question 115
Which ML technique uses training data that is labeled with the correct output values?
A. Supervised learning
B. Unsupervised learning
C. Reinforcement learning
D. Transfer learning
Show Answer
Correct Answer: A
Explanation: Supervised learning trains models on labeled datasets, where each input is paired with the correct output value. The algorithm learns a mapping from inputs to outputs by comparing predictions with known labels and minimizing error.
Question 116
A company has signed up for Amazon Bedrock access to build applications. The company wants to restrict employee access to specific models available on Amazon Bedrock.
Which solution meets these requirements?
A. Use AWS Identity and Access Management (IAM) policies to restrict model access.
B. Use AWS Security Token Service (AWS STS) to generate temporary credentials for model use.
C. Use AWS Identity and Access Management (IAM) service roles to restrict model subscription.
D. Use Amazon Inspector to monitor model access.
Show Answer
Correct Answer: A
Explanation: Amazon Bedrock integrates with AWS Identity and Access Management (IAM), allowing administrators to define fine-grained IAM policies that explicitly allow or deny access to specific foundation models and Bedrock actions. This is the correct way to restrict which employees can invoke particular models. AWS STS only provides temporary credentials, service roles do not control model subscriptions themselves, and Amazon Inspector is unrelated to access control.
Question 117
A company has developed a generative AI model for customer segmentation. The model has been deployed in the company's production environment for a long time. The company recently noticed some inconsistency in the model's responses. The company wants to evaluate model bias and drift.
Which AWS service or feature meets these requirements?
A. Amazon SageMaker Model Monitor
B. Amazon SageMaker Clarify
C. Amazon SageMaker Model Cards
D. Amazon SageMaker Feature Store
Show Answer
Correct Answer: B
Explanation: The requirement is to evaluate both model bias and drift. Amazon SageMaker Clarify is specifically designed to detect and quantify bias in data and model predictions and also supports monitoring for drift by comparing model behavior and feature distributions over time. Model Monitor focuses primarily on data and model drift and quality in production, but bias evaluation is a core capability of Clarify, making it the best single service that satisfies both requirements.
Question 118
An ecommerce company receives multiple gigabytes of customer data daily. The company uses the data to train an ML model to forecast future product demand. The company needs a solution to perform inferences once each day.
Which inference type meets these requirements?
A. Batch inference
B. Asynchronous inference
C. Real-time inference
D. Serverless inference
Show Answer
Correct Answer: A
Explanation: The company processes large volumes of data and only needs predictions once per day. Batch inference is designed for scheduled, offline predictions over large datasets where low latency is not required, making it the best fit compared to real-time, asynchronous, or serverless inference.
Question 119
An AI practitioner is evaluating the performance of an Amazon SageMaker model. The AI practitioner must choose a performance metric. The metric must show the ratio of the number of correctly classified items to the total number of correctly and incorrectly classified items.
Which metric meets these requirements?
A. Accuracy
B. Precision
C. F1 score
D. Recall
Show Answer
Correct Answer: A
Explanation: The metric described is the ratio of correctly classified items to the total number of classified items (both correct and incorrect). This is exactly the definition of accuracy: (true positives + true negatives) divided by all predictions. Precision, recall, and F1 score focus on subsets of predictions rather than overall correctness.
$19
Get all 397 questions with detailed answers and explanations
Instant download HTML + PDF delivered the moment payment clears.
Secure Stripe checkout we never see or store your card details.
7-day refund if files are defective see our refund policy.