Same training examples for two different intents


I have two different intents: radioOn and tvOn. Both have “stop” as training example in order to stop the radio or the tv, according to the intent.
The idea is: if “stop” is said when the radio is on, action A should happen, and if “stop” is said when the TV is on, action B should take place.
However, in practice if the TV is on and “stop” is uttered, action A happens instead of B, and if the radio is on and “stop” is uttered, action B happens, which is not what I need.
So my question is: is there a way to identify which “stop” is meant given the intent in which is being uttered?
Any help is highly appreciated.

Given your approach, I would suggest you have one intent and then have your skill/action decide what to do by checking which device is on. Otherwise there is no way for Snips to tell which intent you mean.

With two intents it woukd be better to be more specific in your training examples. e. g. “turn off the TV” in one intent and “turn off the radio” in another.

There are other ways. For example, I have a single intent for turning various things on and off. The one intent has multiple slots. One slot for the device, another slot for on or off, and another slot for location like kitchen, bedroom.

Hope that gives some ideas.

1 Like