### Answer
To control what your agent says before transferring a call, you need to add explicit instructions in your prompt about when and how to use the transfer_call tool [(1) ](
) .
The key is to define clear triggers and behavior in your prompt. You should specify exact conditions for when the transfer should happen and what the agent should say beforehand . For example, in your prompt, include instructions like: "Before calling the transfer_call function, always inform the user that you're transferring them and explain why" .
According to the Prompt Engineering Guide, you should reference tools by their exact names and specify the sequence of actions . This means telling the agent to first speak to the user, then call the transfer function .
Here's what you should do:
1. In your agent's prompt, add explicit tool usage instructions that define when to call
transfer_call
2. Specify that the agent must verbally inform the user before executing the transfer
3. Use trigger words or phrases that indicate when the transfer should occur
For example, structure your instructions like: "If customer mentions 'refund' or 'money back': First, tell them you're connecting them to our support team who can help. Then call function `transfer_call`" .
The issue you're experiencing is that without these explicit instructions, the LLM struggles to determine the appropriate timing and sequence for tool calls .