From tweets to trends: How LLMs are shaping public health intelligence from digital traces

Unlike traditional surveys or observational studies, which are limited in scale and time sensitivity, large language models provide continuous and scalable insight into public sentiment and behavior. The study highlights that these models can extract relevant behavioral data from massive text corpora without the need for extensive manual coding.


CO-EDP, VisionRICO-EDP, VisionRI | Updated: 24-07-2025 18:44 IST | Created: 24-07-2025 18:44 IST
From tweets to trends: How LLMs are shaping public health intelligence from digital traces
Representative Image. Credit: ChatGPT

Large language models (LLMs) are emerging as critical tools for interpreting human behavior at scale in the hyper-connected world. These AI systems are now being deployed to track real-time public health sentiment, behavioral intention, and even individual decision-making through what people share online. 

A recent study published in Frontiers in Artificial Intelligence, titled "From Digital Traces to Public Vaccination Behaviors: Leveraging Large Language Models for Big Data Classificationprovides a proof of concept for this potential. The research focuses on how LLMs can be used to monitor COVID-19 vaccination behaviors by classifying hundreds of thousands of social media posts from the height of the pandemic. The findings underscore the reliability of these models in translating unstructured public discourse into actionable public health insights.

Can AI accurately detect public vaccine behavior online?

The research team set out to test whether large language models (LLMs) could be used to detect patterns in vaccine-related behaviors and sentiments based on how people expressed themselves on social media platforms during the pandemic. They tested three model configurations, GPT-4o, GPT-4o-mini, and a fine-tuned version of GPT-4o-mini, against more than 375,000 posts related to COVID-19 vaccines collected between 2020 and 2021.

Each model was assessed for its ability to classify posts into three categories: personal vaccination behavior, intention to vaccinate, and information sharing. The results indicated that the fine-tuned GPT-4o-mini outperformed the other models in accuracy, precision, recall, and F1 score, making it the most effective at capturing nuanced digital expressions related to public health.

About 9.84% of analyzed posts revealed personal behaviors such as receiving a vaccine dose or describing side effects. Another 71.45% of posts were categorized as information-sharing content, often consisting of updates, articles, or announcements about COVID-19. The remaining portion dealt with user-reported intentions to get vaccinated.

Importantly, the AI-generated classifications were cross-validated with national vaccine uptake statistics. The correlation was strong, with a coefficient of 0.76, confirming that digital expressions closely mirrored actual public behavior. This finding confirms that LLMs are not only capable of extracting behavioral signals from social media but also useful for modeling large-scale public health trends.

What makes LLMs a viable tool for public health?

Unlike traditional surveys or observational studies, which are limited in scale and time sensitivity, large language models provide continuous and scalable insight into public sentiment and behavior. The study highlights that these models can extract relevant behavioral data from massive text corpora without the need for extensive manual coding.

The researchers emphasized that performance improved significantly when models were fine-tuned with domain-specific data. This supports the argument that generalized models like GPT-4o can be tailored for precise applications in health analytics, especially when dealing with sensitive, context-heavy subjects like vaccination discourse.

The implications for public health strategy are profound. If health authorities can use AI to detect early shifts in vaccine sentiment or behavioral intention in real time, they can respond with more agile and targeted interventions. This could include countering misinformation, optimizing message framing, or adjusting outreach campaigns based on emerging public concerns.

At the same time, the study acknowledged several methodological considerations. For one, AI models depend on the quality and representativeness of the training data. Moreover, public social media posts may not reflect the views of demographics that are less digitally active, which could bias conclusions if not properly accounted for.

Broader implications for AI in social behavior monitoring

Beyond COVID-19, the framework may set the groundwork for a broader application of AI in behavioral research. The ability to track societal actions through natural language data has implications for monitoring everything from flu shot uptake to mental health trends and chronic disease management behaviors.

The researchers caution that this power comes with ethical responsibilities. The deployment of AI to analyze public discourse must include strict safeguards around data privacy, consent, and algorithmic fairness. Transparency in model development and data handling will be key to maintaining public trust, especially as governments and health organizations increasingly turn to AI for decision support.

Furthermore, the study calls for interdisciplinary collaboration. Effective implementation of these tools will require not just technical innovation, but input from ethicists, social scientists, public health officials, and communication experts.

  • FIRST PUBLISHED IN:
  • Devdiscourse
Give Feedback