Hi everyone , i had just use the pre-trained model for sentiment analysis into my chatbot with custom component , may i know how can i make use of the sentiment value e.g neg/pos under entities shown below to utter different response ?
Example of use case of asking user for feedback on service experience , chatbot will apologies to user if sentiment is negative and thank user if it is postive.
Hi! While you could achieve this with slot mappings, I would caution against using a sentiment classifier to drive the conversation. Sentiment classifiers are imperfect and will often change their prediction substantially if you change the words of the text that have nothing to do with the sentiment. Compare
take your shirt and give me back my $$$
to
take your shirt and give me back my money
in this sentiment classifier. They both have the same sentiment but the classifier gives different predictions.
Instead, why not ask the user directly give feedback with buttons. For example,
responses:
utter_ask_feedback:
- text: "How would you rate your overall experience with our product?"
buttons:
- title: "Love it!"
payload: "/positive_rating"
- title: "It's ok."
payload: "/neutral_rating"
- title: "Hate it!"
payload: "/negative_rating"
This way the user can tell you directly how they are feeling about the product and you can give them the appropriate response with confidence.