Courseiva

AI-102 Practice Question: Implement natural language processing solutions

You are building a solution that uses Azure AI Language's sentiment analysis to monitor customer feedback. The feedback includes text in multiple languages, and you need to obtain sentiment scores at both the document level and the sentence level. Which API endpoint should you call?

⚠ Common exam trap

The trap here is assuming that the older Text Analytics API endpoint is still the primary way to perform sentiment analysis, when the unified Language endpoint is now preferred.

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 "SentimentAnalysis" and include opinion mining.

The unified Azure AI Language endpoint /language/:analyze-text supports sentiment analysis when the kind parameter is set to SentimentAnalysis. It returns both document-level and sentence-level sentiment, and can optionally include opinion mining. This is the current recommended approach, replacing the older Text Analytics API endpoints. The other options either use legacy endpoints or specify incorrect task kinds.

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" and include sentiment scores.

    Why it's wrong here

    KeyPhraseExtraction is a different feature that extracts key phrases from text. It does not return sentiment scores at either document or sentence level. Including sentiment scores is not a valid parameter for key phrase extraction. This endpoint would not fulfill the requirement of obtaining sentiment analysis.

  • ✗

    POST /text/analytics/v3.1/sentiment with the showStats parameter set to true.

    Why it's wrong here

    The /text/analytics/v3.1/sentiment endpoint is part of the older Text Analytics API. While it can return sentence-level sentiment, it is a legacy endpoint and not the recommended approach for new solutions. The showStats parameter returns statistics about the request, not additional sentiment granularity. This endpoint does not support the latest features and may be deprecated.

  • ✗

    POST /language/:analyze-conversations with kind set to "SentimentAnalysis".

    Why it's wrong here

    The /language/:analyze-conversations endpoint is used for conversational language understanding, such as intent recognition and entity extraction from conversations. It does not support sentiment analysis. Setting kind to SentimentAnalysis is not valid for this endpoint. This endpoint is designed for different natural language processing tasks.

  • ✓

    POST /language/:analyze-text with kind set to "SentimentAnalysis" and include opinion mining.

    Why this is correct

    The /language/:analyze-text endpoint is the unified endpoint for Azure AI Language features. Setting kind to SentimentAnalysis performs sentiment analysis. By default, it returns document-level sentiment and sentence-level sentiment when the input contains multiple sentences. Opinion mining can be enabled to extract aspects and opinions. This endpoint meets the requirement for both document and sentence level scores.

About these practice questions

One of 761 original AI-102 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.