1. Call again: "function successfully called with return value: {ret_val}, please call this function again." 2. Proceed: "function successfully called with return value: {ret_val}, please go to the next step." 3. Function guide: "function successfully called with return value: {ret_val}, please call {function_name} next." To improve the robustness of the workflow, multiple branches are better to be preset in local Python functions, each ending with one of the templates listed above. For example, if the argument that ChatGPT provides fails to pass the assertion check, it will enter a branch with a "call again" template. With the failure reason included in the return value and "please call this function again" articulated, ChatGPT will be more likely to reattempt the same function, rather than immediately replying to the user with a failure message in text. In the future, it would be highly beneficial if OpenAI could provide more knobs over the function calling API (e.g. probability distribution among functions and the threshold for calling), thereby making the behavior more controllable.