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 questionsDomain Implement natural language processing solutions
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.
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.
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.
Keep practicing
Take the free AI-102 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other AI-102 practice questions
- Question 2You have a product support manual. You need to build a product support chatbot based on t…
- Question 8You plan to provision a QnA Maker service in a new resource group named RG1. In RG1, you …
- Question 10You have an Azure subscription that contains an Azure OpenAI resource. You deploy the GPT…
- Question 17You plan to build an app that will generate a list of tags for uploaded images. The app m…
- Question 27You are building a chatbot. You need to configure the chatbot to query a knowledge base. …
- Question 28You have an Azure Cognitive Search instance that indexes purchase orders by using Form Re…
