AI-102 Plan and manage an Azure AI solution Practice Question
Exhibit
Refer to the exhibit.
{
"role": "system",
"content": "You are an AI assistant that helps users find information. You have access to the following functions. Use them if required.\n{\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_weather\",\n \"description\": \"Get the current weather\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"location\": {\n \"type\": \"string\",\n \"description\": \"The city and state, e.g. San Francisco, CA\"\n }\n },\n \"required\": [\"location\"]\n }\n }\n}You see the exhibit from an Azure OpenAI chat completion request. The assistant is not calling the get_weather function when asked about the weather. What is the most likely reason?
⚠ Common exam trap
Test-takers frequently assume listing a function in the system message is sufficient for the model to call it, but Azure OpenAI requires the function definition to be explicitly included in the 'tools' parameter of the API request.
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 defined in the system message but not in the 'tools' array
D is correct because in Azure OpenAI, functions must be defined in the 'tools' array of the chat completion request to be available for the model to call. Defining a function only in the system message does not register it as a callable tool; the model can see the description but cannot invoke it. Without the function in 'tools', the assistant will ignore the request to call get_weather.
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 required parameter 'location' is missing from the user message
Why it's wrong here
The assistant can ask for missing info; function should still be called.
- ✗
Function calling is not supported in the current Azure OpenAI version
Why it's wrong here
Function calling is supported in recent versions.
- ✗
The function definition is malformed
Why it's wrong here
The JSON appears valid.
- ✓
The function is defined in the system message but not in the 'tools' array
Why this is correct
Functions must be passed in the 'tools' parameter of the API request.
Go deeper
Related to this question
About these practice questions
One of 945 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 →
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.