AIP-C01 practice question 2 of 15

A company is developing a customer communication platform that uses an AI assistant powered by an Amazon Bedrock foundation model (FM). The AI…

Full set: 127 questions
A company is developing a customer communication platform that uses an AI assistant powered by an Amazon Bedrock foundation model (FM). The AI assistant summarizes customer messages and generates initial response drafts. The company wants to use Amazon Comprehend to implement layered content filtering. The layered content filtering must prevent sharing of offensive content, protect customer privacy, and detect potential inappropriate advice solicitation. Inappropriate advice solicitation includes requests for unethical practices, harmful activities, or manipulative behaviors. The solution must maintain acceptable overall response times, so all pre-processing filters must finish before the content reaches the FM. Which solution will meet these requirements?
Answer options
A: Use parallel processing with asynchronous API calls. Use toxicity detection for offensive content. Use prompt safety classification for inappropriate advice solicitation. Use personally identifiable information (PII) detection without redaction.
B: Use custom classification to build an FM that detects offensive content and inappropriate advice solicitation. Apply personally identifiable information (PII) detection as a secondary filter only when messages pass the custom classifier.
C: Deploy a multi-stage process. Configure the process to use prompt safety classification first, then toxicity detection on safe prompts only, and finally personally identifiable information (PII) detection in streaming mode. Route flagged messages through Amazon EventBridge for human review.
D: Use toxicity detection with thresholds configured to 0.5 for all categories. Use parallel processing for both prompt safety classification and personally identifiable information (PII) detection with entity redaction. Apply Amazon CloudWatch alarms to filter metrics. Correct answer
Correct Answer:
D. Use toxicity detection with thresholds configured to 0.5 for all categories. Use parallel processing for both prompt safety classification and personally identifiable information (PII) detection with entity redaction. Apply Amazon CloudWatch alarms to filter metrics.
Explanation

This solution effectively meets all requirements. Using parallel processing for the different Amazon Comprehend API calls (toxicity, prompt safety, PII) is crucial for minimizing latency, as all filters must run before the FM is invoked. It correctly maps the requirements to the specific Comprehend features: toxicity detection for offensive content, prompt safety classification for inappropriate advice, and PII detection with entity redaction to protect customer privacy. Configuring thresholds and alarms are standard best practices for operationalizing such a filtering system.

Why Incorrect

A. This option fails the privacy requirement because it specifies PII detection without redaction, which would identify but not protect the sensitive information.
B. Building a custom classification model is high effort and unnecessary when standard Comprehend features meet the needs. Applying PII detection conditionally is inefficient.
C. A multi-stage, serial process would increase latency, violating the requirement for acceptable response times, as each filter would have to wait for the previous one to complete.

References

1. AWS Documentation. (2024). Amazon Comprehend Developer Guide. See "Detecting personally identifiable information (PII)". (Describes the DetectPiiEntities operation and the ability to redact PII).

2. AWS Documentation. (2024). Amazon Comprehend Developer Guide. See "Prompt safety classification". (Explains this feature is designed to classify prompts to help prevent the generation of unsafe content).

3. AWS Machine Learning Blog. (2024, February 29). Implement content moderation in generative AI applications with Amazon Comprehend and Amazon Bedrock. (Provides an architecture that uses Comprehend for content moderation, including toxicity and PII detection, as a pre-processing step before calling the Bedrock FM).

4. AWS Documentation. (2024). Amazon Comprehend Developer Guide. See "Content moderation". (Details the toxicity detection feature, which classifies content into different toxicity categories).

Scroll to Top