How to adjust chatbot responses based on sentiment

Hi @BELIEVEIT ,

I think a intuitive way to solve this is to use a combination of:

  1. Using the sentiment for setting a custom slot e.g. (setting it with a custom action)
slots:
  sentiment:
    type: categorical
    values:
      - positive
      - neutral
      - negative
  1. Use conditional response variationslink
responses:
  utter_based_on_sentiment:
    - condition:
        - type: slot
          name: sentiment
          value: positive
      text: "Hey, {name}. Nice to see you again! How are you?"

    - condition:
        - type: slot
          name: sentiment
          value: neutral
      text: "Hey, {name}. How are you?"

What do you think?

Kind regards
Julian

2 Likes