Last updated: May 2026
AIP-C01 — AWS Certified AI Practitioner – Generative AI Developer
Test your knowledge with official exam-style questions
Questions and options are shuffled each attempt
▶AWS Certified Generative AI Developer – Professional — Practice Set 1: All Questions & Explanations
Full question text, answer options, and explanations for this practice set — a spoiler-free alternative is the interactive quiz above for scored, shuffled practice.
. A machine learning engineer at a financial services company is selecting a supervised learning algorithm to predict whether a loan application will default. The training dataset contains 500,000 labeled records with 40 features including credit score, debt-to-income ratio, employment history, and loan amount. The business requires an interpretable model that risk analysts can audit and explain to regulators. Which algorithm BEST meets these requirements?
- A. Train a deep neural network with multiple hidden layers using Amazon SageMaker to maximize predictive accuracy
- B. Train a gradient boosting model using XGBoost on Amazon SageMaker and use SageMaker Clarify to generate feature importance explanations
- C. Train a logistic regression model using Amazon SageMaker built-in algorithms, which provides coefficient-level interpretability for regulatory review(correct)
- D. Use an unsupervised clustering algorithm on Amazon SageMaker to group applicants by risk profile and assign default probabilities per cluster
Explanation: Logistic regression provides direct coefficient-level interpretability — regulators can see exactly how each feature contributes to the prediction, which satisfies auditability requirements without additional tooling. A deep neural network maximizes accuracy but is inherently a black box, which fails the regulatory interpretability requirement. XGBoost with SageMaker Clarify offers interpretability, but logistic regression is the BEST choice when interpretability is the primary constraint alongside a labeled dataset. Unsupervised clustering is inappropriate here because the dataset already has labels (default/no default), making this a supervised classification problem.
. A machine learning engineer is evaluating a binary classification model that detects fraudulent transactions. The dataset is highly imbalanced: 99% of transactions are legitimate and 1% are fraudulent. The model achieves 99% overall accuracy on the test set. The business requirement is to catch as many fraudulent transactions as possible even at the cost of some false positives. Which metric should the engineer use to MOST accurately evaluate model performance for this use case?
- A. Overall accuracy, because it measures the proportion of correctly classified samples across all classes
- B. Precision, because it measures the proportion of predicted fraudulent transactions that are actually fraudulent
- C. Recall (sensitivity), because it measures the proportion of actual fraudulent transactions that the model correctly identifies(correct)
- D. Specificity, because it measures the proportion of legitimate transactions correctly identified as legitimate
Explanation: Recall (sensitivity) measures what fraction of actual fraud cases the model catches, which directly aligns with the business goal of minimizing missed fraud even at the cost of false positives. Overall accuracy is misleading on imbalanced datasets — a model that always predicts 'legitimate' achieves 99% accuracy while catching zero fraud cases. Precision focuses on avoiding false positives, which is the opposite of the stated business priority. Specificity measures true negative rate for the majority class, which is not relevant to the fraud detection objective.
. A data scientist at a retail company is training a product recommendation model on Amazon SageMaker. During training, the model achieves 95% accuracy on the training set but only 62% accuracy on the validation set. The model has 200 million parameters but the training dataset contains only 50,000 records. The team needs to improve generalization without collecting more data. Which approach MOST effectively addresses this problem?
- A. Increase the number of training epochs and use a higher learning rate to allow the model to converge to a better minimum
- B. Apply L2 regularization, add dropout layers, and use data augmentation techniques to reduce overfitting(correct)
- C. Switch to a larger model architecture with 500 million parameters to increase model capacity and improve validation accuracy
- D. Remove features from the training dataset to simplify the input space and reduce training set accuracy to match validation accuracy
Explanation: The large gap between training accuracy (95%) and validation accuracy (62%) with a high parameter-to-data ratio is a classic overfitting scenario. L2 regularization penalizes large weights, dropout randomly disables neurons during training, and data augmentation synthetically increases effective dataset size — together these are the standard techniques to combat overfitting. Increasing epochs and learning rate would worsen overfitting by allowing the model to memorize the training data even more. Switching to a larger model would increase the parameter-to-data ratio, making overfitting worse. Removing features would reduce model information but does not address the fundamental overfitting cause.
. An organization is building a customer churn prediction pipeline on AWS. The raw data resides in Amazon S3 and includes structured transaction records with 15% missing values in key feature columns. The team wants to automate feature engineering and model training with minimal code. The pipeline must scale to process 10 TB of data monthly. Which AWS service combination is MOST appropriate for this use case?
- A. Use AWS Glue for data transformation, then train the model directly in AWS Lambda using scikit-learn
- B. Use Amazon SageMaker Data Wrangler for feature engineering, Amazon SageMaker Autopilot for automated model training, and Amazon SageMaker Pipelines for orchestration(correct)
- C. Use Amazon EMR with Apache Spark for data processing, then deploy a custom training container on Amazon EC2 instances
- D. Use Amazon Athena to query the S3 data and export it to Amazon RDS, then train a model using Amazon SageMaker built-in algorithms
Explanation: Amazon SageMaker Data Wrangler provides a low-code interface for handling missing values and feature transformations at scale; SageMaker Autopilot automates algorithm selection and hyperparameter tuning; SageMaker Pipelines orchestrates the end-to-end workflow — together they satisfy the minimal-code and scalability requirements. AWS Lambda has a 15-minute execution limit and 10 GB memory cap, making it unsuitable for 10 TB monthly processing. Amazon EMR with custom EC2 training requires significant custom code, contradicting the minimal-code requirement. Exporting data from Athena to RDS before training adds unnecessary latency and cost without solving the missing values problem.
. A machine learning engineer is designing a real-time inference pipeline for a fraud detection model deployed on Amazon SageMaker. The model receives 10,000 transactions per second at peak load with latency requirements under 50 ms at the 99th percentile. The model is a 2 GB XGBoost ensemble. Cost is a secondary concern but availability must be 99.99%. Current deployment uses a single ml.c5.4xlarge instance which saturates at 4,000 TPS. Which deployment configuration BEST meets the requirements?
- A. Deploy the model on a SageMaker real-time endpoint with auto scaling configured to add ml.c5.4xlarge instances when CPU utilization exceeds 70%, with a minimum of 2 instances across two Availability Zones(correct)
- B. Convert the model to ONNX format and deploy it on Amazon SageMaker with elastic inference accelerators to reduce inference latency
- C. Deploy the model using Amazon SageMaker serverless inference, which automatically scales to handle any TPS without provisioned capacity
- D. Pre-compute fraud scores for all possible transaction combinations daily and cache results in Amazon ElastiCache for Redis to achieve sub-millisecond latency
Explanation: Auto scaling with a minimum of 2 instances across two Availability Zones ensures both high availability (99.99% requires multi-AZ) and the throughput capacity to handle 10,000 TPS at 50 ms p99 latency — a well-tuned ml.c5.4xlarge handles ~4,000 TPS, so 3+ instances at peak provides headroom. Elastic inference accelerators accelerate GPU-based deep learning models, not XGBoost CPU inference. SageMaker serverless inference has cold start latency that would violate the 50 ms p99 requirement and is not designed for 10,000 sustained TPS. Pre-computing fraud scores is not feasible because the input space of transaction features is not enumerable and transactions are real-time events with unique parameters.
. A developer is building a customer service chatbot using a large language model through Amazon Bedrock. The chatbot must answer questions about the company's product catalog, which is updated weekly. The developer wants the chatbot to respond accurately about current products without retraining the model. Which approach BEST meets these requirements?
- A. Fine-tune a foundation model on Amazon Bedrock each week with the latest product catalog data to ensure responses reflect current inventory
- B. Implement a Retrieval Augmented Generation (RAG) architecture using Amazon Bedrock Knowledge Bases with the product catalog stored in Amazon OpenSearch Serverless(correct)
- C. Embed the full product catalog as a static system prompt in every request to Amazon Bedrock, so the model always has access to current product information
- D. Use Amazon Lex to build a rule-based chatbot that queries an Amazon DynamoDB table for product information without using a foundation model
Explanation: RAG with Amazon Bedrock Knowledge Bases retrieves relevant product information at inference time from a vector store (Amazon OpenSearch Serverless), allowing the catalog to be updated weekly without any model retraining. The retrieved context is injected into the prompt, ensuring factual accuracy about current products. Fine-tuning weekly is prohibitively expensive and slow, and bakes knowledge into model weights rather than keeping it updatable. Embedding the full catalog as a system prompt would exceed token context limits for large catalogs and increase latency and cost on every request. Amazon Lex without a foundation model cannot handle natural language understanding for diverse customer questions.
. An organization wants to compare foundation models available through Amazon Bedrock to select the MOST cost-effective option for a document summarization workload. The documents average 3,000 words each. The team processes 50,000 documents per month and the summaries need to be coherent but do not require specialized domain knowledge. Latency requirements are relaxed — batch processing within 24 hours is acceptable. Which model selection approach is MOST cost-effective?
- A. Select Amazon Titan Text Premier as the default model because it is an AWS-native model with no third-party licensing costs
- B. Use Amazon Bedrock model evaluation to benchmark summarization quality across multiple models at different price points, then select the smallest model that meets quality thresholds(correct)
- C. Select Anthropic Claude 3 Opus because it is the most capable model on Amazon Bedrock and will produce the highest quality summaries
- D. Use Amazon SageMaker JumpStart to deploy an open-source summarization model on dedicated instances to avoid per-token pricing entirely
Explanation: Amazon Bedrock model evaluation allows systematic comparison of quality metrics across models with different pricing tiers; choosing the smallest model that meets quality thresholds optimizes cost without sacrificing adequacy for general summarization. Defaulting to Titan Premier without benchmarking may not be optimal since other models could provide better quality-per-dollar for this workload. Claude 3 Opus is the most expensive Anthropic model and its advanced reasoning capabilities are unnecessary for standard document summarization. Deploying on SageMaker JumpStart with dedicated instances introduces fixed instance costs that exceed per-token pricing at 50,000 documents/month if utilization is not near 100%.
. A generative AI developer is building a code generation assistant using Amazon Bedrock. During testing, the model frequently generates syntactically valid code that solves the wrong problem or misinterprets ambiguous requirements. The developer wants to improve the model's ability to ask clarifying questions before generating code and to break complex problems into sub-steps. No fine-tuning budget is available. Which prompt engineering technique MOST effectively addresses this behavior?
- A. Add a temperature parameter of 0.0 to the API call to make model outputs deterministic and eliminate hallucinations
- B. Use chain-of-thought prompting by providing few-shot examples that demonstrate reasoning steps, sub-problem decomposition, and clarifying questions before generating code(correct)
- C. Increase the max_tokens parameter to allow the model to generate longer responses, giving it more space to reason through the problem
- D. Use a negative system prompt that instructs the model to never generate code when requirements are ambiguous and to return an error message instead
Explanation: Chain-of-thought prompting with few-shot examples explicitly teaches the model to decompose problems into reasoning steps and ask clarifying questions before writing code — directly targeting the observed failure mode without any fine-tuning cost. Setting temperature to 0.0 produces deterministic outputs but does not change the model's problem-solving strategy; it will still misinterpret ambiguous requirements, just consistently. Increasing max_tokens gives the model more output space but does not instruct it to reason differently. A negative system prompt that returns errors for ambiguous requirements would make the assistant unusable, as most real-world requirements contain some ambiguity.
. A machine learning engineer is designing a generative AI application that uses Amazon Bedrock to generate personalized marketing emails. The marketing team requires that every email contain the company's legal disclaimer as the final paragraph, a specific greeting format, and the customer's name in the first sentence. The prompt must also be protected from customer-provided inputs that could override these instructions. Which Amazon Bedrock feature BEST enforces these structural requirements?
- A. Use Amazon Bedrock prompt templates with variable substitution for the customer name and hardcode the disclaimer in the template to prevent override
- B. Use Amazon Bedrock Guardrails with a content filter to detect and block any customer-provided text that conflicts with the required email structure
- C. Store the required email structure in an Amazon DynamoDB table and retrieve it at runtime to prepend to the prompt before sending to the model
- D. Use Amazon Bedrock prompt management with system-level prompt segments that cannot be overridden by user-turn inputs, combined with output validation against the required structure(correct)
Explanation: Amazon Bedrock prompt management supports structured prompt templates with system-level segments that take precedence over user-turn content, preventing prompt injection from customer inputs. Combining this with output validation ensures structural compliance before the email is sent. Simple prompt templates with variable substitution do not inherently protect against prompt injection — a malicious customer input can still override instructions in many models. Guardrails content filters detect policy violations (toxicity, PII, etc.) but are not designed to enforce output structure requirements. Storing structure in DynamoDB adds operational complexity and still passes everything through the user-turn, remaining vulnerable to prompt injection.
. A developer is implementing a multi-turn conversational AI assistant using Amazon Bedrock. Users have conversations that can span 30–40 exchanges before reaching a conclusion. The developer notices that the model begins to lose context and contradict earlier statements after approximately 15 exchanges, and that each request is becoming very expensive because the full conversation history is sent every time. Which approach MOST effectively addresses both the context loss and cost issues?
- A. Limit conversations to 15 turns maximum and display a message asking the user to start a new session when the limit is reached
- B. Store the full conversation history in Amazon DynamoDB and retrieve only the last 5 messages for each request to stay within context limits
- C. Implement a sliding window with conversation summarization: periodically summarize earlier conversation turns using a lightweight model call and include the summary plus recent turns in each request(correct)
- D. Switch to a model with a larger context window on Amazon Bedrock and send the complete conversation history on every request to prevent any context loss
Explanation: Sliding window with summarization preserves the semantic content of earlier conversation turns in compressed form while keeping token counts manageable, directly solving both the context loss problem (summary retains key facts) and the cost problem (fewer tokens per request). Limiting to 15 turns degrades user experience and does not solve the problem. Retrieving only the last 5 messages loses the early context that the model was contradicting, making the context loss problem worse. Switching to a larger context window model addresses context loss but worsens cost — sending 40 turns of history in every request at a higher per-token price of a premium model is the most expensive option.
. A generative AI developer at a legal firm is evaluating whether to fine-tune a foundation model or use in-context learning for a contract clause classification task. The task requires classifying 47 specific clause types defined in the firm's internal taxonomy. The firm has 800 labeled contract examples distributed unevenly across clause types (some types have only 5 examples). The application must respond in under 2 seconds. The team has a one-time budget of $15,000 for development. Which approach BEST meets all constraints?
- A. Fine-tune Anthropic Claude on Amazon Bedrock using all 800 labeled examples to teach the model the firm's taxonomy, then deploy the fine-tuned model for classification
- B. Use few-shot in-context learning with Amazon Bedrock by selecting the most representative examples for each clause type dynamically using semantic similarity, and classify using the base model(correct)
- C. Fine-tune Amazon Titan Text using Amazon Bedrock fine-tuning with data augmentation for underrepresented clause types, then evaluate using a held-out test set before deployment
- D. Train a traditional multi-class text classifier using Amazon SageMaker with BERT embeddings and the 800 labeled examples, which avoids per-token inference costs at production scale
Explanation: Few-shot in-context learning with dynamic example selection via semantic similarity avoids fine-tuning costs entirely while enabling classification across all 47 types — retrieving the most similar labeled examples for each inference call compensates for the small per-class dataset. With only 5 examples for some classes, fine-tuning risks severe overfitting on underrepresented types. Fine-tuning Claude on Amazon Bedrock is not supported in the same way as Amazon Titan and other supported models, and the small dataset size (especially 5 examples per rare class) makes fine-tuning unreliable. Fine-tuning Amazon Titan with augmentation for 47 classes from 800 examples would require careful implementation and may consume the $15,000 budget in training costs without guaranteed quality improvement. A BERT classifier could work but requires labeled data for all 47 classes and introduces infrastructure management overhead.
. A machine learning engineer is evaluating embedding models for a semantic search system built on Amazon Bedrock Knowledge Bases. The system needs to retrieve relevant passages from a corpus of 2 million technical documents averaging 500 words each. The retrieval quality measured by Mean Reciprocal Rank (MRR) must exceed 0.82. The system must respond in under 300 ms for 95% of queries. The engineer has benchmarked three embedding models and found that a larger model achieves MRR 0.87 but 350 ms p95 latency, while a smaller model achieves MRR 0.79 but 180 ms p95 latency. Which action should the engineer take?
- A. Deploy the larger embedding model and optimize the vector store by reducing the index from HNSW to flat index to lower retrieval latency
- B. Deploy the larger embedding model and add an Amazon CloudFront distribution in front of the API to cache embedding results for repeated queries
- C. Deploy the larger embedding model and implement approximate nearest neighbor search with HNSW parameters tuned for latency (higher ef_search = false), combined with pre-filtering by document metadata to reduce the search space
- D. Select the smaller model and apply query expansion techniques such as HyDE (Hypothetical Document Embeddings) to close the quality gap while maintaining the latency requirement(correct)
Explanation: The smaller model meets the latency requirement (180 ms vs 300 ms threshold) but falls short on quality (MRR 0.79 vs 0.82 target). HyDE (Hypothetical Document Embeddings) is a query expansion technique where the model generates a hypothetical answer to the query, embeds it, and uses that richer embedding for retrieval — this consistently improves MRR by 0.05–0.10 on technical corpora, which would close the gap. The larger model already exceeds both the 300 ms latency threshold (350 ms) and the MRR target (0.87), so approaches A, B, and C focus on optimizing the larger model. A flat index has higher retrieval latency than HNSW for large corpora, making option A counterproductive. CloudFront caches HTTP responses but cannot cache semantic search queries effectively because each natural language query has a unique vector. Pre-filtering with optimized HNSW could reduce latency but may not be sufficient to bring 350 ms below 300 ms at p95.
. A company is building an AI assistant for its HR department using Amazon Bedrock Agents. The assistant must be able to answer questions about company policies (stored in a SharePoint knowledge base), look up employee vacation balances (from an internal HR API), and submit vacation requests on behalf of employees. The assistant must only submit requests after explicit employee confirmation. Which Amazon Bedrock feature BEST implements the confirmation requirement?
- A. Configure the Amazon Bedrock Agent with a Lambda function that automatically sends a confirmation email before executing the vacation request API call
- B. Implement human-in-the-loop by configuring the Amazon Bedrock Agent with an action group that returns a confirmation prompt to the user before invoking the submit vacation request action(correct)
- C. Add an Amazon SQS queue between the agent and the HR API so that requests wait in the queue until a human approver manually processes them
- D. Use Amazon Bedrock Guardrails to block any API calls to the vacation submission endpoint unless the conversation contains the phrase 'I confirm'
Explanation: Amazon Bedrock Agents support a return-of-control mechanism where an action group can return a confirmation prompt to the human user before executing a consequential action — the agent pauses, presents the details to the user, and only proceeds after the user confirms. This is the native, purpose-built mechanism for human-in-the-loop approval. A Lambda confirmation email adds asynchrony and does not block execution pending a response; the API could still be called before the user replies. An SQS queue adds manual human approval by a separate approver, not the requesting employee's confirmation, and introduces significant latency. Guardrails content filters are designed for blocking harmful content, not for implementing business workflow confirmation logic.
. A machine learning engineer is fine-tuning a foundation model on Amazon Bedrock to improve its performance on medical diagnosis support. The training dataset consists of 50,000 de-identified patient case summaries with associated diagnoses. After fine-tuning, the model shows improved accuracy on the medical task but the engineer discovers the model now frequently refuses to answer non-medical questions that it previously handled well. Which problem has occurred and what is the MOST appropriate remediation?
- A. The model experienced catastrophic forgetting of general knowledge; remediate by fine-tuning on a mixed dataset of medical and general-purpose instruction examples(correct)
- B. The model developed data poisoning from the patient records; remediate by retraining from scratch on a cleaned dataset with all PII removed
- C. The model overfitted to the medical domain; remediate by reducing the number of fine-tuning epochs and increasing the learning rate
- D. The model experienced reward hacking; remediate by adjusting the reward function in the RLHF training pipeline to penalize non-medical refusals
Explanation: Catastrophic forgetting occurs when fine-tuning on a narrow domain causes a model to overwrite the general-knowledge weights it acquired during pre-training, resulting in degraded performance on out-of-domain tasks. The standard remedy is mixed-dataset fine-tuning that interleaves domain-specific examples with general instruction-following examples to preserve broad capabilities. Data poisoning refers to intentionally malicious training data — the patient records are de-identified and legitimate, not poisoned. Reducing epochs with higher learning rate would make training less stable and would not address the domain narrowing. Reward hacking is a reinforcement learning phenomenon; this was supervised fine-tuning, not RLHF.
. An organization is building a multi-modal generative AI application that ingests scanned PDF contracts and extracts structured information including party names, effective dates, payment terms, and governing law clauses. The extracted data must be stored in Amazon DynamoDB with 99.9% field accuracy. The contracts vary significantly in formatting. Which Amazon Bedrock architecture BEST meets the accuracy and structure requirements?
- A. Use Amazon Textract to extract text from PDFs, then send the raw text to Amazon Bedrock with a prompt requesting JSON output containing all required fields
- B. Send the PDF directly to a multi-modal foundation model on Amazon Bedrock with structured output enforcement using a JSON schema, then validate and store results in Amazon DynamoDB using AWS Lambda(correct)
- C. Use Amazon Textract for text extraction, Amazon Comprehend for entity recognition to identify names and dates, and hardcoded regular expressions to extract payment terms
- D. Fine-tune a foundation model on Amazon Bedrock using 1,000 labeled contract examples with JSON output, then deploy it for production contract extraction
Explanation: Multi-modal foundation models on Amazon Bedrock can process PDF images directly, preserving visual layout context that plain text extraction loses — this is critical for contracts where formatting conveys meaning (tables, headers, signature blocks). Structured output enforcement with a JSON schema ensures the model always returns the required fields in a consistent format that can be directly validated and written to DynamoDB. Amazon Textract with raw text prompt is limited to text-only models that lose layout context, reducing accuracy on variably formatted contracts. Amazon Comprehend entity recognition does not recognize domain-specific contract entities like payment terms or governing law clauses. Fine-tuning on 1,000 examples is insufficient for the diversity of contract formats and adds development overhead without the accuracy guarantee of structured output schemas.
. A developer is building an Amazon Bedrock Agent that orchestrates multiple tools: a web search tool, a calculator tool, and a database query tool. During testing, the agent sometimes selects the wrong tool for a given task, calls tools with incorrect parameters, and occasionally loops between tools without making progress. The developer wants to improve agent reliability without changing the underlying foundation model. Which combination of changes MOST effectively improves agent reliability? (Choose TWO.)
- A. Write detailed action group descriptions that specify exactly when each tool should be used, what input parameters are required, and what types of questions each tool can answer(correct)
- B. Increase the agent's maximum number of orchestration steps from the default to the maximum allowed value to give the agent more attempts to reach the correct answer
- C. Add input validation in the AWS Lambda functions backing each action group to return descriptive error messages with expected parameter formats when the agent passes incorrect parameters(correct)
- D. Enable Amazon Bedrock Guardrails on the agent to block any response that does not contain a tool call, forcing the agent to always use a tool
- E. Switch the underlying foundation model to the largest available Anthropic Claude model to improve tool selection reasoning ability
Explanation: Detailed action group descriptions directly address wrong tool selection — the agent uses these descriptions during planning to decide which tool matches the task, so more specific descriptions improve selection accuracy. Descriptive Lambda error messages address incorrect parameter calls — when the agent receives a clear error explaining the expected format, it can self-correct on the next iteration without looping endlessly. Increasing max orchestration steps does not fix wrong tool selection or bad parameters; it just allows more failed attempts. Guardrails are not designed to enforce agent behavior patterns. Switching to a larger model changes the foundation model, which the question explicitly rules out, and is the most expensive remediation.
. A machine learning engineer is designing a RAG system for a pharmaceutical company's drug interaction database containing 500,000 documents. Users ask clinical questions requiring synthesis of information from multiple documents simultaneously. Benchmarking shows that naive top-K retrieval (K=5) achieves MRR 0.71 but clinicians require MRR ≥ 0.85 for safety-critical use. The documents contain dense technical terminology and numerical data. Infrastructure cost must remain under $0.05 per query. Which retrieval strategy MOST effectively meets the quality requirement?
- A. Increase K from 5 to 50 in the Amazon Bedrock Knowledge Bases retrieval configuration to retrieve more candidate documents and send all 50 to the model
- B. Implement hybrid search combining dense vector retrieval from Amazon OpenSearch Serverless with sparse BM25 keyword retrieval, then apply a cross-encoder reranker model on Amazon SageMaker to rerank the top-20 candidates before sending the top-5 to the foundation model(correct)
- C. Switch the embedding model to a domain-specific biomedical embedding model deployed on Amazon SageMaker and re-embed all 500,000 documents to improve semantic matching for pharmaceutical terminology
- D. Use Amazon Bedrock Agents with a chain-of-thought retrieval loop that issues multiple sequential retrieval calls, synthesizing partial answers from each call before generating the final response
Explanation: Hybrid search combines the strengths of dense retrieval (semantic similarity for conceptual matches) and sparse BM25 (exact keyword matching for drug names and numerical values) — particularly important for pharmaceutical terminology where exact term matching matters as much as semantic meaning. Cross-encoder reranking on the top-20 candidates significantly improves precision by scoring query-document pairs jointly, which consistently boosts MRR by 0.10–0.15 in domain-specific corpora. Increasing K to 50 sends too many tokens to the model (exceeding cost budget and potentially context limits) without improving precision. Switching to a biomedical embedding model would help but requires re-embedding 500,000 documents (significant one-time cost) and alone may not close the full 0.14 MRR gap. The agentic retrieval loop in option D could improve multi-document synthesis but at high latency and per-query cost that may exceed the $0.05 budget.
. A company is using Amazon Bedrock to build a code review assistant that analyzes pull requests and suggests improvements. The assistant must understand the company's internal coding standards, which are documented in 200 pages of internal guidelines not present in the foundation model's training data. The team has 2,000 labeled examples of good and bad code reviews aligned with the internal standards. Total inference budget is $500/month for an estimated 10,000 code reviews per month. Fine-tuning budget is $5,000 one-time. Which approach BEST balances quality, cost, and the coding standards requirement?
- A. Fine-tune Amazon Titan Text Express on Amazon Bedrock using the 2,000 labeled code review examples to align the model with internal standards, then use the fine-tuned model for all production reviews at a lower per-token cost
- B. Store the 200-page guidelines in Amazon Bedrock Knowledge Bases and use RAG to inject relevant sections into each review request with a smaller, cost-efficient foundation model
- C. Use Anthropic Claude 3 Opus for all reviews with the full 200-page guidelines in the system prompt on every request to ensure complete standards coverage
- D. Fine-tune a foundation model on Amazon Bedrock using the 2,000 examples for standards alignment, then layer Amazon Bedrock Knowledge Bases over the fine-tuned model to inject specific guideline sections as supplemental context during inference(correct)
Explanation: Combining fine-tuning with RAG provides complementary benefits: fine-tuning teaches the model the style, format, and judgment patterns of the company's code reviews using the 2,000 labeled examples, while RAG injects the specific applicable guideline sections for each review without exceeding context limits. This hybrid approach maximizes quality at the $5,000 fine-tuning budget. Fine-tuning alone (option A) teaches patterns but cannot inject the 200 pages of specific rule text; the model must memorize rules during fine-tuning, which is unreliable for detailed compliance. RAG alone (option B) without fine-tuning means the model may not follow the company's review style or judgment criteria embedded in the 2,000 examples. Claude 3 Opus with 200-page system prompts would exceed context limits and cost approximately $2,000–3,000/month for 10,000 reviews, well over the $500 budget.
. A machine learning engineer is deploying a generative AI application using Amazon Bedrock that generates product descriptions for an e-commerce platform. The descriptions must be reviewed by the marketing team before publishing. The marketing team reviews 500 descriptions daily but can only process 200 per day manually. The engineer needs to prioritize which AI-generated descriptions require human review versus which can be published automatically. Which approach MOST effectively implements this selective human review pipeline?
- A. Route all 500 descriptions to the marketing team and implement Amazon SQS with a dead letter queue so overflow descriptions are retried the next day
- B. Use Amazon Bedrock with a secondary classification prompt to score each generated description for quality and brand alignment, then route low-confidence scores to Amazon SageMaker Ground Truth for human review and auto-publish high-confidence descriptions(correct)
- C. Implement A/B testing in Amazon CloudWatch where 40% of descriptions are automatically published and 60% are sent for human review to maintain the 200/day review capacity
- D. Use AWS Step Functions to orchestrate a workflow where all descriptions are first sent to Amazon Rekognition for content moderation before routing to the marketing team
Explanation: Using a secondary Bedrock classification call to score quality and brand alignment creates an intelligent triage layer: high-confidence, clearly aligned descriptions are auto-published, while ambiguous or low-quality ones are routed to Amazon SageMaker Ground Truth (a human review and annotation service), staying within the 200/day human capacity. SQS with dead letter queue just queues the overflow with no intelligence — descriptions are still delayed and no prioritization occurs. A/B testing publishing 40% automatically without quality filtering could publish poor descriptions, damaging brand reputation. Amazon Rekognition performs image and video content moderation, not text quality or brand alignment evaluation for product descriptions.
. A company is deploying an Amazon Bedrock application that assists human resources professionals in screening job applications. During testing, the team discovers the model more frequently rates applications from candidates with non-Western names as less qualified than equally credentialed candidates with Western names. The application will be used for hiring decisions affecting thousands of candidates. Which action should the team take FIRST before deployment?
- A. Deploy the application with a disclaimer that AI recommendations are not binding and the final decision rests with human recruiters
- B. Halt deployment, conduct a fairness audit using Amazon SageMaker Clarify to measure disparate impact across demographic groups, and implement bias mitigation before releasing(correct)
- C. Retrain the model with a balanced dataset that oversamples candidates with non-Western names to correct the bias discovered in testing
- D. Remove candidate names from the application inputs before sending to the model to eliminate the name-based bias signal
Explanation: Deploying a model with known demographic bias in hiring creates serious legal exposure under employment discrimination law and causes real harm to candidates. Halting deployment and conducting a formal fairness audit with SageMaker Clarify to quantify disparate impact across groups is the required first step before any remediation or release. A disclaimer does not mitigate the actual bias or legal liability — recruiters may still over-rely on AI recommendations. Retraining with oversampling addresses one bias signal (name frequency in training data) but does not guarantee removal of all demographic biases, and should follow the audit. Removing names (option D) is a reasonable partial mitigation that addresses the discovered signal but does not address other potential proxies for demographics that may still be in the data.
. An organization has deployed an Amazon Bedrock application that generates medical information summaries for patients. Post-deployment monitoring reveals the model occasionally generates plausible-sounding but medically inaccurate statements — a behavior known as hallucination. Patient safety is paramount. Which set of controls MOST comprehensively addresses hallucination risk in this high-stakes medical context?
- A. Set the model temperature to 0.0 to eliminate randomness, which prevents the model from generating any content not directly copied from the prompt
- B. Implement RAG with Amazon Bedrock Knowledge Bases sourcing from verified medical literature, configure Amazon Bedrock Guardrails with grounding checks to detect ungrounded claims, and add a human clinician review step before summaries are delivered to patients(correct)
- C. Switch from a generative model to Amazon Comprehend Medical for information extraction, which only extracts entities explicitly present in the source text without generation
- D. Add a second Amazon Bedrock model call to critique the generated summary and flag potential inaccuracies, then display only summaries that pass the self-critique step to patients
Explanation: For safety-critical medical information, a layered defense is required: RAG grounds responses in verified medical literature (reducing hallucination at the source), Guardrails grounding checks automatically detect claims not supported by retrieved context (catching residual hallucinations), and human clinician review provides the final safety net for patient-facing content. Temperature 0.0 makes outputs deterministic but does not prevent hallucination — models hallucinate at temperature 0 when they lack knowledge of a topic. Amazon Comprehend Medical cannot synthesize summaries or explain complex medical information; it extracts clinical entities from existing text. Self-critique with a second model call can catch some inaccuracies but the second model shares the same hallucination failure mode and cannot reliably distinguish truth from confident-sounding errors without grounded references.
. A machine learning engineer is building a generative AI application that summarizes customer support call transcripts. The transcripts contain customers' names, phone numbers, addresses, and payment information. The summarization model is accessed via Amazon Bedrock and the summaries are stored in Amazon S3. The privacy team requires that no PII appear in the stored summaries. Which approach MOST effectively prevents PII from being stored in the summaries?
- A. Configure Amazon Bedrock Guardrails with a PII sensitive information filter that detects and redacts PII in both the input transcripts and the generated summaries before storage(correct)
- B. Use Amazon Comprehend to detect and redact PII from the transcript before sending it to Amazon Bedrock, so the model never receives PII and cannot include it in the summary
- C. Store the summaries in an Amazon S3 bucket with server-side encryption using AWS KMS and restrict access using IAM policies to prevent unauthorized access to PII
- D. Add an instruction to the prompt telling the model to avoid including any customer personal information in the generated summary
Explanation: Amazon Bedrock Guardrails with PII sensitive information filters provides automated detection and redaction at both the input and output layers: it prevents PII from reaching the model in the input AND blocks PII from appearing in generated summaries before they are stored — providing defense-in-depth. Amazon Comprehend pre-redaction only addresses the input; if the model infers or reconstructs PII patterns from context (e.g., referencing 'the customer' whose details appeared earlier in the conversation), the output could still contain PII. Encryption at rest (option C) protects stored data from unauthorized access but does not prevent PII from being written to the summaries in the first place. Prompt instructions are unreliable for privacy enforcement — models do not consistently follow all instructions, especially for implicit PII.
. A company is deploying a generative AI model using Amazon Bedrock for employee performance evaluations. The model will analyze employee work history, peer feedback, and project outcomes to generate written performance assessments. The legal team requires auditability: every AI-generated assessment must be traceable to the specific data points used to generate it, and employees must be able to contest any evaluation they believe is inaccurate. Which architectural controls MOST effectively satisfy these legal requirements?
- A. Store all Amazon Bedrock API request and response payloads in Amazon CloudWatch Logs with a 7-year retention policy to satisfy audit trail requirements
- B. Use Amazon Bedrock with model invocation logging enabled to Amazon S3, implement RAG so each generated assessment includes citations to specific retrieved data points, and create an employee-facing appeal workflow backed by Amazon SageMaker Ground Truth for human re-evaluation of contested assessments(correct)
- C. Fine-tune the model on historical performance evaluation examples so it learns the company's evaluation style, then log the final generated assessments to Amazon DynamoDB for employee review
- D. Configure AWS CloudTrail to log all Amazon Bedrock API calls and use Amazon Macie to scan assessment outputs for compliance with evaluation standards
Explanation: Full traceability requires model invocation logging (capturing exact inputs and outputs), RAG citations (linking each claim in the assessment to the specific retrieved data point), and a human re-evaluation path for contestation via SageMaker Ground Truth. Together these satisfy both the auditability requirement (what data drove the assessment) and the contest right (a defined process for human override). CloudWatch Logs of API payloads alone provide data storage but no citation trail linking assessment claims to source data points. Fine-tuning on historical examples embeds evaluation patterns in model weights with no traceable connection to the specific data used for each employee — this cannot satisfy citation-level auditability. AWS CloudTrail logs API metadata (who called what when) and Amazon Macie scans for sensitive data; neither addresses the requirement for per-assessment data source traceability.
. A financial services company is using Amazon Bedrock to build a generative AI application that processes customer financial data for investment recommendations. The company is subject to SEC regulations requiring that AI-generated recommendations be explainable, that customer data not leave regulated AWS regions, and that all model access be restricted to authorized financial advisors only. Which combination of controls MOST comprehensively addresses all three regulatory requirements?
- A. Deploy Amazon Bedrock in us-east-1, use Amazon Cognito for advisor authentication, and add a system prompt instructing the model to explain its recommendations
- B. Configure Amazon Bedrock in a designated AWS GovCloud region, use AWS IAM Identity Center with MFA for advisor access control, implement Amazon Bedrock Guardrails for output filtering, and use RAG with citation sources to provide explanation trails for each recommendation
- C. Use Amazon Bedrock in the company's designated regulated regions, enforce access via IAM policies restricting Amazon Bedrock InvokeModel permissions to an advisors IAM group, implement RAG with Amazon Bedrock Knowledge Bases to ground recommendations in approved sources and generate citations, and enable Amazon Bedrock model invocation logging to an encrypted S3 bucket in the same region(correct)
- D. Use AWS PrivateLink to access Amazon Bedrock without data leaving the VPC, restrict access using Amazon VPC security groups to advisor workstations, and store all model outputs in Amazon RDS with encryption at rest
Explanation: Option C addresses all three requirements: regulated region deployment ensures data residency compliance; IAM policies restricting InvokeModel to an advisors group enforces access control with auditability; RAG with citations provides the explainability required by SEC (each recommendation is grounded in specific cited sources); invocation logging to encrypted S3 satisfies audit trail requirements. Option B's GovCloud region is appropriate for U.S. government workloads and adds unnecessary cost for SEC-regulated private financial firms. A system prompt instruction for explanations (option A) is unreliable and does not constitute regulatory-grade explainability. AWS PrivateLink and VPC security groups (option D) control network-level access but do not address data residency at the service level or provide the citation-level explainability required.
. A machine learning engineer is designing the security posture for an Amazon Bedrock application that processes confidential merger and acquisition documents for a consulting firm. The application uses Amazon Bedrock Knowledge Bases with Amazon OpenSearch Serverless. Multiple client engagements run on the same infrastructure and documents from different clients must never be accessible across engagements. The firm requires that all data be encrypted with client-specific keys and that any model invocation be logged for billing attribution. Which architecture MOST effectively enforces client data isolation and auditability?
- A. Create a single Amazon Bedrock Knowledge Bases instance with metadata filters applied at query time to restrict each engagement to its own documents, and use a single AWS KMS key for all data encryption
- B. Create separate Amazon Bedrock Knowledge Bases instances per client engagement, each backed by a dedicated Amazon OpenSearch Serverless collection encrypted with a client-specific AWS KMS Customer Managed Key, enforce IAM policies scoping each application role to its engagement's Knowledge Base ARN, and enable Amazon Bedrock model invocation logging with engagement ID tags for billing attribution(correct)
- C. Store all client documents in a single Amazon S3 bucket with S3 Object Lock and bucket policies requiring client-specific IAM roles for access, then use Amazon Bedrock with a metadata filter prompt to ensure the model only discusses documents tagged with the current client ID
- D. Use Amazon Macie to continuously scan the Knowledge Bases for cross-client data leakage, configure Amazon GuardDuty for anomalous access detection, and use AWS CloudTrail for API-level audit logging of all Bedrock invocations
Explanation: Separate Knowledge Bases instances with dedicated OpenSearch Serverless collections per client enforces hard infrastructure-level isolation — there is no code path by which a query for client A can retrieve documents belonging to client B. Client-specific CMKs mean even AWS cannot cross-decrypt client data. IAM policies scoped to engagement-specific ARNs enforce least-privilege access. Invocation logging with engagement ID tags enables per-client billing attribution. Metadata filters (option A) are a soft control applied at query time; a misconfigured filter or an application bug can leak cross-client documents, which is unacceptable for M&A confidentiality. Relying on the model itself to restrict output based on document tags (option C) is a prompt-level soft control with no infrastructure-level isolation. Amazon Macie and GuardDuty (option D) are detective controls that would discover a breach after the fact — they do not prevent cross-client data access.