Radiant raindrop
Radiant raindrop17mo ago

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:
No description
No description
No description
26 Replies
harsh-harlequin
harsh-harlequin17mo ago
Can you elaborate what you're trying to do exactly?
Radiant raindrop
Radiant raindropOP17mo ago
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
rare-sapphire17mo 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
harsh-harlequin17mo ago
Ah ok, what about setting a variable for it, and changing the prompt based on what that variable is?
Radiant raindrop
Radiant raindropOP17mo ago
Where would i set the variable?
Radiant raindrop
Radiant raindropOP17mo ago
So i should set the variable to the button?
harsh-harlequin
harsh-harlequin17mo 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 🙂
Radiant raindrop
Radiant raindropOP17mo ago
Could i use the set step?
harsh-harlequin
harsh-harlequin17mo 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:
difficulty = "basic"
difficulty = "basic"
And the variable would be set to basic 🙂
Radiant raindrop
Radiant raindropOP17mo ago
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
harsh-harlequin17mo ago
i would use one. difficulty which can be either basic or advanced ah yeah sorry, a set step works also :p
Radiant raindrop
Radiant raindropOP17mo ago
Haha 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
harsh-harlequin17mo ago
Better with one, you would set it up after someone clicks a button
Radiant raindrop
Radiant raindropOP17mo ago
Alright I’ll give it a go, Thank you for helping me!🙂
Radiant raindrop
Radiant raindropOP17mo ago
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.
No description
Radiant raindrop
Radiant raindropOP17mo ago
This is my prompt and flow for the "easy" langauge:
No description
No description
Radiant raindrop
Radiant raindropOP17mo ago
And this is for the "advanced" langauge:
No description
No description
harsh-harlequin
harsh-harlequin17mo 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 🙂
Radiant raindrop
Radiant raindropOP17mo ago
Ohh, ok, where do i set multiple values?
harsh-harlequin
harsh-harlequin17mo ago
I will explain it Give me 10 min @Radiant raindrop What are Variables? https://www.youtube.com/watch?v=RkRF1DpmkkU
Radiant raindrop
Radiant raindropOP17mo ago
Thanks man!
harsh-harlequin
harsh-harlequin17mo ago
Happy to help 🙂
Radiant raindrop
Radiant raindropOP17mo ago
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
harsh-harlequin17mo 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 🙂
Radiant raindrop
Radiant raindropOP17mo ago
I will man! Great! Thank you for taking the time to help me understanding this🙂

Did you find this page helpful?