Your task is to build a chatbot for Facebook Messenger that will send messages to users and ask them to pick the result that they think most directly applies. For example:
• Bot: John says to Rebecca, "This is crazy I didn't expect such a reaction from them!" Do you think this is a) gender bias b) racial bias c) mental health stigma d) not biased
• User: mental health stigma
1. Retrieve a row of data from the database. It will be in the following format:
Message Bias code 1 Bias code 2 Bias code 3 Bias code 4
2. Send the message to the user along the following guidelines:
a. If there is only one bias code: "Do you think the following message demonstrates " + biasCodeName + message
b. If there are two or more bias codes: "Of the following choices, what best fits this message?" + message + "a) this is biasCode1, b) this is biasCode 2, … d) this is biasCode 4, e) none of the above"
3. Encode the user's response as a row of data and add it to the database.
Message Bias code 1 null null null
4. Repeat step 2 four times for each message
5. Repeat step 3 twice for each message
We will provide a sample database for you to work with, but you should write your code in such a way that we can hook it up to our full database in future.