If you’re not human then who are you?

Experimenting with chatbots in Nigeria and Haiti

WFP/Lucia Casarin

Testing the bot in Haiti – WFP/Lucia Casarin

Readers of this blog know that the team has been experimenting with chatbots to communicate with disaster-affected communities – read our previous posts about our prototype and the Nielsen Hackathon.

As part of this effort, during recent missions to Haiti and Nigeria, our team went out to talk to communities to find out whether a chatbot would be right for them.

Would a chatbot be a stretch in these communities?

Well it’s not that much of a stretch.

In North East Nigeria, most displaced people live in Maiduguri, a city of over 1 million people. In this ‘urban’ setting connectivity is good, most people own cell phones and many young people use social media and messaging apps. Mobile operators have been offering services that allow people to access the internet by selling ‘social bundles’ (unlimited social media access sold in very small increments) and offer some services for free, including Facebook Light and Facebook Messenger.

In Haiti, three-quarters of the population live in the capital, Port-au-Prince, where 3G connectivity is good and most people use messaging apps to communicate with friends and family. Even in rural and difficult-to-reach communities, leaders and young people own smartphones and connect to the internet. There is a lot of competition between mobile operators so the prices for mobile data are very low. This means that most people can afford to access the internet either via their own smartphone or from shared smartphones.

A

Mobile phones charging station on the road from Léogane Peri to Port-au-Prince WFP/Lucia Casarin

A bare-bones demo

In both countries we tested a simple chatbot that asks people about food prices and what the food security is like in their community. The survey we used was much more basic than our usual mobile questionnaires as we felt it was important to keep things simple at this stage.

For Nigeria, the bot demo was initially in English but we soon translated it into Hausa, the primary language spoken by displaced persons in Maiduguri. In Haiti we made it available both in Creole and French. The chatbot was very responsive on 3G and it even worked with slower 2G connections so the technology works in these contexts. But this was only the starting point, what we really wanted to know was what ‘real’ people thought about the bot.

We organized focus group discussions with displaced people in Maiduguri and with community representatives in Haiti. We helped people access the WFP bot via their Facebook accounts, and they began chatting away.

Sounds cool, but what are the limitations?

Here’s what people said:

First of all, people thought the bot is a convenient, quick, and easy way to get in touch directly with WFP and they really liked that the bot allows them to speak to WFP without intermediaries. They had lot to tell us particularly through the open-ended question where they typed out detailed responses.

In Nigeria, they did tell us that our (somewhat wordy) English-language demo should be translated into Hausa because it would make it easier for everyone to use. Our first group of testers were young people who were already Facebook users and so were familiar with Messenger. It was therefore no surprise that they were interacting smoothly with the bot and able to go through our questionnaire in minutes.

WFP/Jean-Martin Bauer

Testing the bot in Nigeria – WFP/Jean-Martin Bauer

In Haiti, people started interacting with the bot as if it was a human rather than an automated questionnaire so they got stuck pretty fast when it wasn’t as naturally responsive as they’d expected. This means that either we give clearer instructions to people or we add Natural Language Processing capabilities to our bot.

There are of course other barriers. In both countries women appeared to be less likely to own a smartphone. This means that bot users will likely be overwhelmingly young, male and better educated than other people – hardly ‘representative’ of WFP’s target affected population. The free version of the bot is also not always available: in Nigeria only Airtel subscribers can access it, while in Haiti the free service doesn’t exist yet.

This means that the bot would need to be a complement to the other tools we have. We might use data from the bot to obtain a quick situation update, but we will continue relying on other sources for more representative data.

How many pizzas does it take to build a chatbot?

Hackers are hungry Photo: WFP/Pia Facultad

Hackers are hungry
Photo: WFP/Pia Facultad

