Courseiva

AI-102 Practice Question: Implement natural language processing solutions

Network Topology
subscription MySubresource-group MyRGname MyTextAnalyticskind TextAnalyticsaz cognitiveservices account createsku Slocation westusyes"key1": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p","key2": "q1w2e3r4t5y6u7i8o9p0a1s2d3f4g5h6""endpoint": "https://mytextanalytics.cognitiveservices.azure.com/","properties": {"apiProperties": {"statisticsEnabled": true

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 /sentiment/v3.1 does not exist on the Text Analytics REST API; the operation is exposed as /text/analytics/v3.1/sentiment. It is tempting because the host is correct and the version and operation names appear, but the segment order is wrong, so the call returns 404.

  • ✗

    https://mytextanalytics.api.cognitive.microsoft.com/text/analytics/v3.1/sentiment

    Why it's wrong here

    The regional endpoint uses the api.cognitive.microsoft.com host, which belongs to the older Cognitive Services account pattern; the Text Analytics resource created in the portal exposes a cognitiveservices.azure.com host. It is tempting because legacy tutorials still show this URL, and it works for classic multi-service keys.

  • ✗

    https://mytextanalytics.cognitiveservices.azure.com/analyze

    Why it's wrong here

    The /analyze path belongs to the newer unified Language service, which requires a Language resource rather than a Text Analytics resource. It is tempting because Microsoft is consolidating text capabilities there, but the stem specifies a Text Analytics resource and key1, whose sentiment operation sits under /text/analytics/v3.1/sentiment.

  • ✓

    https://mytextanalytics.cognitiveservices.azure.com/text/analytics/v3.1/sentiment

    Why this is correct

    Cognitive Services multi-service and Text Analytics resources expose a regional or custom subdomain endpoint ending in cognitiveservices.azure.com, followed by the service path. The sentiment route under /text/analytics/v3.1/ matches the Sentiment Analysis API for this resource.

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 →

How Courseiva writes practice questions · Editorial policy

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.