AI-102 Practice Question: Implement natural language processing solutions
Network Topology
Refer to the exhibit. You have created a Text Analytics resource and retrieved its keys. You want to use the key1 to call the Sentiment Analysis API from a Python application. Which endpoint URL should you use?
⚠ Common exam trap
Test-takers frequently confuse the legacy domain (`api.cognitive.microsoft.com`) with the current Azure domain (`cognitiveservices.azure.com`), or they mistakenly use the Analyze API endpoint (`/analyze`) when a dedicated sentiment endpoint is required, leading them to pick options B or C.
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
✓
https://mytextanalytics.cognitiveservices.azure.com/text/analytics/v3.1/sentiment
The Sentiment Analysis API for Azure Cognitive Services Text Analytics uses the endpoint pattern `https://<resource-name>.cognitiveservices.azure.com/text/analytics/v3.1/sentiment`. This is the standard REST API endpoint for sentiment analysis in version 3.1, which requires the `/text/analytics/v3.1/sentiment` path appended to the custom resource domain.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
https://mytextanalytics.cognitiveservices.azure.com/sentiment/v3.1
Why it's wrong here
The path structure is incorrect; sentiment is under text/analytics.
- ✗
https://mytextanalytics.api.cognitive.microsoft.com/text/analytics/v3.1/sentiment
Why it's wrong here
The domain is incorrect; it should be .cognitiveservices.azure.com, not .api.cognitive.microsoft.com.
- ✗
https://mytextanalytics.cognitiveservices.azure.com/analyze
Why it's wrong here
This is for the Analyze API, not sentiment.
- ✓
https://mytextanalytics.cognitiveservices.azure.com/text/analytics/v3.1/sentiment
Why this is correct
This is the correct endpoint for sentiment analysis.
Go deeper
Related to this question
About these practice questions
This AI-102 question is part of Courseiva's 945-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 by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.