AI-102 practice question 20 of 35

You have a text-based chatbot. You need to enable content moderation by using the Text Moderation API of Content Moderator. Which two service responses should you use? Each correct answer presents part of the solution NOTE: Each correct selection is worth one point.

Full set: 378 questions

Domain Implement natural language processing solutions

Answer options
A: the adult classification score
B: optical character recognition (OCR)
C: personal data Correct answer
D: text classification Correct answer
E: the racy classification score
Correct Answer:
C. personal data; D. text classification
Explanation

The Azure Content Moderator's Text Moderation API is designed to scan text for potentially unwanted content. The service's response provides two primary types of information. First, it detects personal data, such as email addresses, mailing addresses, and phone numbers, which is formally known as Personally Identifiable Information (PII). Second, it performs text classification, automatically assigning scores to the text based on three categories: potentially adult, racy (sexually suggestive), and offensive language. These two features, PII detection and text classification, represent the core moderation capabilities and are distinct objects in the API's JSON response.

Why Incorrect

A. the adult classification score: This is a specific sub-component of the overall "text classification" response. "Text classification" is the more comprehensive and correct term for the entire feature.
B. optical character recognition (OCR): OCR is used to extract text from images. This question concerns a text-based chatbot and the Text Moderation API, not image analysis.
E. the racy classification score: Similar to the adult score, this is a specific value within the broader "text classification" response, making the latter a more complete answer.

References

1. Microsoft Learn, "Text moderation concepts in Azure Content Moderator": This document outlines the core capabilities of the Text Moderation API. It explicitly details the two main features:

Classification: "The Text Moderation API's machine-assisted classification feature...assigns a score to each category [Category1: adult, Category2: racy, Category3: offensive]." This directly supports option D.

Personal data: "The personal data feature detects the potential presence of this information...Email, US Address, IP Address, US Phone number." This directly supports option C.

Reference Location: Sections "Classification" and "Personal data".

2. Microsoft Learn, "Content Moderator REST API - Text - Screen": The official API reference documentation shows the structure of the JSON response from a text screening request. The response body contains top-level objects named PII (corresponding to personal data) and Classification (corresponding to text classification).

Reference Location: See the "200 OK" response body example, which includes the PII and Classification objects.

Scroll to Top