Courseiva

AI-102 Implement agentic AI solutions Practice Question

An agent built with Azure AI Foundry Agent Service performs a long-running operation by calling a function tool that starts a batch job. The batch job can take up to 30 minutes, and the agent currently times out because the function tool waits for completion. The team wants the agent to continue the conversation after the job finishes. Which pattern should the team implement?

⚠ Common exam trap

The trap here is assuming a longer timeout solves long-running work, when the real need is an asynchronous callback that resumes the agent.

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

✓

Have the function tool return immediately with a job identifier, then resume the agent when the job completes via a new run or thread message

Long-running work should be decoupled from the agent run. Returning a job identifier immediately keeps the tool call fast, and an external completion event can then deliver the result back to the agent by starting a new run or posting to the thread. Blocking the tool call, moving the job into code interpreter, or enabling parallel calls all fail to provide a reliable continuation path after the job finishes.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Increase the function tool's HTTP client timeout to 30 minutes so the call waits for the job

    Why it's wrong here

    Holding a tool call open for 30 minutes risks platform timeouts and ties up the run, and it wastes resources while the agent idles. Long waits also degrade the user experience and can exceed service limits on tool execution duration. The scenario calls for the agent to continue after the job completes, which a blocking wait does not achieve reliably.

  • ✓

    Have the function tool return immediately with a job identifier, then resume the agent when the job completes via a new run or thread message

    Why this is correct

    Returning a job identifier lets the tool call finish quickly, so the run is not blocked. When the batch job completes, an external trigger can submit the result back to the agent, either by starting a new run or by adding a message to the thread. This asynchronous pattern matches the requirement that the agent continue the conversation after a long operation finishes.

  • ✗

    Move the batch job into the code interpreter tool so it runs inside the agent's session

    Why it's wrong here

    Code interpreter sessions are intended for short-lived data analysis and are not a durable execution environment for 30-minute batch jobs. The session may be terminated or time out before the job finishes, and there is no built-in mechanism to resume the agent afterward. This does not solve the timeout or the continuation requirement.

  • ✗

    Enable parallel tool calls so the agent can start the job and keep responding at the same time

    Why it's wrong here

    Parallel tool calls let the model issue several calls in one turn, but each call still must return a result for the run to proceed. A single long-running job would still block or time out. Parallelism does not provide a callback mechanism to resume the agent when the job completes, so it does not satisfy the scenario.

About these practice questions

Courseiva writes every AI-102 question from scratch — 761 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.