Courseiva

AI-102 Implement generative AI solutions Practice Question

You are building a generative AI solution that uses Azure OpenAI function calling to let the model invoke backend APIs. During testing, the model sometimes invents parameter values that cause API errors. You need to make function invocation more reliable. What should you do?

⚠ Common exam trap

The trap here is believing that adding more API documentation or creative sampling improves argument accuracy.

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 clear function schemas with typed parameters, required fields, and descriptions, and validate arguments before executing the API call.

Reliable function calling depends on well-defined schemas and validation. Typed parameters, required fields, and descriptive names help the model map user intent to correct arguments, and validating before execution prevents invalid values from reaching the API. Higher temperature, oversized specifications, and parallel-call limits do not enforce argument correctness.

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 clear function schemas with typed parameters, required fields, and descriptions, and validate arguments before executing the API call.

    Why this is correct

    Function calling relies on the model producing arguments that match the declared JSON schema. Precise types, required fields, and descriptions guide the model, while server-side validation rejects invalid arguments before they reach the API. Together they reduce invented values and prevent downstream errors.

  • ✗

    Set tool_choice to auto and increase the temperature to encourage more creative argument generation.

    Why it's wrong here

    Tool_choice auto lets the model decide whether to call a function, and higher temperature increases randomness in token selection. That makes parameter values less predictable, not more accurate. Creative sampling works against reliable, schema-conformant arguments and can worsen the invented-value problem.

  • ✗

    Disable parallel tool calls and force the model to call only one function per turn.

    Why it's wrong here

    Limiting parallel calls controls how many functions execute at once, not whether the arguments are valid. The model can still invent values within a single call. This setting affects orchestration and latency rather than schema adherence, so it does not address the root cause of API errors.

  • ✗

    Include the full OpenAPI specification of every backend API in the system message.

    Why it's wrong here

    Pasting large specifications consumes context and can dilute the model's focus. Function calling expects concise, well-defined function schemas rather than entire API documents. Excess detail may confuse parameter mapping and does not by itself enforce types or required fields, so reliability is not guaranteed.

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

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.