https://retellai.com/?utm_source=discord&utm_medium=seo logo
Add 'N' variables to retell_llm_dynamic_variables.
# ❓・bug-report
a
I have an array of N questions that need to be asked in a LLM state. Now I use something like:
{{question_1}} {{question_2}} ....
But that only gets me a fixed N number of questions. One approach would be to update the agent prompt each time the number of questions change, is that advisable? Another approach would be to inject a variable with a list such as:
Copy code
questions = "
- Question 1
- Question 2
- Question 3
...
"

In LLM state prompt:
Please ask the user the following questions: {{questions}}
n
I think the second approach should work fine. In fact, you can also pass a json array in the variable and the LLMs are smart enough to parse and understand them.
a
ok, thanks!
n
Let me know how it goes 🙂