How to build the Quiz Bot
Once you understand the flowchart above, it is quite straight-forward to go for the intent definitions.
Default Welcome intent
The default welcome intent can be triggered using both a Welcome event as well as the Start over phrase.
This is the intent definition for the case where the user answers the first question correctly.
If the user provides an incorrect response for question 1, we handle it using the wildcard entity. Type out any phrase (I have used “something else”), press Enter, mark the whole training phrase as @sys.any wildcard entity, and ignore the warning.
Follow a similar pattern to answer1.correct intent for when user answers question 2 correctly.
Now follow the same approach for the incorrect answer for question 2.
This is the intent definition for when user answers the 3rd question correctly. Note that there is a suggestion chip with the text “Start over”, which allows the user to retake the quiz.
Use the previous pattern (that you used for the incorrect answers) for the incorrect answer for question 3.
That’s it. You should now have a bot which behaves as shown in the demo video.
How to mark lessons as complete
Once you register for this course, you will be able to mark lessons as complete.
How to unlock all the lessons
Once you register for the course, make sure you click on the "Take this course" so you can unlock and watch all the lessons in the course.