I’ve been thinking a lot about whether its better to use specific intents and actions or more generalized intents and actions (or maybe even more likely is a combination of both but when to use each kind). I think the best way to describe this would be with some examples:
“I want to go outside” → intent: DesireGoOutside vs “I want to go outside” → intent:DesireGoPlace Entity:Outside
And then using some activities as well
(specific intent and specific action) intent: DesireGoOutside action: GoOutsideThen vs (generic intent and specific action) intent: DesireGoPlace entity: Outside slot_was_set: DesiredPlace: outside action: GoOutsideThen vs (generic intent and generic action) intent: DesireGoPlace entity: Outside action:GoPlaceThen (custom action that would then figure out what action to do based on the data passed to the custom action server)
I see benefits and downsides of each of theses approaches and I’m not sure exactly which one would be best or when different approaches may be better.
With a specific intent and specific action, training is very simple for the model and the model has lots of future context about the exact action it took. But, the number of intents and actions that would have to be specified to the model could be very large or infinite.
With a generic intent and specific action, the model has the information about the exact action that will be taken but we have to specify potential very many custom actions manually. Also, the stories and model slots get a bit cluttered with slots that store the entity value from the corresponding last intent.
With a generic intent and generic action, training for the model is very simple as it just matches generic intent to generic action. Also, this brings down the number of needed specified actions and intents. However, it appears some context is lost… Consider the following extension to the above example intent: DesireGoPlace entity: Outside action:GoPlaceThen user: “should I go to a park or go hiking?”
In this scenario, the model now loses some context that the previous action was actually “GoOutsideThen” so it will be harder to respond to this user message. Perhaps the answer is to again store the result of the original intent in a slot as in the second example, but this then gets tricky as who knows how long we could be referencing slots that came from an entity being set. Also, if that slot gets overridden by a new entity we lose the context entirely. Also another concern of mine is adding more and more slots with this approach without them getting cleaned up. Do slots get garbage collected automatically or how does that work exactly?
I hope someone has some info into which of these approaches (or maybe other approaches) would be the best for a general purpose conversational AI?