1Z0-1157-26 practice question 2 of 10

Assume an agent has access to the tools multiply(a, b) and divide(a, b). A user asks: "What is 15 multiplied by 8, then divided by 3?" In the OpenAI Agents SDK, how does the agent loop handle this multi-step task?

Full set: 67 questions
Answer options
A: The Runner performs all arithmetic internally without involving the model or tools
B: The SDK automatically combines all arithmetic operations into a single tool call
C: The model calls multiply(15, 8), receives the result, then calls divide(120, 3) Correct answer
D: The model calls every available arithmetic tool before answering
Correct Answer:
C. The model calls multiply(15, 8), receives the result, then calls divide(120, 3)
Explanation

In the OpenAI Agents SDK, multi-step agent tasks are orchestrated through an iterative tool-calling execution loop managed by the Runner. When a user submits a multi-step query requiring sequential operations, the underlying language model first determines that the multiply tool must be called with arguments 15 and 8. The Runner executes this tool, obtains the result 120, and appends the tool response to the conversation history. In the subsequent iteration step, the model reads the updated context containing 120, identifies the second step, and issues a tool call to divide with arguments 120 and 3. Once the final tool result is returned, the model constructs the final response.

Why Incorrect

Option A: The Runner orchestrates model execution and tool invocations; it does not independently compute arithmetic without calling the model or tools.
Option B: The SDK does not combine distinct multi-step tool declarations into a single merged call unless explicitly defined as a combined tool.
Option D: The model selects tools dynamically based on context and step requirement, rather than redundantly executing every available tool in the registry.

References

- OpenAI Documentation: OpenAI Agents SDK Core Reference, "Runner, Tool Loop, and Step Lifecycle Management" (2024).

- OpenAI Developer Guides: Function Calling Guide and Multi-Turn Tool Execution Loops.

Scroll to Top