Courseiva

AI-102 Skill Context Practice Question

Exhibit

Refer to the exhibit.

{
  "skills": [
    {
      "@odata.type": "#Microsoft.Skills.Text.SplitSkill",
      "name": "#1",
      "context": "/document",
      "inputs": [
        {"name": "text", "source": "/document/content"},
        {"name": "textSplitMode", "source": "pages"},
        {"name": "maximumPageLength", "source": 5000}
      ],
      "outputs": [
        {"name": "textItems", "targetName": "pages"}
      ]
    },
    {
      "@odata.type": "#Microsoft.Skills.Text.V3.SentimentSkill",
      "name": "#2",
      "context": "/document/pages/*",
      "inputs": [
        {"name": "text", "source": "/document/pages/*"}
      ],
      "outputs": [
        {"name": "sentiment", "targetName": "sentimentLabel"},
        {"name": "confidenceScores", "targetName": "confidenceScores"}
      ]
    }
  ]
}

You are reviewing the skillset definition for an Azure AI Search indexer. The SplitSkill splits the document content into pages of 5000 characters. The SentimentSkill is set to run on each page. However, the sentiment analysis is not producing correct results. What is the most likely cause?

⚠ Common exam trap

Candidates often confuse the skill context with the input source path. Setting the context to an array does not automatically iterate; the context must end with '/*' to run the skill per element.

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

The context of the SentimentSkill is set to an array, which is not supported

Setting the context of the SentimentSkill to an array (e.g., '/document/pages') causes the skill to run once on the entire array of pages, rather than iterating over each page individually. This results in incorrect sentiment analysis because the skill receives a collection of strings as a single input, which is not the intended per-page processing. The correct configuration is to set the context to '/document/pages/*' so that the skill executes on each page separately.

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 maximumPageLength of 5000 is too high for sentiment analysis

    Why it's wrong here

    Incorrect. The maximumPageLength of 5000 is within the limits for sentiment analysis (5000 characters per document) and is not the cause of incorrect results.

  • The input source for SentimentSkill should be '/document/pages/*' but the SplitSkill output is named 'pages', so the input should be '/document/pages'

    Why it's wrong here

    Incorrect. While the input source path should use '/*' to iterate over pages, the option incorrectly states that the input should be '/document/pages' (without wildcard), which is the wrong path. The real issue is that the skill's context is set to the array, causing the skill to not iterate.

  • The context of the SentimentSkill is set to an array, which is not supported

    Why this is correct

    Correct. Setting the context to an array (e.g., '/document/pages') without the wildcard causes the skill to run once on the entire array, leading to incorrect sentiment analysis. The context should be '/document/pages/*' for per-page processing.

  • The SentimentSkill uses an incorrect @odata.type version

    Why it's wrong here

    Incorrect. The @odata.type version for SentimentSkill is not the issue; the problem lies in the context configuration.

About these practice questions

Courseiva writes every AI-102 question from scratch — 945 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.