How we helped a leading pharma company use LLMs to monitor adverse events on social media

Challenge: Improving model accuracy and compliance in AI-assisted pharmacovigilance
Pharmacovigilance, the monitoring of drug safety and adverse events (AE), is a critical, highly regulated responsibility for pharmaceutical companies. Our client was automatically scanning multiple data sources, including social media platforms like Twitter, to detect early mentions of AEs linked to medications.
Their existing monitoring system struggled to keep up with the complexity and scale of unstructured social media data. The model’s accuracy dropped when moving from training to production, and as a result, potential adverse events could be missed. The client needed a more robust, reliable approach to ensure regulatory compliance, patient safety, and trust in AI-assisted pharmacovigilance.
How we helped
We developed an ML pipeline to enhance the reliability of adverse event detection from social media text. The solution automatically monitors and adjusts for data distribution shifts between training and production, one of the main reasons why existing models underperformed. To make testing and validation accessible, we also designed a PoC application with a simple interface that allowed any stakeholder to send messages and observe the model’s predictions in real time. While the PoC was designed for broad internal testing, the production system was carefully tailored for a specialized team of patient safety experts, ensuring that the tool aligned with their medical expertise and workflow requirements.
The impact: Improving patient safety through faster adverse event detection
By transforming pharmacovigilance from a reactive compliance task into a real-time, patient-centric intelligence system, this solution helped our client detect risks earlier, prevent patient harm, and strengthen both regulatory confidence and public trust.
By combining technical precision with a deep understanding of the client’s regulatory context, we helped them stay ahead in their field while setting a foundation for long-term AI adoption.
- Enhanced the identification of adverse events from unstructured social media data.
- Provided more transparent, compliant, and explainable pharmacovigilance workflows.
- Faster and more accurate detection of potential risks improved patient safety monitoring.


