2

I have a bot which provides information about cinemas like movie schedules and release dates.

Part of this is a cinema_action trait entity that maps to different values based on the user's input. I have inserted training data for each value.

E.g
cinama_action --> schedule
cinema_action --> release_date

However, I am unsure if this is the proposed way of structuring user intents or if I rather should create a single entity for each intent.

The latter would have the advantage of being usable within response and action hints where I can specify which context or entity should be present or not present for an action or response to fire. With the former I can properly group different intents to a single entity, because they all relate to the cinema topic.

With my current setup I can't use cinema_action as a hint, because the real information lies within the entity's value.

bluenavajo
  • 483
  • 5
  • 9

1 Answers1

2

This is a good question, thanks for sharing. And it really depends on your app and what you want to do. We may add in the future action hints on entity values and not only entity names. In the meantime you will have to rely on a Bot executes (ie an action on your side that will convert the entity key/value into an unique context key)

The main advantage we see in creating trait entities for each intent value would be to do multi matching. In your case, I'm not sure this will be very frequent that your users will ask in the same message both about the schedule and the release date

This is why I would go with an trait entity "cinema_action" with different values rather than creating multiple trait entities like "cinema_action_schedule" with a single value "True" for example.

l5t
  • 578
  • 2
  • 5
  • 1
    Thank you for elaborating on this. I will go with the proposed solution and create unique tags from the intent value. Maybe this thoughts are worth to put into the recipes section of the wit.ai docs? – bluenavajo Aug 02 '16 at 08:56