Courseiva

Function Definition Missing Description in Azure AI Agent Service

Exhibit

Refer to the exhibit.

{
  "assistant_id": "asst_xyz",
  "instructions": "You are a helpful assistant. When asked about weather, call the get_weather function.",
  "tools": [
    {
      "type": "code_interpreter"
    },
    {
      "type": "function",
      "function": {
        "name": "get_weather",
        "strict": true,
        "parameters": {
          "type": "object",
          "properties": {
            "location": {
              "type": "string"
            }
          },
          "required": ["location"]
        }
      }
    }
  ],
  "tool_resources": {
    "code_interpreter": {
      "file_ids": []
    }
  }
}

Refer to the exhibit. You have created an assistant with the above configuration. When you send a message 'What is the weather in Seattle?', the assistant responds without calling the function. What is the most likely cause?

Quick Answer

The correct answer is that the function is missing the required 'description' property. In Azure AI Agent Service, when you define a function for a tool, the model relies on the function's description to determine when to invoke it, even if the system instructions explicitly say to call it. Without this description, the model lacks the semantic context needed to map a user query like "What is the weather in Seattle?" to the appropriate function call. This scenario tests your understanding of function tool definitions for the AI-102 exam, where a common trap is assuming that instructions alone are sufficient—the model prioritizes the structured function schema over free-text instructions. Remember that the description field is not optional; it acts as the model's primary trigger for tool selection. A helpful memory tip: "If the model won't call, check the description—it's the function's 'why'."

⚠ Common exam trap

Azure AI often tests the misconception that the 'instructions' field or 'strict' parameter is the primary driver for function calling, when in reality the 'description' property is the key enabler for the model to understand tool relevance.

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 function is missing the 'description' property

The function definition lacks a 'description' property. In the Assistants API, the 'description' field is critical for the model to understand when and why to invoke a function. Without it, the model may not recognize that the function is relevant to the user's query about weather, causing it to respond directly instead of calling the function.

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 'instructions' are not being followed

    Why it's wrong here

    Instructions are advisory prompt text; a function is invoked when the model selects the declared tool, so weak instructions do not by themselves suppress the call. It is tempting because unclear instructions can cause wrong tool selection, and would be the cause if the assistant called the wrong function.

  • ✗

    The 'strict' parameter is set to true

    Why it's wrong here

    The strict parameter governs whether a function's JSON arguments must match its schema exactly; setting it true still permits the function to be called. It is tempting because strict mode does constrain argument generation, and would be relevant if the function were invoked but its arguments were rejected.

  • ✓

    The function is missing the 'description' property

    Why this is correct

    Function definitions require a description so the model can judge when to invoke them. Without it, the model cannot match the weather query to the function and answers from its own knowledge instead of calling it.

  • ✗

    The 'tool_resources' code_interpreter has empty file_ids

    Why it's wrong here

    Empty code_interpreter file_ids only affects file-based Python execution; it does not stop the model invoking a declared function tool. It is tempting because missing file resources do break code_interpreter tasks, so this would be the cause if the assistant failed to analyse an uploaded CSV.

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

Same concept, more angles

1 more way this is tested on AI-102

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. Refer to the exhibit. You are configuring an agent in Azure AI Agent Service. You want the agent to be able to execute Python code and call a custom function to get weather data. What is the issue with the JSON configuration?

hard
  • A.The function definition is missing the 'strict' parameter
  • B.The 'code_interpreter' tool type should be 'code_interpreter' not 'code_interpreter'
  • ✓ C.The model 'gpt-4o' is not supported
  • D.The 'assistant_id' should be a thread ID

Why C: The Azure AI Agent Service currently does not support the gpt-4o model for assistants. The supported models include GPT-4, GPT-4-turbo, and GPT-4-32k. Using an unsupported model will cause the agent to fail during configuration or runtime.

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.