case-studies

Mining chat messages with plant doctors using language models

Automated recognition of agricultural entities (such as crops, pests, diseases, and chemicals) in WhatsApp and Telegram messages among plant doctors enables new ways to surface emerging trends and improve science-based guidance for smallholder farmers

The organization

CABI's mission is to improve people’s lives worldwide by providing information and applying expertise to solve problems in agriculture and the environment. Plantwise is a global programme led by CABI that helps farmers lose less of what they grow to plant health problems by providing timely, appropriate, and actionable advice.

CABI has established a global plant clinic network, run by trained plant doctors, where farmers can find practical plant health advice. Farmers visit with samples of their crops, and plant doctors diagnose the problem and make science-based recommendations on ways to manage it. Plant doctors have access to the Plantwise Knowledge Bank, which includes diagnostic resources and best-practice pest management advice.

The challenge

Plant doctors use WhatsApp and Telegram chats to communicate. These messages contain valuable real-time information on plant health and crop issues. Yet without systematic, automated analysis, it is very difficult to identify places where farmers are receiving bad advice or to surface important patterns like emerging pests and trends in agricultural issues.

The approach

This project was focused on prototyping methods for entity extraction: the process of automatically identifying and digesting the agricultural units that users are discussing such as plants and pests.

Example hand labeled message containing a crop, pathogen, and many symptoms.


To accomplish this objective, the DrivenData team worked with CABI to:

  • Collect data sources into an entity knowledgebase
  • Create "gold labels" based on subject matter knowledge for evaluation
  • Develop a baseline pattern matching model
  • Train a statistical named entity recognition (NER) model
  • Visualize results in interactive dashboards
  • Hand off a reproducible pipeline

Two thousand chat messages were hand-labeled by the team to identify entities (crop, pest, chemical, pathogen, fungus, and symptom) to provide the corpus for evaluation.

The results

The prototyped NER model correctly identified 69% of entities in chat messages. In 93% of cases where entity text is correct, the label is too. The best performing categories were crops, fungus, and chemicals. A proof-of-concept comparison of automated extraction from chats with clinic records reflected the expected spike in fall armyworm mentions due to the outbreak in 2017.

Diagram of the named entity recognition (NER) pipeline.


This work demonstrates the ability to extract entities that can enable trend-level analysis from plant doctor messages and help guide interventions and early action.

Our real-world impact

All projects
Partners: EverFree

A production application to support survivors of human trafficking

Built the Freedom Lifemap platform, a digital tool designed to support survivors of human trafficking on their journey toward reintegration and independence

Partners: Max Planck Institute for Evolutionary Anthropology, Arcus Foundation, WILDLABS

Automating wildlife identification for research and conservation

Detected wildlife in images and videos—automatically and at scale—by building the winning algorithm from a DrivenData competition into an open source python package and a web application running models in the cloud.

Partners: Private sector, social sector

Building LLM solutions

Built solutions using LLMs for multiple real-world applications, across tasks including semantic search, summarization, named entity recognition, and multimodal analysis. Work has spanned research on state-of-the-art models tuned for specific use cases to production ready retrieval-augmented AI applications.

Partners: The World Bank, The Conflict and Environment Observatory

Identifying crop types using satellite imagery in Yemen

Used satellite imagery to identify crop extent, crop types and climate risks to agriculture in Yemen, informing World Bank development programs in the country after years of civil war.

Partners: IDEO.org

Illuminating mobile money experiences in Tanzania

Analyzed millions of mobile money records to uncover patterns in behavior, and then combined these insights with human-centered design to shape new approaches to delivering mobile money to low-income populations in Tanzania.

Partners: Insecurity Insight, Physicians for Human Rights

Tracking attacks on health care in Ukraine

Built a real-time, interactive map to visualize attacks on the Ukrainian health care system since the Russian invasion began in February of 2022. The map will support partner efforts to provide aid, hold aggressors accountable in court, and increase public awareness.

Partners: NASA

Monitoring water quality from satellite imagery

Created an open-source package to detect harmful algal blooms using machine learning and satellite imagery. Included running a machine-learning competition, conducting end user interviews, and engineering a robust, deployable pipeline.

Partners: Data science company foundation

Matching students with schools where they are likely to succeed

Used machine learning to match students with higher education programs where they are more likely to get in and graduate based on their unique profile, with a focus on backgrounds traditionally less likely to attend college or apply to more competitive programs.

Partners: Fair Trade USA

Mapping fair trade products from source to shelf

Visualized the flow of fair trade coffee products from the farms where they are grown to the stores where they are sold, connecting the nodes in supply chain transactions and increasing transparency for customers and auditors.

Partners: The World Bank, Angaza, GOGLA, Lighting Global

Developing performance indicators and repayment models in off-grid solar

Analyzed repayment behaviors across dozens of pay-as-you-go (PAYG) solar energy companies serving off-grid populations throughout Africa, and developed KPIs to facilitate standardized reporting for PAYG portfolios.

Partners: Haystack Informatics

Modeling patient pathways through hospitals

Mapped out the probabilistic patient journeys through hospitals based on tens of thousands of patient experiences, giving hospitals a better view into the timing of the activities in their departments and how they relate to operational efficiency.

Partners: Yelp, Harvard University, City of Boston

Predicting public health risks from restaurant reviews

Flagged public health risks at restaurants by combining Yelp reviews with open city data on past inspections. An algorithmic approach discovers 25% more violations with the same number of inspections.

Partners: Education Resource Strategies

Smart auto-tagging of K-12 school spending

Built algorithms that put apples-to-apples labels on school budget line items so that districts understand how their spending stacks up and where they can improve, saving months of manual processing each year.

Partners: Love Justice

Building data tools to fight human trafficking in Nepal

Aided anti-trafficking efforts at border crossings and airports by combining data across locations and surfacing insights that give interviewers greater intelligence about the right questions to ask and how to direct them.

Partners: GO2 Foundation for Lung Cancer

Putting AI into the hands of lung cancer clinicians

Translated advances in machine learning research to practical software for clinical settings, building an open source application through a new kind of data challenge.

Partners: Microsoft

Driving data education through custom competitions

Developed online, white-label data science competitions for students to synthesize their learnings and test their skills on applied challenges. Each capstone features a real-world dataset that focuses on an important issue in the social sector.

Work with us to build a better world

Learn more about how our team is bringing the transformative power of data science and AI to organizations tackling the world's biggest challenges.