Alexa tell me your Dev gotchas in 5 mins!!

 

Recently a customer wanted to experiment with Alexa for interacting with end users instead of having them select a bunch of options from a web/mobile app.  Here is how Alexa works when defining a Custom Skill which is what we needed to make.

ASKArchitecture._TTH_

We decided to do a quick POC in order to estimate more accurately! Here are some very quick learnings and gotchas!

A quick search resulted in the following 5-minute tutorial coming up high in the search results!

https://developer.amazon.com/alexa-skills-kit/alexa-skill-quick-start-tutorialimage

We really couldn’t do the tutorial within 5 minutes and actually got stuck at multiple points Smile

Well to be fair…we were not following these steps precisely but followed a parallel step by step process from https://developer.amazon.com/docs/custom-skills/host-a-custom-skill-as-an-aws-lambda-function.html#test-a-lambda-function-in-the-console

Most developers who are keen to know the theory first before jumping hands on will mostly go through the docs first so we thought we will pen down points where we got stuck

1) Session persistence does not work in the Test cases i.e it does not pick up from the session ( since the template does not transfer session data..)

2). Incorrect Intent match. Every time we fired an utterance which according to us was not a match for any or our intents we expected it to NOT match any intent but it DID match.

This is especially true if you are using custom slots. You need to be very careful when defining your utterances and slots if you expect Alexa to give you the right intent match and ignore irrelevant sentences.

It seems to be a machine learning algorithm which considers the number of words in the utterance, the utterance word itself, as well as the number of words in each sample slot

Source:-  https://medium.com/voiceflow/how-utterances-slot-samples-affect-intent-matching-in-alexa-skills-dcb9b5f7a9ae

3) As such the tutorials are programmed to exit as soon as Alexa gave you the correct answer. We tried to change the code to have Alexa continue the session post a successful answer but it simply didn’t work for us. Even setting the “should_end_session” variable to false did not let the session continue for us. Not sure what was wrong here

4) Oh and be careful when you define your custom slot values. We were pretty confused when we saw Alexa recognizing values we had not specified Smile Below is the article that helped us understand this better

https://medium.com/voiceflow/tips-and-gotchas-using-alexa-custom-slots-b88f97f26b06

5) Local Dev Environment:- While the live server environment shown in most of these quick-starts are great to get a quick demo up and running and boast up your confidence level, any fair sized project will need you to put up a local development environment. We used the AWS toolkit with Visual Studio to host our own lambda functions and its really simple to get it up and running!

There is nothing better than getting your hands dirty when learning a new technology . Below are some of the other links we went through!

All in all it was a lot of fun working on this little POC and we can’t wait to get started on the project….lots more to learn and uncover!!

Team Cennest!!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>