EndCall does not work all the time
# support
p
Hey guys another question my assistant is using gpt 4o and i ahve the endcall function enabled , however it only uses it like 10% of the time, is this a prompting issue. ?
v
Hi @Papi, I'm an AI assistant for Vapi. I'll analyze available sources and get back to you shortly.
----------------------------- **While I generate an answer, here are some sources that might be helpful**: * [Function Calling]() * [Outbound Sales Example]() * [Get Assistant]() * [Web Calling]() -----------------------------
### Answer It sounds like you're experiencing issues with the
endCall
function not triggering as expected. This can indeed be influenced by how the prompts are structured, as the model needs clear instructions on when to initiate the end of a call. The behavior of the assistant, including how it handles functions like
endCall
, can be influenced by the system prompt or other parameters you've set for the assistant. Adjusting the prompts or reviewing the conditions under which the assistant decides to end a call could help improve the consistency of the
endCall
function usage. For specific guidance on how to optimize your prompting strategy or to debug issues with function calling, reviewing the assistant's configuration and logs might provide more insights. If you continue to experience issues, consider refining the assistant's roles and instructions to ensure it aligns more closely with your desired workflow [(1)]() .
Glad I could be helpful. Feel free to create a new thread with any new questions you may have.
s
It is an LLM. You can't have 100% accuracy. You can only reduce the probability of inaccuracy by having better prompting and fine-tuning, but you can't reach 100% accuracy. This is one of the limits of LLM
p
thanks sahil fixed it with better prompting but there is an issue here using eleven labs voices the call hangs up abrutly and cuts off the last word . probably need to add some delay here
k
@Papi and @Sahil any tips on how to change the prompt to increase this accuracy? I'm using gpt 4o
s
Optimising your prompt or fine-tuning llm model.
k
Yess, but how should I prompt this for example
"end the call"... in the prompt and that's it?
I'm using endCall tool btw (all my custom functions are now tool calling)
s
just use the endCall tool when X thing happens.
p
I use something like “be sure to call the end call function when the call is over”
k
Got itt!!! This is good
Thank you both!
7 Views