Inspiration:
Medical research is growing faster than ever. PubMed now contains more than 40 million biomedical citations, with over 1.6 million citations added in the year leading up to the National Library of Medicine’s 2024 briefing. For an HCP, the challenge is no longer simply finding information. It is finding the right information at the right time.
Imagine a physician who regularly sees patients with a specific condition. Before CATION, they may receive a generic medical message that has little relevance to their current needs. With CATION, their interests and interactions become signals, allowing relevant research to surface when it matters. Instead of another message being ignored, the interaction becomes a two-way feedback loop: the HCP gets research they actually care about, and the system learns what drives meaningful engagement.
Tagline: Cation, the positively charged intelligence layer for Impiricus ION, turns every doctor's tap into first-party engagement data, while giving each doctor research they actually want.
Tagline: Cation turns every doctor's tap into first-party engagement data for Impiricus ION, while giving each doctor research they actually want.
What it does
- Onboards a doctor in seconds: specialty, the conditions their patients face, and interests. This builds a personal topic profile.
- Delivers one useful read at a time from a curated, human-checked research library: peer-reviewed studies from NIH's PubMed and FDA-label-exact brand updates, across 2 specialties, 9 topics, and 32 cards ( for demo purposes) .
- Turns every tap into a signal: Yes → +1 and saved to the doctor's vault; Not interested → −1; a topic at −2 is muted. No topic appears more than twice in a row.
- Adapts in real time: after two Yes taps, AI (Gemini, with Groq as failover) picks a related topic, and its paper arrives next, marked "Related to what you liked."
- Gives Impiricus a live console: a 0–100 engagement score that rewards relevance, not volume; topic scores; a full event timeline.
- Stays compliant by design: a brand lane (label-exact Ozempic content, approved uses only) and a clinical lane (neutral research on the conditions a doctor treats). Off-label topics are blocked and routed to medical information, and a dermatologist never receives Ozempic content.
How we built it
- Spec first: a single blueprint as the source of truth, then 15+ checkpoints, each with a readiness evaluation, an approved plan, and a written test report before moving on.
- Backend (FastAPI): a code intelligence loop (onboarding, picker, compliance guard, scoring, auto-send), with 11 API endpoints that ION could read directly (
/profile,/events). AI with guardrails: code builds a safe list of candidate topics; Gemini chooses and explains; Groq takes over if Gemini fails; a plain-code fallback guarantees the flow never stalls.
Research pipeline: our fetch scripts query PubMed by NIH MeSH topic (randomized trials, systematic reviews, meta-analyses) and DailyMed for the Ozempic label. We hand-picked every study for on-label relevance into a curated library that the engine picks from in real time.
Built to refresh: the demo runs on a curated snapshot; in production, the same pipeline runs on a schedule (for example, nightly), pulling newly published studies into the library, where automatic compliance filters and review screen them before any doctor sees them.
Frontend (React + Vite): a doctor's phone brief and vault, and an Impiricus console with a doctor switcher.
Challenges we ran into
- No access to ION: we designed a clean integration surface so it plugs into the real thing without changing our logic.
- RCS wasn't feasible in 24 hours: carrier approval takes days, so we built a phone-style thread that keeps the RCS-ready card format.
- A hidden rate limit: Groq refused every request (it expected 1,306 output tokens against a 1,000-per-minute free-tier cap). We traced it, capped output at 100 tokens, and added a
rate_limitedlabel so failures are never silent. - Balancing brand and science: separating the brand lane from the clinical lane gave doctors real value while keeping sponsors compliant.
- Making tailoring feel natural: our first picker repeated topics; we rebuilt it around topic runs and AI-chosen switch points after testing it ourselves.
Accomplishments that we're proud of
- An end-to-end, working product: a doctor onboards, answers, and the next card arrives automatically, while Impiricus watches engagement update live.
- Two specialties, zero crossover: endocrinology and dermatology run on the same engine with completely different feeds.
- Compliance built into the engine: FDA-label word-for-word checks, off-label blocking, and excluded study types, not just a disclaimer.
- Resilient AI: three layers of failover (Gemini → Groq → plain code), plus caching.
- Rigor under pressure: every checkpoint shipped with passing tests and no regressions to earlier work.
What we learned
- The best engagement signal is the one doctors give willingly. A single tap, captured well, is richer than an open rate.
- AI earns trust when it chooses from options the code defines, and explains why.
- In pharma, compliance is a product feature, not a legal afterthought.
- Listening to the mentor changed the product: "first-party data" reframed Cation from a messaging tool into an intelligence layer for ION.
What's next for Cation
- Plug into the real ION: feed
/profileand/eventsinto Impiricus's next-best-action engine. - An always-current library: schedule the PubMed pipeline to add new studies as they're published, with automatic compliance screening, and let AI search the library on demand when a doctor's interests move into new territory.
- Any specialty: open onboarding to any condition, validated against NIH's MeSH vocabulary.
- Real RCS delivery and scheduling that respects each doctor's chosen frequency.
- Persistent storage and a brand-level dashboard, so pharma teams see engagement across every doctor.
The math (fully transparent)
1. Topic scores: what each doctor cares about
Every topic \(t\) starts at \(s_t = 1\) (from the doctor's conditions and interests), then updates with each reply:
$$ s_t \leftarrow s_t + \begin{cases} +1 & \text{Yes, more on this (card saved to vault)} \\ -1 & \text{Not interested} \\ -0.25 & \text{No reply} \end{cases} \qquad \text{muted when } s_t \le -2 $$
Why: ±1 is simple, explainable, and auditable: anyone can trace exactly why a card was sent. No reply counts a little, because silence is a weak signal, not a rejection.
2. Picking the next card: relevant, never repetitive
- Brand lane only: the FDA label update goes first
- Same topic at most 2 cards in a row
- Switch topics when: 2 cards in a row from one topic (run limit), 2 "Yes" answers in a row (yes streak → prefer a new related topic), or the topic runs out of cards
- At a switch: code builds safe candidates → AI picks one + a reason → code validates (Gemini → Groq, 3 s each → plain-code fallback: highest-scoring other topic)
- A new topic joins the doctor's profile at \(s_t = 1\)
Why: always sending the top topic creates a filter bubble. Runs of at most two keep depth without repetition, and a Yes streak is when a doctor is most open to something new, so that's when the AI expands her feed, choosing only among options the code has already verified.
3. Engagement score: quality, not volume
$$ E = \operatorname{clip}_{[0,\,100]}\Big(40R + 40Y + \min(5A,\ 20) - 10M\Big) $$
- \(R = \dfrac{\text{cards answered}}{\text{cards sent}}\) (reply rate: attention)
- \(Y = \dfrac{\text{Yes answers}}{\text{cards answered}}\) (yes rate: relevance)
- \(A\) = topics added through AI-suggested related topics (exploration, capped so it can't be gamed)
- \(M\) = topics muted (penalizes sending what doctors reject)
Why: sending more messages can't raise E; only relevant ones can.
- Dr. Patel (endocrinology): \(E = 40(1.0) + 40(0.9) + 10 - 0 = 86\)
- Dr. Evan (dermatology): \(E = 40(1.0) + 40(1.0) + 5 - 0 = 85\)
4. ION's next best action
- Before any reply: "General update for ‹specialty›" (specialty only)
- After replies: the top-scoring topic, \(\arg\max_t s_t\) ("‹topic› content, top score N from replies")
Why: it shows ION's targeting moving from a generic specialty guess to first-party evidence after just a few taps.
5. Compliance check
- A brand card is sent only if every claim exactly matches an FDA label sentence
- A suggested topic on the blocked list (e.g., weight management for Ozempic) is blocked and routed to medical information
Architecture
DOCTOR · phone brief IMPIRICUS · console
onboard · read · Yes/No · vault engagement · timeline · ION
│ ▲ ▲
taps │ │ next card (auto-sent) │ live metrics
▼ │ │
┌─────────────── CATION INTELLIGENCE LAYER · FastAPI ───────────────┐
│ │
│ Topic scores ──► Picker ──► Compliance guard ──► Deliver card │
│ (+1 / −1) │ (FDA-label exact, │
│ ▲ │ off-label blocked) │
│ │ ▼ │
│ Reply events AI topic choice at switch points │
│ Gemini ──► Groq ──► rule-based fallback │
│ (chooses only from code-validated topics) │
│ │
└──────────┬─────────────────────────────────────────┬──────────────┘
│ reads │ exposes
▼ ▼
RESEARCH LIBRARY ION-READY API
Brand lane · Clinical lane /profile · /events
PubMed (NIH MeSH; trials, reviews) first-party signals
DailyMed FDA labels per doctor, per tap
▲
Fetch pipeline + compliance review
Log in or sign up for Devpost to join the conversation.