Courseiva
Implement natural language processing solutionshardMultiple ChoiceObjective-mapped

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 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.

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 →

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.