https://retellai.com/?utm_source=discord&utm_medium=seo logo
what is the guidance for ensuring the agent calls ...
# ❓・ai-evy-support
w
@AI Evy what is the guidance for ensuring the agent calls functions correctly and transitions to nodes correctly?
a
Thanks for tagging me @weronika. I'll look through relevant sources and get back to you shortly.
### Answer For function calling (Single/Multi Prompt Agents) , define clear triggers in your prompts and reference tools by their exact names [(1) ]() . Always specify exact conditions for tool usage - list specific words/phrases that should trigger tool calls, define sequences when tools should be called in order, set boundaries for when NOT to call certain tools, and provide context explaining why each tool is being called . Example format for tool usage instructions :
Copy code
## Tool Usage Instructions
1. Gather initial information about the customer's issue.
2. Determine the type of request:
 - If customer mentions "refund" or "money back":
 → Call function `transfer_to_support` immediately
 - If customer needs order status:
 → Call function `check_order_status` with order_id
 - If customer wants to change their order:
 → First call `check_order_status`
 → Then transition to modification_state
3. After retrieving information:
 - Always summarize what you found
 - Ask if they need additional help
 - If yes, determine next appropriate action
For node transitions (Conversation Flow) , if the agent isn't transitioning to the expected node [(2) ]() : - Review your transition conditions to ensure they precisely match your intended triggers - Consider prompt engineering or breaking down complex conditions into multiple simpler ones - Add transition finetune examples to help the model understand your expectations - Add more nodes to cover edge cases, particularly global nodes for handling unexpected situations - Make transition conditions more flexible and general You can monitor Tool Call Accuracy and Transition Accuracy metrics through AI QA to measure how effectively your agent is performing these actions [(3) ]() .
​ To learn more, see the sources I considered: [[1] Prompt Engineering Guide](https://docs.retellai.com/build/prompt-engineering-guide) [[2] Debug guide](https://docs.retellai.com/build/conversation-flow/debug-guide) [[3] AI QA Metrics](https://docs.retellai.com/ai-qa/terminologies) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
w
@AI Evy do you have any more examples of effective and bad transition prompting?
a
Thanks for the follow-up, @weronika. I'll get back to you soon.
### Answer For effective transition conditions, write clear, specific prompts that don't rely heavily on node instructions [(1) ]() . Good examples include : -
When user indicates they want to book a meeting
-
User declines the invitation
-
User responds to question of their age
-
CRM lookup returned successful result
(for function nodes referencing function results) To ensure smooth transitions and prevent the agent from getting stuck, cover all possible cases in your transition conditions . General cases can be handled by global nodes (like objection handling) , allowing you to focus on specific cases within each node . For equation conditions, cover all branching paths determined solely by dynamic variables . For example, if treating users in California and New York differently with access to user location before the call starts :
Copy code
- {{user_location}} == "New York"
- {{user_location}} == "Los Angeles"
**Common issues to avoid**: If the agent transitions to an unconnected node or skips nodes entirely (e.g., A → D instead of A → B → C → D) [(2) ]() , you should: - Check call logs to see which condition fired - Tighten transition conditions and add clear fallbacks - Temporarily disable or refine any global nodes - If using function nodes, enable "wait for result" if needed - Split large nodes into smaller, simpler ones to reduce confusion If the agent says transition names out loud (like "transitioning to close the conversation") [(3) ]() , this typically requires better prompting . Using a better model can also help generate better responses . **
​ To learn more, see the sources I considered: [[1] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) [[2] Conversation Flow node transition breaks](https://discord.com/channels/1186424376300679209/1398036486661603520) [[3] The agent sometimes says tool calls and transitions out loud](https://discord.com/channels/1186424376300679209/1261332783993982986) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.