AI-102 Implement agentic AI solutions Practice Question
A team is building an agent with Azure AI Foundry Agent Service that must call several internal function tools. The team reports that the model sometimes invents function names that do not exist and passes arguments that do not match the tool schema. Which TWO practices should the team adopt to reduce these failures? (Choose two.)
⚠ Common exam trap
The trap here is assuming model sampling settings control tool accuracy, when tool schema quality and validation feedback drive correct function invocation.
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
✓
Handle tool-call validation errors by returning a structured error message to the model and allowing it to retry
Reliable function calling depends on a precise contract and a recovery path. Clear names, descriptions, and JSON schemas tell the model exactly which tools exist and how to call them, while returning structured validation errors lets the model self-correct on a subsequent turn. Temperature, parallel-call settings, and token limits affect other behaviors and do not resolve hallucinated function names or malformed arguments.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Disable parallel tool calls so the model can only invoke one function per turn
Why it's wrong here
Restricting parallel tool calls does not fix hallucinated names or schema mismatches; those errors stem from weak tool definitions and missing validation feedback. Serializing calls may simplify tracing, but it does not improve the model's understanding of the available functions. The reported symptoms would persist, and the agent would lose the efficiency benefit of concurrent independent calls.
- ✗
Set the agent's temperature to a high value so the model explores more tool combinations
Why it's wrong here
Higher temperature increases randomness in token selection, which makes hallucinated function names and invalid arguments more likely, not less. Tool calling benefits from deterministic, low-temperature behavior because the model must follow a strict schema. Raising temperature works against the goal of reliable function invocation and would likely worsen the symptoms the team is trying to eliminate.
- ✓
Handle tool-call validation errors by returning a structured error message to the model and allowing it to retry
Why this is correct
When a tool call fails validation, returning a clear, structured error as the tool result lets the model correct its arguments on the next turn. This feedback loop turns a hard failure into a recoverable step and reduces the chance that the run aborts. It complements precise tool schemas by catching the residue of malformed calls that still slip through.
- ✓
Define each tool with a clear name, description, and JSON schema for its parameters
Why this is correct
Tool definitions are the model's only contract for what it may call. Precise names, a description that states when the tool applies, and a strict JSON schema for parameters give the model enough signal to select the right function and shape arguments correctly. Vague or missing schemas are a common cause of hallucinated function names and malformed arguments, so tightening definitions directly addresses the reported failures.
- ✗
Increase the model's max tokens so it has more room to explain each function call
Why it's wrong here
Token limits govern output length, not the correctness of function selection or argument shape. A larger budget gives the model more room to produce verbose reasoning, which can even increase the chance of drifting from the schema. The failures described are about tool contract quality and error recovery, so raising max tokens does not address the root cause.
Visual reference
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.