https://retellai.com/?utm_source=discord&utm_medium=seo logo
How to ensure the agent updates it internal workin...
# ❓・ai-evy-support
j
@AI Evy How to ensure the agent updates it internal working memory and extracted variable after user corrects the spelling. Example, transcription initially heard "Jamere" and never updated to "Jahmyr" even after spelling.
a
Thanks for tagging me @jeremy_24520. I'll look through relevant sources and get back to you shortly.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
This allows you to programmatically correct variables mid-call if you detect the need for an update . 3. Extract Dynamic Variable Node Configuration When setting up your Extract Dynamic Variable Node, provide clear descriptions that might help the LLM understand correction scenarios [(1) ]() . You can specify the Variable Name, Description, and Variable Type . For your specific use case of handling spelling corrections, I'd recommend combining boosted keywords with a flow design that explicitly asks for confirmation and re-extraction when users indicate they need to correct information. You might also consider using webhooks to programmatically update variables when corrections are detected. Would you like guidance on implementing any of these approaches? **
### Answer Based on the available documentation, when working with dynamic variables in Retell AI, you can extract and store information using the Extract Dynamic Variable Node [(1) ]() . This node allows you to create variables with specific types (Text, Number, Enum, or Boolean) and descriptions to guide what values should be extracted . However, the documentation doesn't explicitly address how to handle user corrections to already-extracted variables or force the agent to update its internal working memory when a user spells out a correction. Here are some approaches based on the available features: 1. Use Boosted Keywords for Better Transcription You can add custom keywords to bias the transcription model toward specific names or terms [(2) ]() [(3) ]() [(4) ]() . For example:
Copy code
json
"boosted_keywords": [
  "Jahmyr",
  "retell"
]
This helps the speech-to-text system recognize uncommon names more accurately from the start . 2. Dynamic Variables During Calls You can update dynamic variables during an active call using the
retell_llm_dynamic_variables
field [(5) ]() :
Copy code
json
{
  "retell_llm_dynamic_variables": {
    "customer_name": "Jahmyr"
  }
}
j
@AI Evy That makes no sense about boosted keywords. The name will be different on every call
a
Thanks for the follow-up, @jeremy_24520. I'll get back to you soon.
### Answer You're absolutely right—boosted keywords are designed for static terms like brand names or common phrases, not dynamic per-call data like unique customer names [(1) ]() [(2) ]() . For handling user corrections to extracted variables (like "Jamere" → "Jahmyr") , the documentation doesn't explicitly cover forcing the agent to update its internal working memory after a spelling correction. However, you can programmatically update dynamic variables mid-call using the Update Call API with the
retell_llm_dynamic_variables
field [(3) ]() . The real challenge is that there's no documented mechanism to make the LLM automatically re-extract or overwrite a variable when a user verbally corrects it. You'd likely need to: 1. Design your conversation flow to explicitly prompt for confirmation and re-extraction when users indicate a correction 2. Use webhooks to detect correction scenarios and programmatically update variables via the API 3. Structure your Extract Dynamic Variable nodes to be re-triggerable when corrections are detected Unfortunately, the available sources don't provide a built-in solution for automatic memory updates on user corrections. This appears to be a workflow design challenge rather than a configuration setting. Would you like me to try providing a general approach based on common conversational AI patterns, or would you prefer to reach out to Retell support for guidance on this specific use case? **
​ To learn more, see the sources I considered: [[1] Get Agent](https://docs.retellai.com/api-references/get-agent) [[2] List Agents](https://docs.retellai.com/api-references/list-agents) [[3] 404 Error on Create a Phone Call](https://retell.discourse.group/t/404-error-on-create-a-phone-call/22) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
j
@AI Evy yes
a
Thanks for the follow-up, @jeremy_24520. I'll get back to you soon.
### Answer Since you're interested in a general approach, here's how you could handle user corrections to extracted variables in Retell AI: Approach 1: Update Variables Programmatically During the Call You can update dynamic variables mid-call using the Update Call API [(1) ]() . When you detect that a user is correcting information (through webhook events or custom logic) , you can programmatically update the variable:
Copy code
json
{
  "retell_llm_dynamic_variables": {
    "customer_name": "Jahmyr"
  }
}
Approach 2: Design Your Flow for Re-Extraction Structure your conversation flow to explicitly handle corrections: 1. After extracting a variable (like a name) , have the agent confirm: "Just to confirm, I have your name as [extracted_name]. Is that correct?" 2. If the user says "no" or indicates a correction, transition to a re-extraction node or prompt state 3. Use the
{{variable_name}}
syntax in your prompts to reference the current value [(2) ]() Approach 3: Leverage Collected Dynamic Variables When variables are extracted during a call, they become available in
collected_dynamic_variables
[(1) ]() [(3) ]() [(4) ]() [(5) ]() [(6) ]() [(7) ]() . You can reference these in subsequent prompts or tool descriptions to ensure the agent is aware of the latest values. Key Limitation: The documentation doesn't provide a built-in mechanism for the LLM to automatically detect and re-extract variables when users verbally correct them. You'll need to design your conversation flow to explicitly handle correction scenarios. For your specific use case with name spelling corrections, I'd recommend designing a confirmation step in your flow that allows users to spell out their name if the initial extraction seems incorrect, then using the Update Call API to programmatically set the corrected value.
Appreciate the feedback! Feel free to ask me again with additional guidance or context.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.