HomeLearnCoursesHackathonsAccount
Tool Use & Function Calling
The Call, Execute, Observe Cycle · 1/2

One call rarely ends the conversation

observethinkact

Function calling isn't a single request and a single reply, it's a loop. The model decides to call a function, your application code executes it for real, and the result is appended back into the conversation as a new message. The model then continues reasoning with that new information in context, and it has to decide again: does it now have enough to answer the user, or does it need to call another tool based on what it just learned.

This is why a single user request can trigger several tool calls in sequence. A question like 'what's the total cost of my last three orders in USD' might require calling get_recent_orders, then calling get_exchange_rate if the orders were priced in another currency, then finally producing a text answer once both results are available. Each result changes what the model does next, which is exactly the perceive-reason-act-observe loop from agent architecture, just now with real tool outputs instead of just plain reasoning.