I'm attempting to write a "trivia quiz" skill, like many others that already exist, but I would like the user to be able to give actual answers rather than "a/b/c" or "1/2/3". So the conversation will go like this:
- Alexa: Which planet is closest to the Sun: Mercury or Venus?
- User:
Mercury
- Alexa: That's correct! You have one point. Which company makes the Corvette, Cadillac or Chevrolet?
- User:
Chevrolet
- Alexa: That's right! You have two points. What were George Washington's false teeth made from? Wood or ivory?
...etc...
Since each question has its own set of answers, I'm happy to create one custom slot type per question, so I'd have a LIST_Q1_ANSWERS
slot of ["Mercury", "Venus"]
and a LIST_Q2_ANSWERS
slot of ["Cadillac", "Chevrolet"]
, and that's all fine. However, I do not know how to tell my skill that answers should come from this particular custom slot only.
I can of course create a specific Intent
for each question, so I create Q1Intent
, I start a Dialog, and I Elicit
my Q1Intent
. However, this doesn't work out, because in my response to their filling in the required LIST_Q1_ANSWERS
slot, I have to say "correct" and also ask the next question, which means that I have to Elicit
the Q2Intent
... and that's not allowed; I'd have to end the Dialog first, and then start a new one. (So the conversation would go "Which planet...?" "Mercury" "Correct! Do you want the next question?" "Yes" "OK. Which company..." and that's no good.)
I may be over-complicating things here. Perhaps there's an easier way to model the voice interface that I want. I can of course define all the different answers in one big custom slot, and then just have one single AnswerIntent
, but then people can answer Chevrolet
to the planets question and that's silly. (I know that I have to cope with any answers to a question, not just the ones in the slot, but I'd like to bias the question towards choosing answers from the slot; that's what slots are for.)
So, how should I be doing this? Dialogs won't work, I don't think.