Controling the advancement level of language in the conversation.
How can i make the bot respond with a different level of advancement when the user presses buttons with labels such as "simple languge"? It does not seem to work when i switch between the two in the same session. This is my current setup with components:



26 Replies
harsh-harlequin•17mo ago
Can you elaborate what you're trying to do exactly?
Yeah, so im trying to make a system in my bot where the user can change the level of language difficulty in the conversation with the use of buttons. So for example If I’m just a normal person with no experience in a subject, I would be able to change the language difficulty from “advanced “ to “simple”
rare-sapphire•17mo ago
You should save that as an entity in your agent. And, refer to this lanaguage level when responding up coming queries. Makes sense?
harsh-harlequin•17mo ago
Ah ok, what about setting a variable for it, and changing the prompt based on what that variable is?
Where would i set the variable?
harsh-harlequin•17mo ago
So i should set the variable to the button?
harsh-harlequin•17mo ago
There's a lot of options, I'd say someone clicks the button, set a javascript step that set's the variable, then from there base your flow on what that variable is set as 🙂
Could i use the set step?
harsh-harlequin•17mo ago
The Set AI step you mean? that is different. You can set a variable based on an AI query
With Javascript you can easily set a variable as such:
If you have a variable
difficulty
in voiceflow. In the javascript step you can do:
And the variable would be set to basic 🙂I meant the normal «set» step, but maybe code is easier👍 would i need two variables or just one so that the response AI would know to simplify if the variable is used and advanced if not used?
harsh-harlequin•17mo ago
i would use one.
difficulty
which can be either basic
or advanced
ah yeah sorry, a set step works also :pHaha no worries, but where in the flow should the set step be? And would I set two variables or is it better with one?
harsh-harlequin•17mo ago
Better with one, you would set it up after someone clicks a button
Alright I’ll give it a go, Thank you for helping me!🙂
Hey, if you have time, i cant seem to get the system to work? It responds with the same message when i ask the same question in the two different levels of advancement.

This is my prompt and flow for the "easy" langauge:


And this is for the "advanced" langauge:


harsh-harlequin•17mo ago
I see you have 2 variables now, defying the point of having variables :p
It should be one variable
difficulty
which should have value either basic
or advanced
then you can have everything in a single flow
And just set the prompt to be The lanauge is set to {difficulty}
Then it will change dynamically 🙂Ohh, ok, where do i set multiple values?
harsh-harlequin•17mo ago
I will explain it
Give me 10 min
@Radiant raindrop
What are Variables?
https://www.youtube.com/watch?v=RkRF1DpmkkU
Thanks man!
harsh-harlequin•17mo ago
Happy to help 🙂
Hahah you made a video just for me! Thank you😄
Really great explenation! Can I use the buttons multiple times in the conversation without it messing up?
And does using the memory variable in my prompt make it reasue the same answer for the same question?
harsh-harlequin•17mo ago
Haha i did xD Feel free to shout it out in the #🏅┃shoutouts channel :p
You can, and you can set the variable to something different at any time!
It'll be set to whatever you set it as last 🙂
I will man!
Great! Thank you for taking the time to help me understanding this🙂