Differentiate between increasing/decreasing and setting


I want to interact with a room unit. For that, I want to give possibilities of manipulation the temperature value:

  • increase/decrease temperature (eg. “increase temperature about 2°”)
  • set the temperature value (eg “I want to have 25°”)

My idea was:

  • intent 1: increase_decrease_temperature
    In this intent will be two slots: one slot, which identifies increasing and one decreasing

  • intent 2: set_temperature
    In this intent will be only one slot, which identifies, that the user will set directly the value

My questions now is;

–> How can I train SNIPS, that it could be differentiated between increasing/decreasing and direct setting of temperature? Is my idea correct or could I combine everything in one single intent?

Many thanks for the input!

I would create two intents. One for increase/decrease and one for the set point one.
But I would structure the slots differently.
In the increase/decrease intent I would create one slot that has increase as one value and decrease as a second value. Than I would create a second number slot for the increase/decrease amount.
The second intent for a temperature set point would probably only contain the one slot for the temperature number.
I think this structure of two intents, one with two slots the other with one would be the simplest to deal with in action code.
Best regards Johannes

Thanks @JGKK. If I create on combined slot for increase and decrease, what type of slot would that be? I need a differnet feedback if the user wants to increase or decrease the temperature value. I guess with your idea, that want works and I need a separation of those, meaning:

An intent called “increase_decrease” which contains three slots:

  • slot 1: increase with a custom type “increase”
  • slot 2: decrease with a custom type “decrease”
  • slot 3: value with snisp/temperature type

Or how could I create two values, one for increase and one for decrease in one “general slot increase_decrease”? You know what I mean?

What do you think?

You are thinking to complicated.
One custom slot can have as many defined values as you want and each of those values can have synonyms so no need for different slots for increase/decrease.
So you just need one slot with two values. You will see which value the nlu understood in the slots/value/value part of the json that you receive from snips.

I see! Thank you very much for the clarification. I try that out an maybe come back with some additional questions.