About the Project
Inspiration
The inspiration for Trial-to-Threat Predictor came from a simple but critical insight: in the pharmaceutical industry, timing determines competitive success, yet most companies discover rival drugs far too late to respond strategically.
Public data on ClinicalTrials.gov often reveals competitive threats 18–24 months before market entry, but this data is vast, unstructured, and difficult to interpret without deep domain expertise. Existing approaches rely on manual tracking, periodic consultant reports, or static dashboards—methods that are fundamentally reactive rather than predictive.
We wanted to change that.
Our guiding question became: What if pharma teams could identify which trials truly matter—and what actions to take—the moment they are registered?
What We Learned
This project taught us how to bridge advanced AI with real-world decision-making:
- Translating business strategy problems into machine learning formulations
- Engineering meaningful features from structured, domain-heavy clinical data
- Training predictive models for probabilistic outcomes, such as a threat score
[ \text{Threat Score} \in [0,100] ] - Using LLMs as reasoning and strategy engines, not just text generators
- Designing offline-first systems for reliability in high-stakes demo environments
- Balancing innovation with feasibility under a strict 72-hour hackathon timeline
Most importantly, we learned that AI delivers real value only when it supports clear, actionable decisions.
How We Built the Project
Trial-to-Threat Predictor was designed as a three-layer intelligence system:
Data Ingestion Layer
An always-on agent monitors the ClinicalTrials.gov API, retrieves newly registered trials, normalizes metadata, and stores it locally in a SQLite database for offline access.Prediction Layer (Machine Learning)
We engineered 25 domain-specific features capturing sponsor track record, trial design quality, development phase, market size, differentiation, and timelines.Strategy Layer (LLM)
Using Llama 3.2 via Ollama, the system converts numerical predictions into prioritized strategic recommendations, each backed by clear rationale.
The backend was built with FastAPI, while the frontend uses React and Tailwind CSS to present insights through a clean, interactive dashboard. All components run locally, ensuring zero cloud dependency.
Challenges We Faced
No labeled real-world outcome data
→ Addressed by generating high-quality synthetic training data aligned with historical pharma trends.Preventing generic LLM outputs
→ Solved through structured prompt engineering and tight coupling with ML predictions.Maintaining fast inference for live demos
→ Optimized pipelines to keep predictions under 3 seconds.Ensuring offline reliability
→ Pre-cached datasets, pre-computed predictions, and removed all internet dependencies.Translating clinical data into business insights
→ Required continuous iteration between technical modeling and product strategy.
Outcome
The final result is a fully functional, offline-ready early warning system that delivers predictive competitive intelligence with clear strategic value. Trial-to-Threat Predictor demonstrates how AI can move pharma organizations from reactive monitoring to proactive, data-driven decision-making.
Built With
- axios
- clinicaltrials.gov-api
- fastapi
- fastapi-rest-apis
- javascript
- llama-3.2
- numpy
- ollama
- pandas
- pydantic
- python
- react-18
- react-query
- recharts
- scikit-learn
- sql
- sqlalchemy
- sqlite
- tailwind-css
- uvicorn
- vite
- xgboost
Log in or sign up for Devpost to join the conversation.