Intent Splitting Strategy

Hello guys !

I built my first App via the console to drive a few things in my apartment, coupled with Home Assistant.
The App changed a lot, I tried different strategies to create and split intents.

I would like to know your expert view, learn what you do personally, discuss about the benefits and inconvenience of each strategies…

First I created very granular intents during the prototyping phase.

  • TurnOnLight
  • TurnOffLight

I validated the full chain (From Voice to Home assistant doing sometime on a lamp with these intent)

I created a slot for the room in the apartment. It worked well too.

When I tried to implement intensity change, I started to think about all the use cases I wanted to support:

  • Turning on a light
  • Turning off a light
  • Setting a light to a specific intensity value
  • Decreasing the intensity of a light based on its current intensity (divided by 2)
  • Increasing the intensity of a light based on its current intensity (multiply by 2)

And I decided to merge everything in one generic intent… ActOnLight with slots for

  • The action
  • The room
  • The intensity

It works well…
I have also ActOnMediaPlayer, ActOnVacuum, ActOnCover now…

But since then I am asking myself.

What is the best strategy ?

  • Granular intent with maybe less training data, but a simpler processing afterwards
  • Generic intent with more data but more complexity to handle them
  • A bit of both ?

Thank you in advance/
Jenova70

I use a generic intent too. It includes on / off as a slot type, dimming values as another one and than a device value slot that includes names and synonyms for devices groups rooms and scenes. I decided to do this as my action code actually supports chaining of all those commands. So you can say turn off the light in room one activate some scene and turn on the light in room 2 all in one command.
My experience was that you just need more training examples for complex intents like this. Mine works great now with 125 training examples for 29 device values.
So I would recommend more complex intents as they enable more complex interaction.
Johannes

Interresting topic :slight_smile:

On my side I have kept intent simple (globaly ON and OFF only), multipliying switches (on Domoticz side) that ease the intent understanding and handling complex logic afterwards.

That eventually leads to some complexity in the scripting but allows also to have real accurate conditions for triggering :slight_smile:
But maybe it is also linked to the fact i’m not really good at coding/scripting :slight_smile: :slight_smile: :slight_smile: and even worse when it comes to get flexibility in all that hahahaha

That’s the nice thing in German grammar. The command comes always after the device in the sentence which makes parsing of complex chained intents that much easier compared to the english grammar.

Indeed :slight_smile:
We won’t talk about french language then hahahahahaha

1 Like

I am french don’t hurt my feelings :slight_smile:
Jokes aside, thank you guys it’s very interesting reading what you are doing…

1 Like

I’m french too :slight_smile:

That’s why I’m avoiding to complexify the intends, as there are too many ways/cases to say the same thing. It would be a hell to handle it properly :slight_smile: :slight_smile:
At least with my level of coding :wink:

I should admit that I reuse the already existing app from SNIPS to Domoticz without trying to improve the level of interraction… So I had no real other opportunities to do something else in terms of intend strategy.

1 Like