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
Wrong: Prompt instructions are unreliable and can be ignored by the model; the issue already occurs despite guardrails, so prompting alone won't suffice.
- ✗
Fine-tune the foundation model on a dataset that excludes PII.
Why it's wrong here
Wrong: Fine-tuning is costly and time-consuming, and may not completely eliminate PII leakage as the model could still generate PII from patterns.
- ✗
Increase the guardrail sensitivity to 'MAXIMUM'.
Why it's wrong here
Wrong: Maximum sensitivity may increase false positives but still may not catch context-based PII; also may block legitimate content.
- ✓
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
Correct: Amazon Comprehend provides robust PII detection that can catch context-based PII. The Lambda function can be optimized for low latency and added cost is minimal.
Go deeper
Related to this question
About these practice questions
One of 619 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.