How to make a story where any value of one entity is recognized

Hey everyone,

I’m trying to create a story that handles a question with a very large set of values for an entity.

I have an entity called ‘concept’ that holds all kinds of history subjects, from ‘medieval city’ to ‘world war II’.

Now, I want to create a story that goes something like this:

* define{"concept":"world war II"}
    - action_define

However, I don’t want to copy and paste this story for literally every concept (100+) I’m dealing with. Is there any way to do this?

First thing you can do is use the “OR” statement, something like this :

* define{"concept":"world war II"} OR define{"concept":"medieval city"} OR ....
    - action_define

I don’t think you need all the entities in your story, we have the same problem and we have put 5-6 entities in our story, and the core still understand for the other values

Hiya Romain,

Thanks for the quick response. I thought as such. I didn’t know Rasa generalizes for the rest of the values though. I’m going to try that out. I’ll report back after testing.

Also, as a followup to this statement: The story will then be handled by Keras, correct?

I think so yes, in fact our story are not often handled by the Memoization policy, maybe it’s linked to that :thinking:

1 Like

I just tested this. Having around 6 OR statements in there makes my model use Keras with 1.00 accuracy. Thanks for the solution, I’ll implement this.

1 Like

I don’t know if you know, but there is a “Select this response as a solution” which set the topic as resolved (more or less) !

done and done. Forgot about that!