This week, government, business, academia and civil society leaders will gather at Davos to discuss solutions to the world’s biggest challenges – including how new technologies can be leveraged to solve some of the most serious problems we face. At mVAM, we continue to explore how some of these technologies could be used to help eliminate chronic hunger, malnutrition and food insecurity – most recently looking at how chatbots could help collect important information during a humanitarian response.

Last week, our collaborators at Nielsen – one of the early supporters of mVAM – organized a 24-hour hackathon at the Nielsen Tech Hub in New York City. As part of ongoing efforts through Nielsen Cares, the hackathon aimed to develop an open-source humanitarian chatbot that can collect real-time information about food security. This came at the right time for WFP – we’d developed and tested a prototype of the chatbot with InSTEDD, and Nielsen’s technology and development input helped bring in important new capabilities. Ultimately, our goal is to field-test a chatbot in Haiti in the next few months to help us track food security conditions as people recover from the impacts of Hurricane Matthew.

The event was open to the public. A diverse group of students, volunteer hackers, and Nielsen staff showed up to take on the challenge, despite the wintry weather. InSTEDD’s Director of Platform Engineering, Nicolás di Tada also participated.

Much more than a chatbot

What the hackers built is much more that a chatbot: it is a bona-fide chat-based data collection and reporting system. Rather than attempt to outdo each other (as is the case in most hackathons), the teams split up to build the different components of the system. The different teams, made up of perfect strangers, communicated during the hackathon through Slack. After 24 hours, most components were fully coded up, but there were still bugs with the orchestrator and the gateway that additional post-hackathon work will resolve.

The architecture of the system, as defined by Nielsen, includes:

  • a management interface that allows an analyst to set up a questionnaire, including and skip logic, and validation rules that prompt the user when they enter a wrong answer. The interface was built using the Angular 2 JavaScript framework;
  • a gateway that is able to interact with respondents through Facebook Messenger and potentially other chat applications. The Facebook gateway was built on top of the AWS Lambda service;
  • a natural language processing engine that analyzes text on the fly. It allows the chatbot to ‘interpret’ a user’s answers. For now, the NLP engine processes English language text, although the engine includes a translation service and, by default, translates all languages to English for more advanced NLP tasks. The engine was built using the AWS Lambda service and leverages IBM Watson’s AlchemyLanguage service for text processing.;
  • a set of ‘backend APIs’ that manage respondent and survey data, route respondents from each response to the next question, and provide data to user interfaces .  The APIs were built using the Django framework for python and deploys on the AWS Elastic Beanstalk service;
  • an ‘orchestration layer’ that maintains survey status and routes messages between the end user and the various backend services. The orchestration service is built on top of the AWS Lambda service; and
  • a “reporting and data visualization engine”. Data vizzes were built using Highcharts, a JavaScript-based application. This allows an analyst to instantly see the results of the chatbot surveys.

 

chatbot

 

Leveraging cloud services from the Amazon Web Services product catalog, the teams were able to build a scalable, cost effective platform that can be deployed quickly to multiple locations globally.

Remember the humans

We also received tips from a chatbot specialist, Alec Lazarescu from Chatbots Magazine. He encouraged us to ‘onboard’ users with an initial message that gives people a clear idea of what the chatbot is for. He told us to avoid ‘dead ends’ and allow users to speak to a human being in case they get stuck.

We’re very grateful to Nielsen for their support and to all the participants for their energy and creativity. The next steps involve WFP and InSTEDD accessing the code and work on ironing out the kinks. We expect challenges with the natural language processing in Haitian Creole, a language that is probably under-researched. Making the different parts of the chatbot work together seamlessly also appears to be an area we will still have to work on.  And, of course, the final test will be to see whether our target group – people living in Haiti – find the chatbot engaging.

After the storm: using big data to track displacement in Haiti

Photo: Igor Rugwiza – UN/MINUSTAH


This week’s blog is a guest entry by Gabriela Alvarado, the WFP Regional IT Officer for Latin America and the Caribbean. In the aftermath of Hurricane Matthew, Gaby lead the IT Working Group in Haiti, which provided support to the humanitarian response through the provision of
ETC Connectivity Services. The team from the Regional Bureau worked with mVAM and Flowminder to supply valuable time-bound information to the operation.

 

