https://retellai.com/?utm_source=discord&utm_medium=seo logo
Im trying to add dynamic variables with test value...
# ❓・ai-evy-support
c
@AI Evy Im trying to add dynamic variables with test values and then do a test audio but agent is not picking up the test values. how to solve this? Im using a conversational agent
a
Thanks for tagging me @careergenie_82062. 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.
### Answer To ensure your dynamic variables with test values are picked up during an audio (voice) test with a conversational agent in Retell AI, make sure you are setting the dynamic variables correctly using the double curly braces syntax (e.g., {{user_name}}) in your prompts or conversation flow [(1) ]() . For outbound calls, you should provide the variables in the retell_llm_dynamic_variables field as key-value pairs, with all values as strings [(1) ]() [(2) ]() . Example:
Copy code
json
{
  "user_name": "John Smith",
  "product_name": "Premium Plan"
}
[(1) ]() , [(2) ]() If you are testing in the LLM Playground, ensure you enter the test values for dynamic variables and verify that they are properly interpolated in the agent’s responses [(3) ]() . You can test different variable values and scenarios here. If dynamic variables are still not being picked up, double-check that: - The variable names in your prompts match exactly with the keys you provide. - All values in retell_llm_dynamic_variables are strings. - You are not missing any required variables, or if some are optional, that your prompts handle unset variables gracefully [(1) ]() . If you are using chat-only mode, note that there have been reports of dynamic variables not populating in chat-only test mode for some agent types, but they do work in voice mode [(4) ]() . In those cases, manually specifying variables at the top can help as a workaround .
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Update Call](https://docs.retellai.com/api-references/update-call) [[3] Manually test your agent](https://docs.retellai.com/test/llm-playground) [[4] Dynamic Variables Don't Populate in Chat-Only Test Mode (Multi-Prompt Agent)](https://discord.com/channels/1186424376300679209/1421373431781396580) ​