genetic-orange•2y ago
button and ia answers
I am creating a bot that has 5 questions all with answers with a button, the answers that the user selects (click on the button) has to be saved since I need to capture information from the questions and give an answer with AI based on the base of knowledge loaded. i tried this way but it didnt work, the ai response is not quite good, for example if i select Option A the ai response has nothing to do with option A. how i also tried capturing but the same thing happened. i do my search and some people told me of the event "on click" but i didnt find it, I don't know what other option I can try
example:
11 Replies
To address the issue you're experiencing with AI responses not aligning with the selected options, it's important to ensure that your bot is correctly capturing and processing user inputs. Here are some steps and considerations that might help:
- Use Buttons for straightforward user interactions where users can click to make a choice. This is effective in chat assistants but not supported on all platforms like WhatsApp and Twilio.
- Capture steps can be utilized to record the entire user reply or specific entities within a user's response. This allows for more detailed data collection and can be used throughout your assistant.
- Ensure that your Knowledge Base is well-structured and contains relevant data sources. The AI uses these documents to generate responses, so the quality and relevance of the uploaded documents directly impact the AI's performance.
- Review and possibly refine your Capture Step Entity Creation & Editing to ensure that the entities being captured are correctly defined and utilized in generating responses.
If the AI's response quality is still not satisfactory, consider revisiting the documents and data sources powering your Knowledge Base to ensure they are comprehensive and closely aligned with the expected user queries and responses.
For more detailed guidance, you might find these resources helpful:
- Adding User Input
- Capture Step Details
genetic-orangeOP•2y ago
@NiKo | Voiceflow
Change your LLM prompt to return a JSON with a question and five possible answers + the letter of the right answer.
Your buttons will looks like this:
A
B
C
D
E
When user click on a button, {last_utterance} will have the value of the button label.
Check that the value match the right answer.
genetic-orangeOP•2y ago
The thing is that I don't have a correct answer, but there are multiple options for business problems and the answer that the AI gives is based on the problem that the company has. For example, if the company has problems related to sales and its sales application is Instagram, it could improve by doing X thing. So the answer depends on the problem that the company/user has and the AI response is based on that
@SuperZooper
conscious-sapphire•2y ago
Ah I see, so the AI proposes 5 options and the user selects one of them. You could build this by creating five variables for the body of each of the options, and then depending on which button the user pressed like (ABCDE), you can store the body of the selected option into a variable called something like
{selected_body}
and then in your AI prompt for support, you can pass this selected body at the top in a prompt more like The user asked about {selected_body}
If that doesn't answer your question, could you try and send an exmaple of the diagram you're working with?genetic-orangeOP•2y ago
this is my diagram, i think that im doing that. i speak spanish so all the diagram is in spanish. i leave you the rar there is the .vf. anyway thank you so much
conscious-sapphire•2y ago
I'm not able to load it sorry, can you just send screenshots?
genetic-orangeOP•2y ago


conscious-sapphire•2y ago
Hmm I see, it seems like you've hardcoded the quesitons that are being asked. Instead of setting differnt varriables after each case choice, are you able to just set
{pregunta}
to case 1 or 2 or 3 or 4
and then in your prompte, you feed in {pregunta} which'll be populated with the specific case's datagenetic-orangeOP•2y ago
in that case if i just set {pregunta} to case 1,2,3 and 4 when te bot gives me a response he would know wich option the user clicked?
conscious-sapphire•2y ago
sorry for the slow answer haha. you'll set the pregunta to what they clicked. assuming the cases are hardcoded you can just do pregunta = Estacer de leads certificado or any of the other cases.