AIVA Loan Eligiblity Survey: Setup Amazon Lex with Lambda Processor

Key Information

Register
Submit
The challenge is finished.

Challenge Overview

ATTENTION: This contest uses the Subjective Scorecard

 

Challenge Objectives

  • Setup a Bot using Amazon Lex

  • Setup a Lambda function to initialize, control execution and validate the slots in the Lex bot

 

Project Background

  • Our client currently has an angularjs app where the user is asked a set of questions to check if they are eligible to get a loan

  • They wish to have another version of this app, one where the user interacts with the app through audio. The questions will be asked by a bot which captures the answers and uses the same api as the angularjs app to get the list of questions and to submit the answers.

  • This contest focuses on building the bot. We will launch another contest which will focus on integration of the bot with the front end of the app

 

Technology Stack

 

Code access

  • For this contest, you are setting up the bot from scratch. Thus, there is no code to update.

  • We will share the API in the contest forum. Use the API to get the questions and to submit question answers

 

Individual requirements

  1. Setup Amazon Lex Bot (Major Requirement)

  • Create a Bot in Amazon Lex

  • The API shared contains the list of questions to ask the user. You will have to create a single Intent in the bot, and under this Intent, you will have to create multiple slots, one for each question.

  • Not all questions in the API will have equivalent slots in the Intent. List of questions to ignore will also be shared in the contest forum. You might also have to split a question into multiple questions for implementation in the bot

  • You need to specify exactly one prompt against each slot, which will match the text of the question passed by the API. You should not provide any corresponding utterances against the slots in the intent.

  • You are allowed to create your own slot types to be used for the slots. However, use existing ones wherever applicable. Priority should be to first use existing slots types before creating custom ones.

  • Let the sample utterance to trigger the intent be “I want to check my loan eligibility” and equivalent.

  • No Confirmation Prompt or Response expected. (this will be sent by the lambda function below)

  1. Setup Amazon Lambda function (Major Requirement)

  • Create a lambda function for initialization, validation and fulfillment of the Intent created in Requirement 1. You will have to update the Intent to specify this Lambda function.

  • The Lambda function will make the API call to retrieve the list of questions to ask the user. The list of questions contains a unique identifier named DataPointId. The lambda function is expected to have a mapping between the DataPointId and the name of the slot created in Requirement 1.

  • Using this mapping, each time the Lambda function is called, the function will determine the questions which the user has answered already, and proceeds to determine the next question to ask the user.

  • This mapping is essential since we will not be asking all questions returned by the API. These questions have dependencies (ex. Ask question D if answer to question A is ‘No’) and the lambda function will have to figure out which question to ask the user next, i.e. which slot to elicit next. Although the API also returns the text of the question to ask to the user, you will not be making use of it. This is because you might have to use a text that is suitable for conversation, instead of the text returned by the API, which is suitable for use in a user iterface.

  • The algorithm which the lambda function will use, in deciding which question needs to be asked next, will be shared in the contest forum.

  • Once a user has answered a question, you are expected to make another API call to submit the answer. You will submit the answer immediately and need not wait until the intent has been fulfilled.

 

UI Requirements

  • There are no UI requirements for this contest.

  • The next contest in this series will deal with integrating the UI with the Bot created in this contest.

 

Deployment guide and Validation Document

  • Provide a README file that contains details on how to deploy both the Amazon Lex bot and the Amazon Lambda function and connect the two.

  • No verification steps are expected.

  • Reviewers will verify that the API requests are made correctly, in addition to ensuring that the questions asked and the capture of answers. We will share details on how to make the API requests in the contest forum.

  • You are expected to provide instructions on how to add a new question to the list. That is, if our client updates their API where new questions are added, removed or modified, you need to describe how to update Amazon Lex / Lambda as well to keep the two in sync.

 

Important Notes

  • As of now, it doesn't matter which voice is selected for the Bot. You are free to choose one.

  • Each question is of a specific type. This ranges between a Yes or No question where the expected answer is either a Yes or No, a multi text question, for which you may have to set up multiple slots to capture multiple values for the same question, a radio type question, where the user has to explicitly chose among a set of options among others. Thus, it is important that you make use of the right slot type for each question.

  • You are allowed to split a single question into multiple questions. You however have to make a single api request to submit the answer for the original question. Basically, split it up but make sure you merge it later. You can only do this for the multi text type of question for which, there isn’t a slot type to capture it all ( example, address field. You can capture postal address, state but not all in a single type). You can also ask the questions in a manner that lets the user know how they need to answer. You can guide the user on the answer expected.

  • For all purposes, only USA is in scope. That is, USA is the only country to consider.

  • You are expected to perform validation of the answer, before submitting.

  • The API sends all questions at once. It is the Lambda function that decides which question to ask the user next.

  • Lambda function will have the mapping between the question sent by the API and the Slots in the Intent of the bot. This thus allows the lambda function to control the execution of the bot and decide the sequence of questions to ask.

  • Modularize your code. Follow the DRY principle. Each question follows the same structure and thus, you should be able to write functions that are generic in nature.



Final Submission Guidelines

  • Publish and Export the Amazon Lex bot

  • Share the code of the lambda function to create

  • Setup your README with instructions on how to deploy your app

  • Zip them all into a single file and upload to Topcoder

ELIGIBLE EVENTS:

2018 Topcoder(R) Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30068373