A developer is using the Amazon Bedrock API to generate text. They notice that the model sometimes returns harmful content despite setting safety parameters. What is the BEST way to add an additional layer of content filtering?
Guardrails provide configurable content filters to block harmful content.
Why this answer
Amazon Bedrock Guardrails provides a dedicated, configurable content filtering layer that can block harmful content at inference time, independent of the model's built-in safety parameters. This allows developers to enforce custom policies (e.g., hate speech, violence) without modifying the model itself, making it the best additional safeguard.
Exam trap
The AIF-C01 exam often tests the misconception that fine-tuning or prompt engineering alone can fully prevent harmful outputs, when in fact a separate, configurable guardrail layer is the recommended approach for production-grade content filtering in Amazon Bedrock.
How to eliminate wrong answers
Option A is wrong because fine-tuning the model on a curated safe dataset adjusts the model's weights to reduce harmful outputs, but it does not guarantee filtering of all harmful content at inference and requires significant retraining effort; it is not an 'additional layer' but a model modification. Option C is wrong because improving prompt engineering with more specific instructions can guide the model's behavior but cannot reliably block harmful content that the model might generate despite instructions, as it lacks enforcement at the API response level. Option D is wrong because AWS WAF is a web application firewall designed to filter HTTP requests to web applications, not to inspect or filter the content of API responses from Bedrock; it operates at the network layer, not the application content layer.