Challenge Overview
Challenge Objectives
-
Update an existing bot
-
Introduce QnA style conversation in addition to the existing choice based conversation
-
Carry out some business logic at the end of the conversation
Project Background
-
In this project, our client is attempting to create a ChatBot to answer any questions that the user may have.
-
The ChatBot also determines the eligibility or readiness of the end user in using our client’s services by asking a set of questions to the user
Technology Stack
-
Nodejs (version 10)
-
BotFramework (Javascript / Nodejs based SDK version 4)
-
Azure (services related to deployment of the Bot). https://azure.microsoft.com/en-us/free/ It has a free trial for 30 days.
Code access
There are two code bases that we will provide. One is the bot. The other is the UI that interacts with the bot.
For this contest, you will be making changes only in the bot. The UI will not be touched. However, the UI will be used during verification.
Individual requirements
Update existing bot with another QnA based workflow (Major Requirement)
-
Right now, the bot only has one workflow where it asks a set of questions with choices to the user and the user has to select a choice and enter the choice number against that question.
-
At the end of the conversation, the bot is able to remember the choices selected by the user and POSTs the same to RequestBin.
-
Update the bot to have another workflow, that of a Question and Answer (QnA) conversation.
-
The expectation is as follows:
-
When the bot is launched, the bot needs to greet the user with the following statement (FYI - This is a choice based prompt dialog):
-
Hello, I am IAN and I am here to help you with automation.
I can help you in several ways, so please let me know what you are interested in:
-
Finding out more about automation
-
Completing a quick assessment to see if you have automation opportunities
-
End the conversation
-
If the user selects choice 2, then proceed with the existing survey based questions where each question is a choice based prompt dialog and the bot remembers the choices selected by user for each question
-
If the user selects choice 1, you will proceed with the QnA based set of questions which you will develop as part of this contest
-
If the user selects choice 3, respond with “Ending the conversation. Thank your for your time”.
-
For the QnA workflow, at the end of each answer, let the user know what to type to come back to the start (where the user can decide to choose either the QnA option or the quick assessment option)
-
For the quick assessment option, at the end once all the questions have been answered, take the user back to the start ( (where the user can decide to choose either the QnA option or the quick assessment option)
QnA Workflow (Major Requirement)
-
The Question and Answer workflow is a conversation where the user interacts with the bot by asking predefined questions. The bot will respond with pre-determined answers for these questions
-
You will use QnAMaker to set up your knowledge base. You will then use this in your bot, when the user selects choice 1 in the initial prompt.
-
The bot does NOT need to remember the questions asked by the user. It only needs to respond to the question asked, by referring to the set of questions and answers provided earlier through the QnAMaker.
-
The knowledge base will need to be setup using a .tsv file. We will provide the set of questions and answers in the contest forum, which you will need to set up in a .tsv file, and then feed it to the knowledge base.
Introduce business logic (Major Requirement)
-
Create a service in the bot, that is called for each new user / connection / conversation. The service will return an email address. You don’t have to make the email address configurable. Instead, it can be hard coded. The client will replace this later with their own implementation of reading the user’s email address from their internal apis.
-
At the end of the survey based conversation (the existing conversation and NOT the to-be-added QnA conversation), call another service to which you will pass the answers selected by the user (currently, we pass it to RequestBin) and this service will return a random value between 0 and 100. The client will replace this service with their own logic for calculating the score based on the user answer.
-
After retrieving the “score”, email the user. Use the email address retrieved at the beginning of the conversation as the email address of the user. The email body will make a mention of the score that the user has received and some random Lorem Ipsum text (Shot text. You don’t have to write multiple paragraphs or lengthy emails). Additionally, include the admin in the email too (through the cc input). The email address of the admin needs to be read from an environment variable. Kindly use SendGrid as your email delivery service.
-
The call to RequestBin needs to be removed. This will this be replaced with
-
The call to the service to get a score for the selected answers (which randomly returns a value between 0 and 100, inclusive)
-
Followed by sending an email to the user and the admin with the score and Lorem Ipsum text.
-
Update Deployment Guide (Major Requirement)
-
Update the existing deployment guide for the bot with instructions on setting up the QnA workflow too.
-
This is in addition to the existing survey based workflow.
Deployment guide and validation document
You will only be updating the deployment guide for the bot. The reactjs based front end’s deployment guide will not undergo any updates. If that is not the case, please first clarify in the contest forum.
Verification of your changes will be carried out using the reactjs front end by the reviewer. So kindly ensure that your changes are reflected in the UI as well.
Important Notes
- Reviewers will deploy your solution (Only the bot, not the UI) to Azure. It should work on Azure and not just locally.
-
Follow existing conventions used in the app.
-
Ensure your submission does not have any lint errors
Final Submission Guidelines
You only need to submit the source code of the bot. You are not required to submit the front end source code. Zip the bot source code along with the deployment guide and upload it to Topcoder.