Question 10
Domain 6: Implement Agentic SolutionsAn agent built with Foundry Agent Service keeps running indefinitely without completing its task. The agent has access to 8 tools and appears to be calling them in loops. What is the most likely cause and appropriate fix?
Correct answer: B
Explanation
An agent that “keeps running indefinitely” and “calling them in loops” usually lacks a clear stopping rule, so its instructions are ambiguous about when the task is complete. The fix is to add explicit termination conditions and a maximum iteration limit so the agent knows when to stop instead of repeatedly selecting tools.
Why each option is right or wrong
A. The agent's model is too small; upgrade to GPT-4o
B. The agent's instructions are ambiguous; add clearer termination conditions and set a maximum iteration limit
Foundry Agent Service agents continue tool selection until their instructions provide an unambiguous stopping rule; if the prompt does not define completion criteria, the planner can repeatedly cycle through available tools. In this scenario, the looped calls across 8 tools point to missing termination logic, so the remedy is to add explicit end conditions in the instructions and enforce a maximum iteration cap to prevent indefinite execution.
C. The vector store is too large; reduce the number of uploaded files
D. The thread has too many messages; start a new thread