PIRATES

 Clara

Blood Donation Bot

Proposal for development of the ARC bot

ARC Clara Proposal Cover.jpg

The Skinny

 
Project-overview.png

Overview

This proposal outlines the scope of building the Clara blood donation bot that provides useful information to ARC users on blood donation.

This project focused on building only the backend of the bot .

 

This project will take 5-6 weeks to implement and cost $47,500 in fees. This includes a 25% discount for Red Cross.

Scope of project.png

Execution Plan

 
Execution.jpeg

AI Implementation

Building the AI system involves three parts -

  • Definition of intents

  • Creation of a taxonomy from the training data

  • Coding the actions based on filling the intents

 

The team will be staffed with a mix of data scientists and developers from Pirates’s network of startups. Two senior AI engineers and one full stack developer will work on the project and other resources will be pulled in as necessary to complete the project on time.

Team.png

Team

 Issues with Clara bot

Clara Problems Cover.jpg

AI/ML Problems

 

 Insufficient Training

Many questions such as “What happens to blood I donate ?” and “Can I donate blood if I'm over 65?” come back with a response saying “I'm sorry I don't have any information on the subject.”

Bad Language Model

Questions such as “How much time does it take to donate blood ?” ends up bringing back invalid information suggesting that a bad language model is being used.

Question Processing

Queries such as “Can I get any disease like AIDS or Hepatitis or any other disease by Blood donation ?” are replied with answers like “You cannot donate if you were ever diagnosed with HCV or HBV regardless of treatment or current status.”.This indicates that the questions aren’t being processed correctly

 

Interaction Issues

 

Invisible Flows

There are implemented flows in the conversation flow which aren’t accessible from the chat window. For eg. typing “Cancel Appointment” or “Restart” gives us access to new conversation flows for which button options are missing. We are hoping the user will guess these words and access these flows

Navigation

Many flows lead the user to a dead-end without an option to go back. There are also flows where there is a genuine need for a back or a cancel which is missing. For eg. “Schedule an appointment” --> "What kind of donation would you like to make?" --> "Not sure"

Multiple Responses

Some queries bring back multiple / duplicate responses from the server. For eg. Querying “Blood donation requirements” at any time

Unclear Interaction

Whenever a list of buttons is shown, free form text should be disabled and the user should have only way to interact with the bot. This leads to a lot of bugs where the bot gets confused about the context

Mishandling of Context

Bot is not able to keep a track of the right context during conversation. For eg. Moving on from donation to other topics is not tracked, not logging in on the login dialog makes the bot think the user is logged in

 

UI Problems

 

Load Time

Loading the bot initially and bot responses are generally slow. Initial bot load will take time given the current architecture of loading the bot from Orbita in an iFrame. But this can assuaged by loading a JS spinner till the iFrame loads. A reason contributing to responses being slow could be the voice data that is sent with every response.

CORS

The website is being served from redcrossblood.org while the bot is served from arcchat.orbita.cloud. To enable this, Orbita has had to turn off CORS which is not a recommended practice

Plain HTML

The bot UI seems to have been built using plain HTML, CSS and JS. This means we are re-inventing the wheel and building UI components from scratch, which other libraries have already built for us

Reusing components without re-setting

The list component for ex. Is being used to render a list of buttons. This list is not being cleared when it is re-used in another context, and hence the user sees options from a previous query. For ex. “Schedule an appointment” → “Blood” → “10001” → “No” → “Restart”

Data Validation

There is no validation on input data like zip codes, date format, year etc.

No option to enable / disable voice

f we load the bot directly from Orbita using the URL: https://arc-chat.orbita.cloud:8443/oeapi/bot/web we get an option to enable or disable voice and enabled by default. This is probably why voice data is being sent on every response. A similar option is missing on the Blood Donation bot.

 

 Bot Development

AI Bot dev cover.png

Language Model

Language model is the basic foundation on which any AL-ML bot interaction will be built. If we do not get a good language model no ML driven interaction will be good. Our first task will be to gather the training data used with Orbita and assess how good a language model can be built from it.

Move away from proprietary frameworks

See if anything can be salvaged from Orbita. We will need to understand what the root cause of each of these issue types are. It might be stemming from Orbita not being a good enough framework or Orbita not being used correctly. In any case there will be a lot to learn from previous mistakes, which will help us not repeat them again

It is best to move away from Orbita for 3 main reasons.

First, it is a proprietary framework with very little community support.

Second, it seems to offer very little flexibility with the UI and will keep up locked to a plain HTML UI.

Third, it seems to be solving a more generic problem of providing a chat platform for all of health care. They might be falling short for ARC’s use cases in trying to chase a more generic platform. It will be a lot easier if we limit our scope to just providing ARC the best possible experience

 

Build a new UI in React in the future

React provides us with a lot of reusable components and libraries which will eliminate a lot of UI coding and testing. These components and frameworks provide a slick and modern feel which current users are used to.

Since we are moving to React, it will be too cumbersome to serve it from the current ASP.net backend. Also we cannot have a part of the website in React and have the rest of the website in HTML. It would serve us best to keep the iFrame paradigm and serve the bot from a new node backend.

Incremental improvement of the Language Model

Our language model will evolve over time and at least initially there will be certain intents for which the model will work very well and certain others for which it wont work well. Moving to an ML model will be a staged approach where we will some intents running on a ML model and some intents running on fixed conversation flows

 Execution Plan

Project Plan Cover.jpg

We expect the implementation of the Clara bot backend to take 5-6 weeks.

 

Infrastructure Setup and Configuration - $3,500

Google Cloud Platform, NodeJS Project, DialogFlow

Existing Data assessment - $3,000

  • Figure out all calls made to Orbita backend

  • Analyze Applause data and available conversation flows

Data Model - $16,500

  • Generate Taxonomy

  • Refine Taxonomy

  • Design a Data Model

DialogFlow - $15,500

  • Add Intents

  • Add Entities

  • Train intents

  • Write code to take actions on filling intents

DB Integration - $2,500

  • DB Interfacing code

Analytics and Alerts - $2,000

  • Databot integration

  • Availability alerts

Testing and Delivery - $4,500