Proof of Concept / Reinforcement Learning
Multi-Armed Bandit for Specialty Oncology HCP Engagement
A contextual multi-armed bandit engine that learns the optimal touchpoint sequence for each HCP segment in specialty oncology. Thompson sampling adaptively allocates field force effort — face-to-face details, peer-to-peer programs, medical education, digital follow-up, and samples — by learning from each interaction's Rx lift signal. Built entirely in-browser with no backend dependencies.
Disclaimer: This is a proof-of-concept using synthetic HCP engagement data. All conversion rates, touchpoint costs, and segment profiles are illustrative. This tool is NOT intended to guide actual field force deployment or HCP engagement strategy.
Running detailing simulation...
Beta-Binomial conjugate model for each touchpoint arm per HCP segment. Each interaction samples from all arm posteriors and selects the highest draw — naturally balancing exploration (uncertain arms) with exploitation (proven arms). Seeded Mulberry32 PRNG ensures reproducibility.
Separate posterior maintained per HCP segment (Tier 1/2/3), enabling the algorithm to learn that the same touchpoint performs differently across segments. Face-to-face details excel with champions, digital follow-up outperforms with skeptics.
Cumulative regret tracks the gap between Thompson sampling's choices and the hindsight-optimal arm. Sub-linear regret growth (O(√T log T)) confirms the algorithm learns efficiently — the per-round regret decreases over time as posteriors sharpen.