AI-102 Practice Question: Implement natural language processing solutions
You are building an application that must detect and redact personally identifiable information (PII) from free-text support tickets before storing them. The tickets are written in English, and you need to identify entities such as names, phone numbers, and email addresses, and replace them with asterisks. You plan to use the Azure AI Language service. Which API endpoint should you call?
⚠ Common exam trap
Candidates often confuse general entity recognition with PII detection, assuming that EntityRecognition also redacts personal data.
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
✓
POST /language/:analyze-text with kind set to "PiiEntityRecognition" in the request body.
The PiiEntityRecognition kind in the analyze-text endpoint is purpose-built for identifying and redacting personal data. It returns both the detected entities and a redactedText field where entities are masked with asterisks. The other kinds either detect different entity types or serve different NLP tasks, and none provide the required redaction behavior.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
POST /language/:analyze-text with kind set to "KeyPhraseExtraction" in the request body.
Why it's wrong here
KeyPhraseExtraction identifies the main points in text but does not detect or redact personal information. It would return key phrases such as product names or issues, not PII entities, and it cannot replace those entities with asterisks. This endpoint is unsuitable for compliance-driven redaction of sensitive data.
- ✓
POST /language/:analyze-text with kind set to "PiiEntityRecognition" in the request body.
Why this is correct
The PiiEntityRecognition kind is specifically designed to detect and optionally redact personal data such as names, phone numbers, email addresses, and other PII categories. By default, the response includes redactedText where detected entities are replaced with asterisks, satisfying the requirement to redact before storage without additional processing.
- ✗
POST /language/:analyze-text with kind set to "EntityRecognition" in the request body.
Why it's wrong here
The EntityRecognition kind performs named entity recognition and returns entities such as people, organizations, and locations, but it does not support redaction or the PII-specific entity categories required here. It would not replace detected entities with asterisks, and it may not recognize phone numbers or email addresses as reliably as the dedicated PII endpoint.
- ✗
POST /language/:analyze-conversations with kind set to "ConversationPII" in the request body.
Why it's wrong here
The analyze-conversations endpoint is intended for conversational language understanding tasks such as intent recognition and entity extraction from utterances, not for detecting and redacting PII from arbitrary text. While it can extract some entities, it does not provide a redacted text output and is not tailored for PII categories like phone numbers or email addresses.
Go deeper
Related to this question
About these practice questions
This AI-102 question is part of Courseiva's 761-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Microsoft exam blueprint
This AI-102 practice question is part of Courseiva's free Microsoft 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 AI-102 exam.