maha387
12/01/2025, 8:43 PMAI Evy
12/01/2025, 8:43 PMAI Evy
12/01/2025, 8:43 PM{{variable_name}} syntax in your prompts [(1) ]() . For example:
- Correct: "The product SKU is {{sku}} and the name is {{name}}"
- Incorrect: "The product SKU is {sku}" or "The product SKU is $sku"
The spaces around the variable name will be trimmed when evaluating the variable .
## Verify Agent Version
A very common issue: your phone number might be associated with an older version of your agent that doesn't have the updated prompts with dynamic variables [(2) ]() . Check that your phone number is bound to the current version of the agent you're viewing in the dashboard .
## Strengthen Your Prompting
Be more explicit in your prompts, especially if using a weaker model . Instead of just mentioning the variable, provide clear context:
The customer's product details are:
- SKU: {{sku}}
- Product Name: {{name}}
Always use these exact values when discussing the product.
## Check Variable Format for Inbound Calls
If this is an inbound call using webhooks, ensure your webhook response uses the correct format [(3) ]() :
json
{
"call_inbound": {
"dynamic_variables": {
"sku": "ABC123",
"name": "Product Name"
}
}
}
Not this format:
json
{
"retell_llm_dynamic_variables": {
"sku": "ABC123",
"name": "Product Name"
}
}AI Evy
12/01/2025, 8:43 PMretell_llm_dynamic_variables field, and all values must be strings [(1) ]() :
json
{
"retell_llm_dynamic_variables": {
"sku": "ABC123",
"name": "Product Name"
}
}
## Add Defensive Instructions
Include instructions in your prompt to handle the variables properly :
If {{sku}} or {{name}} appear with curly braces, inform the user that product details are unavailable.
Otherwise, use the exact SKU and name provided.
The agent making up values typically means it's not finding the variables in the evaluated prompt, so it's hallucinating based on context instead of using your actual data.AI Evy
12/01/2025, 8:44 PMAI Evy
12/01/2025, 8:44 PM