How to create story path based on entities extracted?

I want to ask feedback from user. He might ‘like’ the product or ‘hate’ it. So, I designed this in following way:

  • story: feedback good

steps:

  • intent: performance_feedback

  • action: utter_feedback

  • intent: user_feedback

    entities:

    • fdResponse: “like”
  • action: utter_good_feedback

  • story: feedback bad

    steps:

    • intent: performance_feedback

    • action: utter_feedback

    • intent: user_feedback

      entities:

      • fdResponse: “hate”
    • action: utter_bad_feedback

However, when i test this flow using rasa data validate, it says:

Story structure conflict after intent ‘user_feedback’:

utter_good_feedback predicted in ‘feedback good’

utter_bad_feedback predicted in ‘feedback bad’

What is the right approach for this?

Hey @udit.pandey, you’re seeing this behaviour because next action prediction isn’t influenced by the actual values of entities, only by whether a given entity is extracted from the user text or not. So, to condition on the value extracted (“like” vs “hate”), you’d have to have a slot that gets filled from the entity – e.g. a slot of type text, with influence_conversation: true.

Side note: Please, format your code like this so that it’s easier to read:

```yaml
- story: story_name
  steps:
  ...
``` <--- opening and closing backticks needed
1 Like

Ah, thanks Sam! This is not clear in the docs to me but you have answered my question here:

1 Like

Just to add to this, you would need to use a categorical slot to influence based on value. Text slots do not influence based on value.

1 Like