Vapi sending incorrect data / arguments
# support
f
Hi @Vapi team, in the logs > messages, argements are not matching the correct information the Assistant collects during the call and which reflects in the transcripts. Call ID: 486fe44b-b56f-4d7f-8cfe-d8f5f8a235f9 00:56 - Assistant asks customer to provide lastname and spell it out. Customer gives last name and assistant confirms spelling correctly. Although, in the data that was sent externally, customer's last name (and last name in email) was spelt incorrect, there is no "double L" in the name. Call ID: f036f93a-efeb-44c5-9d9f-f6c56c83bdb5 00:50 - Again, customer spells out last name for Assistant. Again, the arguments data for Lastname & email did not match what was confirmed in the Transcripts - missing "double L" Call ID: f8eab61b-9486-4bbd-b108-517351563c09 00:50 - Another test and same issue. Arguments did not match Last Name and email correctly. Missing "double L" from name.
v
To troubleshoot the data discrepancy with the missing "double L" in last names, check your API request format and review the logs for errors in data processing. Specifically:
Copy code
1. Review the API request to ensure fields are correctly formatted
2. Examine logs for errors or warnings related to data processing
3. Check if there's any string manipulation or formatting happening between transcript generation and external data transfer
If the issue persists after these steps, contact Vapi support with your Call IDs for further assistance. Sources: - [General Troubleshooting Steps](https://discord.com/channels/1211482211119796234/1335308574556946480) - [API Related Checks](https://discord.com/channels/1211482211119796234/1328923059905630238)
k
Looking into it
f
Thanks @Kings_bigđź’«! How did you go looking into this? We still haven't been able to figure out a solution after many tests.
k
Reiterating your problem:
Copy code
When user spell out parts of their email (or last name) on the phone—using phrases like “double L” or “triple M”—our LLM-based assistant correctly hears and confirms the speech, but the data sent to the booking API collapses these into a single letter. As a result, “double L” becomes “L” instead of “LL,” “double M” becomes “M” instead of “MM,” and so on. You need to update our prompt design so that spoken duplication cues are faithfully converted into the right repeated characters before we invoke the createRestaurantBooking-dev function.
prompt_change
Copy code
Whenever the user spells out something using “double <letter>” or “triple <letter>,” interpret “<letter>” as the single alphabet character to repeat.  Expand “double <letter>” into two copies of that character, and “triple <letter>” into three. Apply this rule both when generating next responses OR when assembling any tool-call parameters.
If required, you can rephrase the prompt or change it completely, and then add a few examples. If it didn't work with the prompt change only, to let the LLM know how to interpret user input and convert it into the required output.
Copy code
Examples:
user: “c o double L a t e”  
your output: “c o l l a t e”

user: “d o u b l e M i s s e s”  
your output: “d o u b l e m i s s e s”

user:  “o l i v i a dot s c o p e double L i t i”  
your output: “o l i v i a . s c o p e l l i t i”

user:  “t r i p l e M”  
your output: “M M M”
Let me know how it goes for you.
f
Hi @Shubham Bajaj , we have added this prompt in and have done multiple tests and issue still persists. Here's another example: c159f95f-aac3-434a-bf86-e2a865752124 Dummy name: Carly Memmoritti - Assistant spelt back name correctly. Last name was sent through as: lastName: Memorides not Memmoritti. Also with this call, the Assistant got the phone number wrong at the beginning and then it was corrected. The argument was not updated to the correct phone number. It kept the first initial incorrect number. The description we have in the tool is: Phone number of the contact for the booking in E-164 format.
k
there might be an issue with the prompt. there are plenty of lastName confirmations for spelling, but somehow the assistant still logged the first iteration of the first and lastName values it heard. what I am thinking is that once the assistant fills in the field for first and last name, even with spelling corrections it won't override it, so you will have to edit the prompt to have the assistant replace the information or confirm the spelling. some examples I'm thinking of: Confirm firstName And repeat the spelling back to the user. If the user spells a name that does not match the value in firstName, replace the spelling of firstName to match. Confirm lastName, ask the user to spell their lastName. Then repeat the spelling back to the user to confirm it’s correct. the point of changing the prompt is to make sure that the assistant changes the saved data or replaces whatever data is there with the correction, whether it is the phone number, the first name, or last name.