Customize Alexa QnA

28 Views Asked by At

I am trying to build a custom alexa app, using developer.amazon.com . I plan to customize the QnA for generic questions. Example

if you ask alexa "Can i recycle glass bottles" , it gives a standard answer from wikipedia. I want to override (in my alexa only for now and later as an optional application for others to use) I tried creating a custom alexa QnA skill and publishing it , but it keeps on telling answers from wikipedia instead of mine

Then i further tried to play along with it used custom questions like "who is worlds best sister" and as an answer gave "cindrella". But it did not worked either , i got message "i do not know that"

I checked the activity history on my mobile app , and i see my questions , but answers are generic instead of custom answers. What i could be doing wrong? How do i debug ?

2

There are 2 best solutions below

1
Mike Dinescu On

It sounds like you may have an expectation that your custom QnA skill would be always on when you interact with Alexa on your devices. That is not how custom skills work.

When you build a custom skill, there are three parts:

  • the invocation phrase -- this is how you start/call upon your skill
  • the interaction model -- this is a set of intents that your skill can respond to
  • the skill logic -- this is what your skill does in response to both the invocation phrase (launch requests) and other intents from your interaction model

You can't create such a skill to replace functionality already provided by Alexa, except in some limited scenarios, on your own devices, using one of the following techniques:

  1. create a skill with an invocation phrase such as "who is the world's best sister"; if you do this, when you say "Alexa who is the world's best sister" there is a good chance your skill would be selected instead of whatever Alexa would normally do (although technically you're supposed to say "Alexa open/launch/start who is the world's best sister)

  2. setup a routine to handle the utterance you want to go to your skill with an action that invokes your skill -- this may require publishing your skill first in which case it's sort of a dead end

I hope this helps clarify some concepts for you

2
Dave Curley On

Alexa distinguishes between "1st party" and "3rd party" invocations, known as 1P and 3P.

1P invocations are handled by Alexa directly or by tightly integrated Amazon partner skills. They don't require any particular launch phrase. You just say "Alexa" followed by your question or command. Alexa handles the utterance without even looking for a custom skill - even if that skill might also be able to handle it. Handling it might mean accessing Alexa's built in knowledge, scraping Wikipedia or another external source, or interacting with routines or home automation you've configured in your account.

Any phrase that's not a 1P invocation is treated as a potential 3P invocation. Alexa tries to find the most likely live skill to handle what was said, and starts a session with that skill. Once the skill is launched it has control of the conversation (so users don't need to repeat the invocation phrase) until the session ends or is interrupted.

If Alexa doesn't find a 1P or 3P skill to handle the utterance, you'll get a response like "I don't know about that".

Developers (in general) cannot create 1P skills; the skills we build and certify using the standard ASK tools are 3P skills.