AIF-C01 Applications of Foundation Models Practice Question
A financial services company is deploying a foundation model on Amazon Bedrock to generate compliance reports from internal audit logs. The model must not output any personally identifiable information (PII). They have configured a Bedrock Guardrail with sensitive information filters set to the 'HIGH' sensitivity level. During testing in a staging environment, testers still observed PII being occasionally generated in the report outputs. The guardrail did not block these instances because the PII was embedded in a context that the guardrail's pattern matching did not catch (e.g., structured JSON data with embedded names). The company requires a solution that minimizes latency and cost, as they process thousands of reports daily. They cannot afford to increase inference time significantly due to strict SLAs. They also want to avoid re-engineering the entire solution. Which additional step should they take to effectively eliminate PII leakage while maintaining performance?
⚠ Common exam trap
Test-takers frequently assume increasing guardrail sensitivity or prompt engineering can solve all PII detection failures, but they overlook that guardrails rely on pattern matching and cannot handle contextually embedded PII, whereas a dedicated ML-based detection service like Amazon Comprehend is designed for that exact scenario.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Implement a post-processing Lambda function that uses Amazon Comprehend's PII detection to scan and redact any PII from the model output before returning it.
Amazon Comprehend's PII detection API can be invoked as a post-processing step to scan and redact PII from the model output without requiring any changes to the model or guardrail configuration. This approach adds minimal latency (typically under 100ms per request) and cost per API call is low, making it suitable for high-throughput scenarios. It directly addresses the guardrail's failure to catch PII embedded in structured contexts like JSON, as Comprehend uses machine learning models that can identify PII even when it's not in plain text patterns.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Add a prompt instruction to the model to never output PII, with few-shot examples of non-PII outputs.
Why it's wrong here
Prompt instructions and few-shot examples only bias generation probabilistically; they cannot guarantee that structured JSON with embedded names is stripped, so leakage persists. This approach suits steering style or format, but the scenario needs deterministic detection and redaction of PII patterns after generation, which instructions alone cannot enforce.
- ✗
Fine-tune the foundation model on a dataset that excludes PII.
Why it's wrong here
Fine-tuning changes model weights and behaviour but cannot guarantee PII suppression, since the model may still generate sensitive strings from prompt context; it also requires training data, cost and retraining cycles. It suits adapting tone or domain style, not enforcing deterministic output filtering, which a post-generation guardrail layer handles.
- ✗
Increase the guardrail sensitivity to 'MAXIMUM'.
Why it's wrong here
Guardrail sensitivity levels adjust confidence thresholds for the existing pattern-matching filters; they do not add detection for structured JSON-embedded names that the filters never parse. Raising sensitivity to MAXIMUM risks more false positives without catching the missed PII. Guardrails suit general content moderation, not schema-aware PII redaction.
- ✓
Implement a post-processing Lambda function that uses Amazon Comprehend's PII detection to scan and redact any PII from the model output before returning it.
Why this is correct
Amazon Comprehend's PII detection uses trained machine-learning models rather than regex patterns, so it recognises names embedded in structured JSON that Guardrail filters miss. Running it as a post-processing Lambda adds only milliseconds per report, satisfying the latency and cost constraints without re-engineering the Bedrock invocation path.
Go deeper
Related to this question
About these practice questions
One of 862 original AIF-C01 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AIF-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AIF-C01 exam.