Skill 2.1.2: Identify fine-tuning strategies for pre-trained FMs to meet business needs
| Question | Answer & Explanation |
|---|---|
| ### Question 1 - Choosing Between Prompting and Supervised Fine-Tuning An e-commerce company is using an Amazon Bedrock foundation model (FM) to generate product descriptions. They have spent two weeks adding detailed instructions and five few-shot examples to the prompt to enforce a specific brand tone and markdown formatting. Despite these efforts, evaluations show the model still fails to follow the formatting rules 20% of the time. The team has 10,000 high-quality examples of product features paired with their ideal marketing descriptions. Which customization strategy will best resolve the formatting inconsistencies with the least ongoing operational overhead? Which ONE approach is the MOST appropriate? (Select ONE) - A) Implement Amazon Bedrock Knowledge Bases to retrieve the 10,000 examples and append them to the prompt dynamically. - B) Perform Supervised Fine-Tuning (SFT) on the foundation model using the 10,000 labeled input-output pairs. - C) Apply Reinforcement Fine-Tuning using a reward function that scores markdown formatting correctness. - D) Increase the number of few-shot examples in the prompt from 5 to 50 to enforce the formatting rules. |
Correct Answer: B Correct Answer Analysis: - B is Correct: The standard progression is Prompt Engineering \(\rightarrow\) Fine-Tuning. Since prompt engineering has already been thoroughly tried and failed to close the formatting gap, Supervised Fine-Tuning (SFT) is the appropriate next step. SFT uses labeled input-output pairs to update the model's weights, ensuring consistent adherence to formatting rules without consuming massive context windows at inference time. Distractor Analysis: - A is Incorrect: RAG is used to inject external factual knowledge, not to teach a model a specific stylistic or formatting behavior. Injecting 10,000 examples into a prompt is also technically unfeasible due to context window limits and would drastically increase latency and cost. - C is Incorrect: Reinforcement fine-tuning is useful for optimizing subjective tasks like helpfulness or safety using reward models, but it is overkill and less direct than SFT when you already have 10,000 high-quality labeled input-output pairs demonstrating the exact desired behavior. - D is Incorrect: Scaling few-shot examples to 50 dramatically increases token usage, latency, and cost per inference request. SFT bakes the behavior into the weights, resulting in zero token overhead for examples at inference. > Exam Tip: Always exhaust prompt engineering first, but when a persistent formatting/terminology gap exists and you have thousands of labeled examples, Supervised Fine-Tuning is the right choice to minimize inference cost and maximize consistency. |
| ### Question 2 - Identifying Reinforcement Fine-Tuning Use Cases A legal tech startup is building an assistant using an Amazon Bedrock foundation model to draft legal arguments. The team does not have a large dataset of perfect input-output pairs, but they do have a panel of senior lawyers who can define strict scoring criteria based on legal soundness, logical flow, and citation accuracy. The team wants the model to automatically learn and improve its argument generation based on these scoring criteria. Which fine-tuning strategy should the team use? Which ONE approach meets these requirements? (Select ONE) - A) Supervised Fine-Tuning (SFT) - B) Domain Adaptation Pre-training - C) Reinforcement Fine-Tuning - D) Knowledge Base Retrieval Augmented Generation (RAG) |
Correct Answer: C Correct Answer Analysis: - C is Correct: Reinforcement Fine-Tuning uses a reward function (in this case, the senior lawyers' scoring criteria for legal soundness) to evaluate and improve model outputs. The model learns by generating responses and receiving scores, optimizing its behavior over time to maximize the reward. This is ideal when you lack a large dataset of labeled examples but have a clear way to evaluate the quality of the output. Distractor Analysis: - A is Incorrect: SFT requires a large dataset of labeled input-output pairs, which the scenario explicitly states they do not have. - B is Incorrect: Domain Adaptation Pre-training involves continuing the pre-training phase on a large corpus of unlabeled domain-specific text (e.g., legal textbooks). It does not directly optimize for specific scoring criteria or task performance. - D is Incorrect: RAG fetches external documents to provide context, but it does not change the model's inherent ability to structure a logical legal argument based on subjective scoring criteria. > Exam Tip: If the scenario describes evaluating model responses against specific rules or scoring criteria (reward functions) rather than providing exact target answers, choose Reinforcement Fine-Tuning. |
| ### Question 3 - Understanding Distillation in Amazon Bedrock A healthcare provider is using a large, highly accurate foundation model (FM) in Amazon Bedrock for complex medical Q&A. However, the inference costs and latency are too high for real-time patient triage. They want to transfer the reasoning capabilities of the large FM to a smaller, faster, and cheaper FM. The team has a set of 5,000 common medical prompts but no target responses. Which fine-tuning strategy should they use to achieve this goal with the least operational overhead? Which ONE approach meets these requirements? (Select ONE) - A) Supervised Fine-Tuning (SFT) using the 5,000 prompts. - B) Reinforcement Fine-Tuning using a medical accuracy reward model. - C) Distillation via Amazon Bedrock. - D) Deploying the smaller model with Amazon Bedrock Guardrails. |
Correct Answer: C Correct Answer Analysis: - C is Correct: Distillation in Amazon Bedrock allows you to transfer the behavior of a larger "teacher" model to a smaller "student" model. The managed service generates the teacher responses from the set of prompts you provide, and then fine-tunes the student model on these prompt-response pairs. This improves the smaller model's performance without requiring you to manually label the 5,000 prompts. Distractor Analysis: - A is Incorrect: SFT requires labeled input-output pairs. The team only has prompts, making SFT impossible without manual labeling. - B is Incorrect: Reinforcement fine-tuning is complex and requires building and maintaining a reward model, which introduces unnecessary operational overhead compared to Bedrock's managed distillation pipeline. - D is Incorrect: Guardrails are used for safety, content filtering, and PII redaction. They do not improve a smaller model's reasoning capabilities. > Exam Tip: Distillation is the managed process of using a large, smart model to generate training data (responses) for a smaller, faster model, reducing costs and latency while retaining capability. |
| ### Question 4 - Mitigating Catastrophic Forgetting A financial institution has performed supervised fine-tuning on an Amazon Bedrock foundation model using a proprietary dataset of 50,000 internal trading reports. After deployment, the model performs exceptionally well on trading analysis, but it has lost its general conversational abilities and fails at basic reasoning tasks outside of finance. The team needs to resolve this issue while maintaining the domain-specific performance. Which strategy should the ML engineering team apply? Which ONE approach should the team take? (Select ONE) - A) Increase the learning rate during the next fine-tuning job. - B) Blend broader, general-purpose data into the proprietary training mixture. - C) Switch to Reinforcement Fine-Tuning. - D) Decrease the batch size during the fine-tuning job. |
Correct Answer: B Correct Answer Analysis: - B is Correct: The model is experiencing "catastrophic forgetting," where training hard on a narrow domain causes the model to lose general capabilities it previously had. The standard defense is to blend broader, general-purpose data into the training mixture alongside the domain-specific data. This helps the model retain its general reasoning while learning the new domain. Distractor Analysis: - A is Incorrect: Increasing the learning rate would make the model adapt faster to the financial data, potentially worsening the catastrophic forgetting. - C is Incorrect: Switching to Reinforcement Fine-Tuning addresses a different optimization strategy (using reward functions) and does not inherently solve catastrophic forgetting unless general data is also evaluated. - D is Incorrect: Decreasing the batch size might marginally affect training stability but is not the recognized strategy for preventing catastrophic forgetting. > Exam Tip: Catastrophic forgetting occurs when an FM loses its general abilities after being fine-tuned too heavily on a narrow domain. The solution is to mix general-purpose data into the fine-tuning dataset. |
| ### Question 5 - Data Preparation for Supervised Fine-Tuning A machine learning engineer is preparing a dataset for Supervised Fine-Tuning (SFT) of a foundation model in Amazon Bedrock. The use case is to train the model to generate JSON-formatted outputs based on user queries regarding order status. The dataset consists of thousands of historical user queries and their corresponding correct JSON responses. In what format must this data be prepared and stored in Amazon S3 for the Bedrock SFT job to successfully ingest it? Which ONE format is required? (Select ONE) - A) CSV files with comma-separated prompt and completion columns. - B) Parquet files partitioned by date. - C) JSONL (JSON Lines) files containing prompt-completion pairs. - D) Unstructured text documents (.txt) with a delimiter between examples. |
Correct Answer: C Correct Answer Analysis: - C is Correct: For Supervised Fine-Tuning in Amazon Bedrock, the training data must be prepared as JSONL (JSON Lines) files. Each line in the file represents a single training example, typically structured as a JSON object containing the prompt (input) and the completion (expected output). Distractor Analysis: - A is Incorrect: CSV is not the supported format for Bedrock fine-tuning datasets, as it struggles with complex nested JSON structures and multi-line text formatting common in LLM training. - B is Incorrect: While Parquet is highly optimized for analytics and SageMaker processing, Bedrock SFT natively ingests JSONL for prompt-completion pairs. - D is Incorrect: Unstructured text is used for continued pre-training, not for supervised fine-tuning which requires explicit input-output mapping. > Exam Tip: Supervised Fine-Tuning requires labeled data. In Amazon Bedrock, this data must be formatted as JSONL (JSON Lines), with each line containing a prompt and its corresponding completion. |
| ### Question 6 - Preparing Data for Distillation A company wants to use Amazon Bedrock to distill the knowledge of a large foundation model (Teacher) into a smaller foundation model (Student) to reduce inference costs. The engineering team is tasked with preparing the training dataset. What must the team provide to the Bedrock distillation job, and how does Bedrock handle the teacher model? Which ONE approach is correct for Bedrock Distillation? (Select ONE) - A) Provide a dataset of prompts; Bedrock automatically generates the teacher responses and trains the student model. - B) Provide a dataset of prompts and manually generated teacher responses; Bedrock trains the student model. - C) Provide a reward function that evaluates the teacher's responses; Bedrock trains the student model. - D) Provide an unlabeled corpus of domain text; Bedrock generates synthetic prompts and trains the student model. |
Correct Answer: A Correct Answer Analysis: - A is Correct: In Amazon Bedrock, the distillation process simplifies data preparation. You only need to provide a set of prompts. The managed service automatically invokes the teacher model to generate responses for those prompts, and then uses the generated prompt-response pairs to fine-tune the smaller student model. Distractor Analysis: - B is Incorrect: You do not need to manually generate the teacher responses. Bedrock's managed distillation handles this step, which is the primary operational benefit of the service. - C is Incorrect: Distillation does not use a reward function; that is the mechanism for Reinforcement Fine-Tuning. - D is Incorrect: Distillation requires a set of prompts to guide the distillation process, not an unlabeled corpus of domain text (which would be used for continued pre-training). > Exam Tip: For Bedrock distillation, prepare a dataset of prompts. Bedrock handles the heavy lifting by calling the teacher model to generate the responses, which are then used to train the smaller student model. |
| ### Question 7 - Evaluating When Not to Fine-Tune An AI engineer is building a Q&A bot for a rapidly changing product documentation library. The documentation is updated multiple times a day. The team has tried prompt engineering, but the model still occasionally hallucinates product specifications. A junior engineer suggests Supervised Fine-Tuning on the documentation to eliminate hallucinations. Why is fine-tuning the wrong choice for this specific scenario, and what is the correct approach? Which ONE statement best explains the issue and the correct approach? (Select ONE) - A) Fine-tuning is too expensive; instead, use a larger foundation model to improve reasoning. - B) Fine-tuning takes too long to deploy; instead, write fixed rules for the Q&A bot. - C) Fine-tuning writes knowledge into weights, which cannot be updated quickly; instead, use Amazon Bedrock Knowledge Bases (RAG). - D) Fine-tuning will cause catastrophic forgetting; instead, use Amazon Bedrock Guardrails. |
Correct Answer: C Correct Answer Analysis: - C is Correct: Fine-tuning embeds knowledge into the model's weights. If the documentation changes multiple times a day, you would have to continuously run expensive and time-consuming fine-tuning jobs to keep the model's knowledge current. Retrieval-Augmented Generation (RAG) via Amazon Bedrock Knowledge Bases keeps the knowledge external in a vector database. When docs are updated, only the vector index needs to be re-ingested (taking minutes), and the model retrieves the latest information at query time. Distractor Analysis: - A is Incorrect: While fine-tuning is expensive, the primary reason it's wrong here is the frequency of data updates. A larger model does not solve the hallucination of rapidly changing external facts. - B is Incorrect: Writing fixed rules for a Q&A bot over a large documentation library is impossible to scale and maintain. - D is Incorrect: While catastrophic forgetting is a risk of fine-tuning, it is not the primary reason to avoid it in this context. Guardrails filter content but do not inject up-to-date external factual knowledge. > Exam Tip: Fine-tuning teaches a model how to behave (style, format, tone), while RAG provides a model what to know (facts, documents). For rapidly changing external knowledge, always choose RAG. |
| ### Question 8 - Fine-Tuning vs. Provisioned Throughput A company is planning to fine-tune a foundation model in Amazon Bedrock using their proprietary data. They anticipate that after fine-tuning, the model will be used in a high-traffic production application with strict latency requirements. The ML engineer needs to ensure the fine-tuned model is deployed with the appropriate infrastructure to handle the load. Which AWS service or feature should the engineer configure to guarantee consistent throughput for the fine-tuned model? Which ONE feature should be configured? (Select ONE) - A) Amazon Bedrock Guardrails - B) Amazon Bedrock Provisioned Throughput - C) Amazon SageMaker Real-Time Endpoints - D) AWS Lambda concurrency limits |
Correct Answer: B Correct Answer Analysis: - B is Correct: Amazon Bedrock Provisioned Throughput allows you to purchase model units (MUs) dedicated to your application. This guarantees consistent throughput and low latency for high-traffic production applications using your fine-tuned Bedrock models, avoiding rate limiting or latency spikes associated with On-Demand usage. Distractor Analysis: - A is Incorrect: Guardrails are used for safety, content filtering, and PII redaction, not for managing compute throughput or latency. - C is Incorrect: If you fine-tune a model in Amazon Bedrock, it is hosted in Bedrock. You do not export it to host on SageMaker endpoints unless you are using SageMaker JumpStart. Bedrock has its own throughput management. - D is Incorrect: AWS Lambda is an orchestration tool that might call the Bedrock API, but Lambda concurrency does not guarantee the Bedrock model itself has the capacity to respond without throttling. > Exam Tip: For high-traffic, latency-sensitive applications using fine-tuned models in Amazon Bedrock, configure Provisioned Throughput to reserve dedicated compute capacity. |
| ### Question 9 - Combining RAG and Fine-Tuning An enterprise is developing a customer support assistant using Amazon Bedrock. The assistant must answer questions based on the company's internal knowledge base (which changes weekly) and must respond in a highly specific, empathetic tone that matches the company's brand guidelines. The team has 5,000 examples of prompt-response pairs demonstrating the desired tone, but no labeled data for the factual knowledge base. What is the MOST appropriate strategy to meet both requirements? Which ONE approach meets these requirements? (Select ONE) - A) Perform Supervised Fine-Tuning on the 5,000 examples to teach the tone, and use Amazon Bedrock Knowledge Bases for factual retrieval. - B) Perform Supervised Fine-Tuning on the 5,000 examples and append the internal knowledge base text into the fine-tuning dataset. - C) Use Amazon Bedrock Knowledge Bases for factual retrieval, and add 10 few-shot examples of the desired tone to the prompt. - D) Perform Distillation using a large teacher model that already knows the company's tone and facts. |
Correct Answer: A Correct Answer Analysis: - A is Correct: This is a classic case for combining customization approaches. Supervised Fine-Tuning (SFT) is used to teach the model the desired behavior (empathetic tone, formatting) using the 5,000 examples. Amazon Bedrock Knowledge Bases (RAG) is used to handle the dynamic factual knowledge (internal knowledge base that changes weekly). This separation ensures the tone is baked into the weights, while facts are retrieved in real-time. Distractor Analysis: - B is Incorrect: Baking the internal knowledge base into the fine-tuning dataset is wrong because the knowledge base changes weekly, requiring constant retraining. It also mixes "how to behave" with "what to know." - C is Incorrect: If 10 few-shot examples could reliably enforce the specific empathetic tone, it might work, but the scenario implies a need for strict brand guidelines that usually necessitate SFT. Given the availability of 5,000 examples, SFT is the more robust approach for tone consistency, reducing token overhead at inference. - D is Incorrect: Distillation is used to reduce model size/cost, not to simultaneously enforce tone and inject dynamic factual knowledge. > Exam Tip: Fine-tuning teaches behavior (tone, style, format); RAG provides knowledge (facts, documents). For complex applications requiring both, combine SFT (for behavior) with RAG (for knowledge). |
| ### Question 10 - Evaluating Fine-Tuning Strategies for Latency Reduction A gaming company is running a large foundation model via Amazon Bedrock to generate real-time non-player character (NPC) dialogue. The application currently uses a massive prompt containing 50 examples of the desired dialogue style, the game's lore, and character backstories. The prompt works well, but the latency is too high for real-time interaction due to the massive context window being processed on every request. The team has no dedicated GPU infrastructure for hosting. Which strategy will reduce latency to acceptable levels with the LEAST operational overhead? Which ONE approach meets these requirements? (Select ONE) - A) Export the model and deploy it on Amazon SageMaker JumpStart with a smaller instance type. - B) Perform Supervised Fine-Tuning on the foundation model using the 50 examples, then remove the examples from the prompt at inference. - C) Implement Amazon Bedrock Knowledge Bases to store the 50 examples and retrieve them dynamically. - D) Switch to a smaller foundation model and keep the 50 examples in the prompt. |
Correct Answer: B Correct Answer Analysis: - B is Correct: The high latency is caused by processing a massive prompt (50 examples + lore) on every single request. By performing Supervised Fine-Tuning (SFT) with those 50 examples, the model learns the desired style and lore directly into its weights. At inference time, the 50 examples can be removed from the prompt. This drastically reduces the input token count, lowering processing time and latency, all within the managed Amazon Bedrock environment (least operational overhead). Distractor Analysis: - A is Incorrect: Exporting the model and managing it on SageMaker introduces high operational overhead compared to keeping it in Bedrock. Also, just using a smaller instance might degrade quality and doesn't solve the prompt processing bottleneck. - C is Incorrect: Using RAG (Knowledge Bases) to retrieve examples will still require injecting those examples into the prompt context at inference time, meaning the context window remains large and latency remains high. - D is Incorrect: Switching to a smaller model while keeping the 50 examples might reduce processing time slightly, but a smaller model may not have the capacity to process 50 examples effectively in context, and it doesn't address the root cause of the high latency (the oversized prompt). > Exam Tip: If an application relies on massive few-shot prompts that cause high latency, Supervised Fine-Tuning allows you to bake those examples into the model weights, allowing you to use a much smaller prompt at inference time, dramatically reducing latency and cost. |