https://retellai.com/?utm_source=discord&utm_medium=seo logo
when calling a person with a {{first_name}} for ex...
# ❓・ai-evy-support
v
@AI Evy when calling a person with a {{first_name}} for example Vaughan, sometimes the AI thinks that the user answered the phone as "Yvonne" and uses that name instead of the one in the data. How can this be fixed?
a
Thanks for tagging me @Vaughan. I'll look through relevant sources and get back to you shortly.
### Answer --- This is a common ASR (Automatic Speech Recognition) transcription issue where the system mishears what the user says and the agent incorrectly uses the transcribed name instead of the known
{{first_name}}
variable. Here are a few approaches to address this: 1. Use Boosted Keywords Add the customer's name (or common names you call) to the
boosted_keywords
field to bias the transcriber toward correctly recognizing those names. [(1) ]()
Copy code
json
"boosted_keywords": ["Vaughan", "retell", "kroger"]
2. Prompt Engineering Update your prompt to explicitly instruct the agent to always use the provided
{{first_name}}
variable and ignore any name the caller might say. For example: > "Always address the customer as {{first_name}}. Do not use any other name even if you think you heard a different name during the call." 3. Handle ASR Errors in Prompt The documentation recommends including guidance to overcome ASR errors in your prompt—pretend you heard correctly and use colloquial phrases if clarification is needed. [(2) ]() 4. STT Mode You can try switching
stt_mode
to
"accurate"
instead of
"fast"
for improved transcription accuracy, though this may add slight latency. [(1) ]()
Copy code
json
"stt_mode": "accurate"
The most effective solution is typically combining boosted keywords with explicit prompt instructions to always use the dynamic variable
{{first_name}}
.
​ To learn more, see the sources I considered: [[1] Update Voice Agent](https://docs.retellai.com/api-references/update-agent) [[2] Integrate LLM](https://docs.retellai.com/integrate-llm/integrate-llm) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.