System prompt is not working as expected
# support
d
I have requirement to provide customer 5-6 option in that for example i have one flow of reschedule service in that first we have to ask mobile number and if we can't find details of customer through mobile number then we have to get address and name through that we have to find customer details and send otp , now we have to verify otp and if otp is verified then we have to ask customer about reschedule date and time ad then we have to reschedule date and reschedule date should be from future and then customer has to say send it sendee to call tool to reschedule service then we have to give feedback to customer that reschedule is done. Problem: We have put strong instruction to take 10 digit number, but sometime it is taking 10 digit number as invalid, sometime considering 9 digit as valid, sometime not waiting till user provide 10 digit for example taking 4 digits as input when user is trying to speak 10 digit with basic speed of conversation , we have given instruction but sometime it is waiting sometimes don't. Many time after otp verification it is executing service listing step but in some cases it is skipping and directly taking first service and without asking reschedule date it is executing reschedule api but we have given proper instruction and proper steps so this should not be happening. Sometime reschedule time is asking and sometimes even when we have given strong instruction. Sometime
send it sendee
saying word verification happening and sometimes don't. Some steps are skipping anytime there is not proper output of any instruction as no accurately we can say which step is going to skipped in call.
@User
s
Hey @Dignesh To help track down this issue, could you share: - The call ID - When exactly this happened (the timestamp) - What response you expected to get - What response you actually got instead This would really help me figure out what went wrong!
d
Here is my call ids: - 1. e6a2f2a6-0d0d-47a3-88e6-746ba041d9ce 2. 5f9bea00-a712-490b-b7fe-9eb9a582a781 3. dd36d8e3-1b40-4151-80aa-c790d1f4b759 Call timestamps are: - 1. Nov 18, 2024, 7:07 PM - Nov 18, 2024, 7:08 PM (call id: e6a2f2a6-0d0d-47a3-88e6-746ba041d9ce) 2. Nov 15, 2024, 7:40 PM - Nov 15, 2024, 7:42 PM (call id: 5f9bea00-a712-490b-b7fe-9eb9a582a781) 3. Nov 15, 2024, 6:58 PM - Nov 15, 2024, 7:04 PM (call id: dd36d8e3-1b40-4151-80aa-c790d1f4b759) Response I want is: - 1. ask customer for which service they want. 2. for example customer choose reschedule service 3. Ask for 10 digit mobile number from customer and wait till customer provide whole number and call tool to get details 4. if mobile number is valid then do otp verification 5. if mobile number is not valid then get address and name from customer and call tool to get details and do otp verification 6. now if otp verifies then ask customer for reschedule date and time 7. if customer has provided reschedule date and time then ask customer to say
say it sendee
word for confirmation. 8. After confirmation call tool to reschule service. Response I am getting: - I have provided current 10 digit number still it is saying is invalid number, after second try it is working perfectly sometimes it is skipping steps not working as provided prompts. You can see my system prompts I have provided condition but not working as per expectation and sometimes it is directly calling tools sometimes without confirmation of word
say it sendee
from customer. sometime in reschedule step not asking reschedule timing etc. Sometimes otp verfication taking too much time not not happening propoerly even after provided correct otp. every time i am getting different response from vapi call. so please look into my system prompts. Sometimes vapi is not waiting till customer provide full number.
@Shubham Bajaj @User
s
Hey @Dignesh to achieve the best of performance and fix your mentioned issues first ensure your prompt token length is under 2500, and currently it is above 4k kindly reduce the prompt token length, second refactor your prompt according to Vapi prompting guide recently we add an example which will help you out better, and try lastly give first perference to model gpt-4o. https://cdn.discordapp.com/attachments/1308033979529822252/1308823166197563422/Screenshot_2024-11-20_at_9.21.59_PM.png?ex=673f580f&is=673e068f&hm=0164a98266ab5ff3dd0d359aa8450c480a64061c14a60d1583ae197fb5632469&
Do let me know it goes, and how can i help you further.