CivicTech in Action
GuarniBot: A chatbot for emergency assistance
22 de Septiembre de 2023
Read the Spanish version here
Authors: Junior Cabral, María Luz Enciso, Walter Idoyaga and Zuanny Ortíz.
We’re young students pursuing a degree in Computer Systems Analysis at the Catholic University "Nuestra Señora de la Asunción" in Guarambaré, a city located 20 km. from Asuncion. Fueled by curiosity, we participated in the Civic Technologies Hackathon organized by the Tavarandu Program in Encarnación. It was 53 hours of intense work with the goal of harnessing technology to address civic issues. As a result, we proposed the development of a chatbot to record community needs during emergencies, which would be reported and socialized through the Decidim platform, allowing all community members to collaborate. On that occasion, we were one of the winning teams of the competition and earned a paid internship at the UNDP Acceleration Lab.
One of our early insights was that civic technology in disaster management enhances collaboration between governments, aid organizations and the community at large, leading to a more efficient response and better preparedness for emergency situations. Furthermore, it empowers citizens by providing them with tools to report, participate, and make decisions during crises.
Why did we choose a chatbot? Because it is a software program designed to interact with users through the familiar interaction interface of a chat, whether on websites or messaging platforms, using plain language, making communication with users easier.
“I am very happy to be able to help my beloved city of Villeta a little bit.”Walter Idoyaga, member of the GuarniBot development team
The Challenge: Facilitating needs recording and centralization of information
During our internship, we set out to implement a technological solution that could assist in the rapid recording and assessment of damages and needs after a disaster. We chose Villeta, a near city, as our target location. There, we worked closely with their Municipal Council for Disaster Risk Management and Reduction. Disaster risk management seeks to prevent or minimize the negative impacts of natural disasters through prevention, preparedness, response, and recovery, with the aim of protecting people and resources.
The Council primarily focuses on the most vulnerable neighborhoods in the district, where each community has a coordinator responsible for recording risks, damages and needs, which are then forwarded to the Municipality, where the Management Council, responsible for coordinating the necessary assistance, can use the information to articulate response efforts. It's a collaborative effort involving the Municipality, other local institutions, the private sector, and citizens, so transparency in the process is crucial. The chatbot is designed so that, in the context of an emergency, territorial coordinators can assess needs and route them as quickly as possible.
"I always wanted to create something that helps people. Working with the team on this project was a very rewarding experience. It wasn't an easy challenge because we had to put ourselves in the shoes of the community and understand their needs and limitations."Malu Enciso, member of the GuarniBot development team
The technological assistant for needs recording
An important consideration for developing GuarniBot was the territory in which we implemented this tool. In vulnerable and resource-scarce areas, access to technology is very limited. Recognizing this situation, we designed a solution that could be adapted to anyone since, in most cases, all families have a mobile phone and know how to communicate via text messages.
GuarniBot gets its name from the city that served as the inspiration for this project, Villeta del Guarnipitán (*). Additionally, "Guarni" sounds like "Warning", in English.
For GuarniBot's development, we used TextIt, a hosting service for the open-source RapidPro platform. TextIt provides an intuitive interface and many options for creating a messaging system. With this tool, we created the message flow for GuarniBot's interaction with users. To store the data received by GuarniBot, we used AirTable, an online platform that simplifies the creation and management of databases. GuarniBot connects to AirTable through a callback function created from AirTable and embedded within the TextIt flow. This ensures that all messages sent are recorded. The implementation of the chatbot is straightforward, as it only requires installing Telegram in users’ phones. In this first prototype, the chatbot still works fully online, in order to upload datato AirTable and getting bot messages from TextIt, but this can be engineered to work with an offline mode in the future. Both AirTable and TextIt offer free account options for their use.
GuarniBot asks survey questions about needs, and the responses are registered in the database. This enables the Municipal Council to view all necessary data for preparing assistance and also assess the efficiency of their work. Centralizing this data will help determine the number of people at risk, pinpoint the primary needs precisely, identify the main risk areas, and facilitate report generation. All people can access GuarniBot's message flow on the GitHub repository.
Our experience creating a chatbot for the first time
After researching, we had an idea of how to develop a chatbot, but we still encountered several challenges. One of the initial challenges was the cost of using a chatbot, as our original idea was to develop it for WhatsApp, given its widespread use as a messaging application. It was through discussions with experts like Oscar Hernández from Codeando México that we found our path for developing GuarniBot. After several attempts to create a chatbot for WhatsApp, we opted for another application for our first fully funcitonal prototype, which is how we developed the chatbot on Telegram. Throughout this process, we felt well-supported by the UNDP Acceleration Lab team, mentors from Codeando México, and the Disaster Risk Management Council, who were always available to clarify any doubts or questions. It was an excellent experience for both our professional growth and our understanding of the reality faced by people living in risk-prone areas, allowing us to connect what we are learning in university with real-life challenges.
"Thanks to the Villeta community for welcoming us with open arms and allowing us to become a part of their realities. This experience has had a tremendous impact on my personal and professional growth. On a personal level, this experience has taught me to see life from a different perspective and to value what we have, who we are, and the generosity that resides within us. From a professional standpoint, we have demonstrated that technology, when used appropriately, can be an ally for the community well-being."Zuanny Ortíz, member of the GuarniBot development team
From the users’ test conducted with Municipal Council coordinators and volunteers, we learned what are the most important features to improve in the next iterations of this tool:
Although the chat includes all national emergency contacts, it is also important to include local contacts.
The ability to access or automatically connect to the location and contacts of the contacts should be included based on the location of the reports.
The chat should provide the possibility to update contacts of community leaders and coordinators, as these individuals may change.
After large-scale weather emergencies, internet service can sometimes take a while to be restored, which means the chat may not be usable. Therefore, a functionality should be developed to allow users to temporarily save responses and then synchronize the information with the central database once the phone accesses a network, which can be located at strategic places during the emergency response.
"Thanks to the students who dedicated their time to developing a bot for our beloved city. GuarniBot can be a significant asset during challenging times like emergencies, especially for assessing the situation and enhancing community assistance efforts. The key lies in training the Council members in using this tool effectively."María Inés Samaniego, Operations Coordinator at the Risk Management and Reduction Center of the Municipality of Villeta
GuarniBot also enables rapid and effective communication of early warnings about natural disasters or risk situations, helping people take preventive measures in a timely manner. The collected data can be analyzed, aiding authorities in making data-driven decisions with greater precision. It also promotes citizen participation by providing a real-time record of needs.
The chatbot we developed can be used in any city or town. It offers high adaptability and can be customized to meet the needs of any municipality interested in implementing it. We hope that our experience will assist Villeta in managing emergencies and promote the use of civic technology for risk prevention.
"Not only have we successfully developed the chat, but we have also experienced a deep connection with the Villeta community. Understanding their needs and working hand in hand with the people provided us with a unique perspective. Knowing that our tool will be of great assistance in challenging times is a satisfaction that goes beyond words. This experience has enriched us as individuals and as a team."Junior Cabral, member of the GuarniBot development team
On March 5, 1714, this city was founded under the name of "San Felipe de Borbón del Valle del Bastán en los Campos del Guarnipitán." The word "Guarnipitán" is the way the Spanish pronounced "Guaraní Pyta" or "Red Guaraní",' in reference to the Cario Guaraní people, whose skin is copper-colored.