Supporting Emergencies through Technology & Joint Efforts

It’s now been just over a month since Hurricane Matthew made landfall in Haiti, devastating the western side of the country. The hurricane has affected an estimated 2.1 million people, leaving 1.4 million in need of humanitarian assistance.

In the days following the hurricane, a rapid food security assessment was carried out to determine the impact of the hurricane on the food security of households and communities in the affected areas.  In the most-affected areas, the départements of Grande-Anse and Sud, people reported that crops and livestock, as well as agricultural and fishing equipment, were almost entirely destroyed.

 

Credit: WFP

Credit: WFP


We all know the challenges we face at WFP when looking to collect information, in order to determine what would be the best response under the circumstances on the ground.  In the aftermath of the hurricane, which had destroyed infrastructure, caused flooding, and temporarily knocked out telecommunications, gathering information from affected areas was especially difficult. So, WFP’s Information Technology team in the Regional Bureau for Latin America and the Caribbean reached out to Flowminder, a non-profit organization that uses big data analysis to answer questions that would be operationally relevant for government and aid agencies trying to respond to emergencies. Thanks to an existing agreement between WFP and Flowminder, WFP was able to quickly establish a working group and start data collection one day after the hurricane struck Haiti.

 

An aerial view of Jérémie following the passage of Hurricane Matthew (photo: Logan Abassi - UN/MINUSTAH)

An aerial view of Jérémie following the passage of Hurricane Matthew
(photo: Logan Abassi – UN/MINUSTAH)

Flowminder aggregates, integrates and analyses anonymous mobile operator data (call detail records), satellite and household survey data, which helps to estimate population displacements following a crisis. Displaced people are some of the most vulnerable following a hurricane, and knowing where people have gone helps to provide more effective assistance.

By 24 October 2016, Flowminder estimated that 260,500 people had been displaced within the Grande Anse, Sud, and Nippes départements. In Les Cayes, the major city in Sud, the population grew by an estimated 42% in the aftermath of Hurricane Matthew according to Flowminder analysis. In fact, Flowminder analyses suggest that many people moved toward cities, even Jérémie and Les Cayes, which were severely damaged by the hurricane.

 

Flowminder.org

Flowminder.org

So how exactly did Flowminder make these estimates with so many areas barely accessible? By analysing anonymized call detail records from Digicel, one of Haiti’s major cell phone network providers, and comparing where people placed calls before and after the hurricane, Flowminder was able provide an estimate of the number of displaced people. Flowminder uses algorithms that look at where the last “transaction” (phone call or sms) took place each day in order to identify the place where people were living before the hurricane and then subsequently moved afterwards. . It makes sense – the last few calls or texts you make at night are often from your home. While Flowminder does not get exact locations from the call data records, they can identify a general home location using the closest cell phone tower. After identifying the home location, Flowminder needs to determine how many people each phone represents. In poorer areas, not everyone may own a phone, or many people may not be able to charge and use their phones after a natural disaster like a hurricane. Flowminder uses formulas which takes these factors into account, and translates the number of phones into an estimate of the number of people who are displaced.

How will this further help?

With the information provided by Flowminder, WFP is able to estimate:

  • possible gaps in assistance in areas of the country which were not damaged by Hurricane Matthew, but which are experiencing an influx of people in need of food assistance following the hurricane;
  • use and community ‘acceptance’ of the use of mobile money (one aspect is the availability of the service, while the other aspect is if it is being used in that area);
  • the prevalence and spread of diseases (including Cholera, which continues to pose a risk in the aftermath of the hurricane).

It has been a very challenging yet incredible opportunity to see where and how technology can be used to further support an emergency response under difficult conditions and to ensure that WFP can reach the most vulnerable after a disaster.