Bryce
03/21/2025, 11:47 PMVapi Support Bot
03/21/2025, 11:49 PMtoolCallId
, the AI might lose context [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1342315282198298729).
2. **Asynchronous Tool Calls**: If a tool is set to async, the client might automatically send back a tool_call_result message with result Success, causing the Assistant to be interrupted and confused [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1342336047589359618).
3. **Variable Substitution Issues**: There might be problems with how variables are referenced or interpolated in the tool call [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1315677399026765855).
4. **Model Selection**: Some models handle context retention better than others [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1337465172263960637).
### Solutions you can try:
1. **Prompt Engineering**: Modify your prompts to help the AI maintain state and handle interruptions better. Include explicit instructions for the AI to remember the context after tool calls [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1344181455567196170).Vapi Support Bot
03/21/2025, 11:49 PMsynchronous
instead of async
if appropriate [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1342315282198298729).
3. **Model Selection**: Consider switching to GPT-4o or Claude-3-sonnet, which may handle context better than other models [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1337465970557452299).
4. **Context Management**: Implement explicit context management by retrieving and formatting previous conversation history and including it in API calls to the language model [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334393915071135825).
5. **Tool Call Implementation**: Ensure that tool calls are correctly implemented and that the server response format is accurate [source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333753317490294836).
Would you like me to elaborate on any of these solutions or help troubleshoot your specific implementation further?
Sources:
- [Discord Thread on AI Forgetting Context](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334187500876599388)
- [Discord Thread on Tool Call Response Format](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1342315282198298729)
- [Discord Thread on Asynchronous Tool Calls](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1342336047589359618)
- [Discord Thread on Variable Substitution Issues](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1315677399026765855)
- [Discord Thread on Model Selection](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1337465172263960637)
- [Discord Thread on Prompt Engineering](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1344181455567196170)Vapi Support Bot
03/21/2025, 11:49 PMLydo
03/22/2025, 11:22 AMBryce
03/22/2025, 1:53 PMLydo
03/22/2025, 9:25 PMShubham Bajaj
03/23/2025, 2:14 PMShubham Bajaj
03/23/2025, 2:15 PMBryce
03/23/2025, 8:18 PMVapi
03/25/2025, 1:59 AM# Result
- Call cannot be transferred. Our team is currently helping another customer.
# Instructions
1. Acknowledge the failure and say "I'm sorry. My team is currently helping another customer. Would you like them to call you right back?"
2. WAIT FOR USER RESPONSE
3. IMMEDIATELY AFTER USER RESPONDS:
- IF USER AGREES TO CALLBACK (yes/yeah/sure/ok/fine/alright/etc.):
- SAY EXACTLY: "Someone from our team will give you a callback shortly to assist you. Have a great day."
- THEN END CONVERSATION
- IF USER DECLINES CALLBACK:
- SAY: "I understand. Is there anything else I can help with today?"
4. DO NOT ask follow-up questions after user agrees to a callback.
5. DO NOT retry transferring or invoking the "Transfer_To_Team" tool again.
Bryce
03/26/2025, 8:04 PMBryce
03/26/2025, 8:05 PMVapi
03/29/2025, 1:24 PM