AI-102 Implement generative AI solutions Practice Question
You are building a generative AI assistant on Azure OpenAI Service that must invoke backend business functions, such as checking order status and issuing refunds, in response to natural-language requests. You want the model to decide when a function is needed and to supply structured arguments, while your application retains control over execution. Which two actions should you take? (Choose two.)
⚠ Common exam trap
The trap here is believing the model itself executes backend functions or that fine-tuning teaches it to call endpoints, when in reality the model only proposes calls that your application must run and report back.
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
✓
Define the available functions and their parameters in the tools parameter of the chat completions request.
Function calling works in two phases: you declare callable operations and their parameter schemas in the request, and the model returns a structured call when a function is appropriate. Your application then executes that function and returns the output so the model can finish the response. Both declaring the tools and executing plus returning results are required for a working implementation.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Define the available functions and their parameters in the tools parameter of the chat completions request.
Why this is correct
Supplying function definitions through the tools parameter is how you tell the model which operations exist and what arguments each expects. The model then returns a structured tool call naming the function and a JSON argument payload when it judges a function is needed, rather than fabricating an answer. This is the mechanism that lets the model choose actions based on the conversation while your code decides whether and how to run them.
- ✓
Execute the returned function call in your application, then send the function result back to the model in a subsequent request so it can compose the final answer.
Why this is correct
The model does not execute code; it only proposes a call. Your application must run the function, then append a message containing the result with the matching call identifier and call the model again. That second round lets the model incorporate real data, such as an actual order status, into its reply. Skipping this step leaves the model without the information it requested, so it cannot produce a grounded final answer.
- ✗
Fine-tune the base model on historical order and refund conversations so it learns to call the correct endpoints.
Why it's wrong here
Fine-tuning adjusts model weights for style and task patterns, but it does not wire the model to live endpoints or provide a runtime schema of available operations. Function calling is a request-time capability driven by the tools definitions, not a behavior learned from examples. Fine-tuning would add cost and training effort while still leaving the model unable to emit valid tool calls for functions you define at runtime.
- ✗
Grant the Azure OpenAI resource a managed identity with permission to call the backend APIs directly on behalf of the model.
Why it's wrong here
Azure OpenAI does not make outbound calls to your business APIs; it returns a description of the intended call. Giving the resource a managed identity could let your own code authenticate to backends, but it does not cause the model to invoke anything and grants no tool-selection capability. The security model here expects your application, not the service, to perform the invocation after validating the request.
- ✗
Set the temperature parameter to 0 and increase the max_tokens value to guarantee deterministic function selection.
Why it's wrong here
Temperature influences sampling randomness and max_tokens caps response length, but neither makes the model aware of any callable operations. Without function definitions in the request, the model has no schema to select from and will simply produce prose. Lowering temperature may reduce variability in wording, yet it cannot create the structured tool-call behavior this scenario requires, so it does not contribute to the solution.
Go deeper
Related to this question
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 →
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.