Courseiva

AI-102 Practice Question: Implement natural language processing solutions

You are developing a solution that uses Azure AI Translator to translate documents from English to French. You need to ensure that the translated text maintains the original formatting, such as HTML tags. Which feature should you use?

⚠ Common exam trap

AI-102 often tests the confusion between translation customization features (glossary, custom models) and request-level parameters like contentType, so candidates must know that formatting preservation is a parameter setting, not a model-training feature.

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

✓

Set the content type to 'text/html' in the translation request.

Azure AI Translator's Translate API accepts a contentType parameter, and setting it to 'text/html' tells the service to treat the input as HTML, preserving tags and only translating the human-readable text nodes. This is the documented mechanism for maintaining markup structure during translation. Without it, the service treats input as plain text and may mangle or translate tag names.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Use the Translator glossary to preserve formatting.

    Why it's wrong here

    A glossary supplies custom term mappings for vocabulary consistency; it does not retain HTML tags or document structure during translation. It is tempting because glossaries are a genuine Translator customisation feature, but they are correct when you need domain-specific terminology enforced, not when markup must survive the translation round trip.

  • ✗

    Use the Translator parallel corpus to train a custom model.

    Why it's wrong here

    A parallel corpus trains custom translation models and does not preserve HTML markup; the Translator document translation feature retains tag structure natively. Custom training suits domain-specific terminology, not formatting retention, which the standard document translation API handles without training.

  • ✓

    Set the content type to 'text/html' in the translation request.

    Why this is correct

    Setting the content type to 'text/html' instructs Azure AI Translator to treat the input as markup, preserving HTML tags and their positions in the translated output. This directly satisfies the requirement that translated text maintains original formatting.

  • ✗

    Use the Transliterate method to preserve formatting.

    Why it's wrong here

    Transliteration converts script between writing systems, such as Latin to Cyrillic, and does not translate or preserve HTML markup. It is tempting because it sounds like a text-preserving operation, but document translation with formatting retention is delivered through the Translator document translation feature, which handles HTML tags natively.

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.