Courseiva

AI-102 Practice Question: Implement natural language processing solutions

You are building an Azure AI Language solution that analyzes customer support emails. You need to detect the language of each email before routing it to the correct translation pipeline. You call the Language Detection API with the following request body: {"kind": "LanguageDetection", "analysisInput": {"documents": [{"id": "1", "text": "Bonjour, je besoin d'aide avec mon compte."}]}}. What will the response contain?

⚠ Common exam trap

The trap here is assuming the API returns multiple candidate languages or performs translation, when it only identifies the single most likely language.

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

✓

A single document result with the detected language code 'fr', a confidence score, and the original text with offsets.

The Language Detection API returns the detected language code, confidence score, and text metadata for each document. It does not return all languages, translated text, or errors for common punctuation. The correct response includes the ISO code 'fr' and a confidence score, which you can use to route the email appropriately.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    The translated version of the text in English, because the default target language is English.

    Why it's wrong here

    Language Detection does not perform translation. It only identifies the language of the input text. To translate, you would use Azure AI Translator, a separate service. The Language Detection API never returns translated text, only the detected language and metadata.

  • ✗

    A list of all supported languages with confidence scores for each, allowing you to select the highest-scoring language.

    Why it's wrong here

    The API does not return scores for every supported language. It returns only the single best-matching language with its confidence score. Returning all languages would be inefficient and is not how the service operates; you receive one detected language per document.

  • ✗

    An error because the text contains an apostrophe, which is not supported in the JSON payload.

    Why it's wrong here

    Apostrophes are valid within JSON string values and are common in natural language text. The service handles them without issue. The request is well-formed, so no error occurs due to the apostrophe; the API processes the text normally and returns a language detection result.

  • ✓

    A single document result with the detected language code 'fr', a confidence score, and the original text with offsets.

    Why this is correct

    The Language Detection API returns the detected language ISO code, a confidence score between 0 and 1, and the analyzed text with character offsets for each document. For the provided French text, the response includes the language code 'fr' and a high confidence score, enabling downstream routing to French-specific processing.

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