Implementation for the AI driven bot that promotes a healthy lifestyle

Mohd Shamoon

FEBRUARY 16, 2022


Arogya World is a US-based global health non-profit organization working to prevent non-communicable diseases (NCDs), through health education and lifestyle change. The mission is reflected in their name – Arogya in Sanskrit means to live a life without disease.

They are  running a Diabetes awareness program with Glific, Head held High and University of Oregon teams. This program will run on WhatsApp and it will test how nudges can impact behaviours and help people in the prevention of Diabetes. It consists of a set of 58 messages about the various aspects of Diabetes, and 32 questions that checks the behaviours of the end-users. The messages will be sent over a period of 6 months. It is to be run with a cohort of 1600 end users wherein 800 users(control group) will receive only the 58 messages in a fixed order while the other 800 users(experiment group) will receive questions and messages in an order decided by an AI engine.

The details of the program are covered in this blog. Here I will be sharing the implementation details of the pilot program.

Time scaling:

We wanted to simulate the actual program and it should be as close to the real world program. For that we did the time scaling as below:

1 week = 1 day

1 day = 1 hour

So the 24 week program scaled down to 2 weeks.

Group structure

19 members took part in the pilot and the division was as follows:

Experiment group: Members of the Arogya team, University of Oregon and Head Held High teams.

Control group: Members of the Glific team.

Messages for control group

The control group messages were straightforward as to what messages need to be sent on what day. The Arogya team shared the messages that needed to be sent on each week and day we had set up triggers for sending messages based on a given day and time.

Messages for experiment group


Glific: Handles the execution phase- sends messages and questions to users on Whatsapp and give the responses back to the AI team

University of Oregon: Decides the messages that needs to be send on a weekly basis

Data sharing between teams:

Since the phone numbers are confidential and should not be used as a way to sync across teams, we used a phone number and ID mapping that can be used by both the parties to share the questions and responses.

Platform for sharing files:

Initially we discussed sharing the files using Google Drive but later on we switched it to a GCS bucket as Glific already has integration with GCS which made file sharing much simpler.

The file format decided was a csv file with the following name conventions

Messages and questions that were sent to each participant (by AI team) -> to_participants_week_{week number}.csv

Response given by users (compiled by the Glific team) ->
participant_responses_week_{week number}.csv

Time limit for sharing the files by teams.

The time for file uploads for the next week’s messages and questions was fixed.
The max time to upload the files by AI team was 7 am IST and for the Glific team to share responses by 8pm.

The time was decided so that the AI team gets enough time to run the algorithm for getting next week’s messages based on the previous week’s responses.

Program Start

First week
The messages were the same for the first week as the control group and it was all around general awareness around diabetes

Second week:
The university of Oregon send the list of messages and questions that needs to sent to individual user based on the baseline survey questionnaire, filled by the users before signing up for the program

After second week
Glific sent the responses back to the AI team which made the basis for the next week’s messages and questions by the AI engine moving forward.

Challenges faced:

– Glific had no built in feature to send messages on an hourly basis which was added to Glific while working on the project.

2 responses to “Implementation for the AI driven bot that promotes a healthy lifestyle”

  1. Glific says:

    […] Implementation for the AI driven bot that promotes a healthy lifestyle […]

  2. ColoredCow says:

    […] Implementation for the AI driven bot that promotes a healthy lifestyle […]

Leave a Reply

%d bloggers like this: