Simon
Simon

Reputation: 1406

Interpreting User Request with Actions On Google

Unless I've done something majorly stupid, it appears I only have one entry point into my Action on Google using Actions SDK and Node.js.

Consequently, I have to work out what the user has said by using some keywords with .indexOf() and then calling the appropriate function.

I thought that would also be simpler and there would be a way I could define an action with several phrases and Google would be intelligent enough to work it all out, even if the user said something slightly differently.

I guess one of the things Im doing wrong/different, is just by having a welcome intent that essentially has a conversation and asks "What would you like to do?" then the user responds, then I have to work out what was said, and follow up an appropriate action.

That seems quite long winded. Any better ways?

Upvotes: 0

Views: 57

Answers (1)

Prisoner
Prisoner

Reputation: 50701

The "better way" is to use a tool that is designed for that and has a powerful and flexible Natural Language Processing engine associated with it. Actions directly support both Dialogflow and Converse.AI, and most other NLP engines should be able to provide information about how they work with Actions.

Dialogflow, for example, lets you specify some sample phrases that will meet an Intent, and then supplements that with "similar" phrases to the ones you've specified. Your Node.js webhook gets told which Intent was called, with what parameters you've specified for that Intent, and you can take action based on that information directly.

At this point, the Actions SDK is mostly intended to be used as the base that these and other NLP engines build on top of.

Upvotes: 4

Related Questions