Where Actions on Google meets Microsoft LUIS
My current job breathes to test different technology alliances, puzzle uncommon pieces together, check technology viability for new ideas and have fun with it.
We are going to work, this time, in some hypothesis to be validated and then extract some conclusions.
A. Initial hypothesis
Today, I decided to use Actions on Google to build an app inside Google Assistant using the Microsoft AI Cognitive Service called LUIS ( Language Understanding) in the place where Google offers Dialogflow, the natural Action on Google partner.
The two technical ideas I want to validate are:
1- Is possible to create an Action on Google replacing Dialogflow with another NLP service?
2- Would it be possible to have a common NLP service portable between platforms that can provide stability between responses?
B. Objectives — What we want to learn
I would like to get some insights from this experiment.
Firstly getting a deeper knowledge of the Actions on Google platform. Which boundaries it has. Also exploring an alternative to Dialogflow as NLP for the Actions on Google app.
Although, the most interesting thing is, to adjust a technology like LUIS NLP service over a bot that doesn’t belong to its natural ecosystem.
C. Implementation — What have we done
I will build a small prototype to validate our ideas. It might be incomplete or unfinished but the goal is to learn about the technologies not to be perfect.
Note: I am going to jump over the Action on Google App creation and publishing, in case you want to dig deeper into the previous follow next link https://developers.google.com/actions/sdk/
The language I have chosen is JavaScript (Nodejs) and Google released the module https://github.com/actions-on-google/actions-on-google-nodejs which is going to sustain our implementation.
Firstly I have created 2 intents for the app. One is the actions.intent.MAIN intent, which is the responsible for launching the application, and the other is for fetching any other general query, called actions.intent.TEXT.
Paralelly, I have created a LUIS app where with 3 intents. The None intent, which is created by default to pick up inside all the queries that are not matching any other intent. And 2 intents more created by me called: name and help.

Inside each intent, I added a few utterances. For testing your app it is required to train the app. Once you finished testing and you want to go for publishing, you need to create a cognitive service inside Azure. This service will provide a key. Afterwards, you should enable that key inside your LUIS app and that will facilitate a new URL for the new key added. Then you can use the new generated URL to request LUIS app from your Action on Google app.


Using the sample exposed in the doc https://developers.google.com/actions/sdk/fulfillment I only added the request to LUIS NLP URL to get the intent out of the input test and then adapt the response of the Google app to the intent.
D.Conclusions — What have we learnt
Dialogflow commonly is a bot itself that acts under specific intents providing answers. It can be configured as an intent detector plus answering delegator using a webhook called the fulfilment. But Dialogflow is there to answer with text under another given text. Whilst LUIS from Microsoft acts just as an intent detector. Microsoft LUIS is quick because doesn’t have to prepare the answer and powerful because it can be combined with other services.
We tried to combine both technologies because of the experiment but there is another reason behind. Imagine that you have an idea for developing a bot, how easy would be to include it in Alexa, Google Assistant, Cortana? There won’t be the need to adapt your idea to each technology. Having the intent recognition delegated to LUIS will help you to avoid duplication between the platforms and only play with the answers for every platform.
Although, your users will be impacted by more consistency when interpreting their words and it will make your bot available on more platforms shortly.
Hope you liked it, if so please share it.
Thanks for reading.









