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

(Remy Reurling) #1

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?

(Romain Huber) #2

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

(Remy Reurling) #3

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.

(Remy Reurling) #4

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

(Romain Huber) #5

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

(Remy Reurling) #6

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.

(Romain Huber) #7

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) !

(Remy Reurling) #8

done and done. Forgot about that!