Clinical LLM pipelines, on-device vitals, and biometric upsell engines across 5M+ users.
At Ultrahuman, I engineered backend and edge systems across a 5M+ user health platform: architecting a dynamic biometric cohort upsell engine for subscription Powerplugs, building asynchronous clinical LLM pipelines across 10+ lab stations with doctor-in-the-loop section diffing, porting vital computation to on-device Kotlin Multiplatform, and optimizing platform-wide CJK localization with prompt caching.
Ruby on Rails · PostgreSQL · Kotlin Multiplatform · AWS · LLM Orchestration · Prompt Caching
The context
Ultrahuman builds metabolic and longevity hardware (including the Ring AIR and Blood Vision) trusted by over 5M+ users worldwide. Within a 16-person core engineering team, I worked in a 3-person health reporting group owning the AI report-generation pipeline for performance lab clients, alongside contributing to on-device Kotlin Multiplatform vital computation, a separate platform-wide app and website localization system, and a dynamic upsell engine evaluating user biometric cohorts for subscription extensions (Powerplugs).
Dynamic Biometric Upsell Engine & Distributed Daily Batch Queues
Paid monthly subscription extensions (‘Powerplugs’ — cardio adaptability, deep health integrations) were previously recommended through static, one-size-fits-all in-app banners. Users received no contextual recommendations aligned with their dynamic physiological state (such as low sleep recovery or elevated resting heart rate). Concurrently, computing biomarker cohorts across millions of active platform users simultaneously risked severe database spikes and background queue starvation.
To solve this, I revamped the dynamic upsell engine to evaluate biometric cohorts nightly based on physiological thresholds (heart rate, sleep quality, recovery metrics). Rather than running heavy evaluations in unthrottled bursts, we distributed user evaluation jobs across daily background worker queues in throttled batches, completely eliminating load spikes on core database and API infrastructure.
Result: 8,000+ Powerplug subscription conversions within 60 days of deployment — replacing static broadcasts with targeted physiological recommendations without straining 5M+ user infrastructure.
- Biometric Condition Cohorting: Evaluated users nightly based on physiological thresholds (heart rate, sleep quality, recovery metrics) to recommend relevant Powerplugs.
- Distributed Batch Queuing: Spread evaluation jobs across daily worker queues, processing users in throttled batches to eliminate load spikes.
- High-Velocity Monetization: Drove 8,000+ Powerplug subscription conversions within two months of deployment.
Fragmented Asynchronous Diagnostics & Doctor-in-the-Loop Validation
Health assessments span 10–15 disparate testing stations (DEXA, VO₂ max, blood biomarkers, gut microbiome). Results arrive asynchronously via APIs, PDFs, or delayed lab feeds arriving days later. Autonomous LLMs cannot be treated as final medical authority without qualified clinician review and granular section-level regeneration.
Within the 3-person reporting group, I owned the end-to-end report generation pipeline. We built a dynamic DAG compilation that triggers as prerequisite stations arrive, reconciling disparate lab outputs into a unified biomarker schema. Once lab results stabilize, a multi-stage LLM workflow generates personalized recommendations grounded in clinical reference ranges.
Targeted Section Regeneration: Clinicians can annotate or reject specific blocks, triggering focused prompt regeneration that updates targeted paragraphs in <3 seconds while leaving verified sections of the 15-page report intact.
- Dynamic Ingestion DAG: Reconciles REST APIs and extracted lab PDFs across 10+ stations into a unified biomarker schema.
- Predefined Guidance Rules: Bound LLM reasoning to research-backed clinical rules and strict prompt constraints.
- Clinician-in-the-Loop Diffing: Surgical section-level regeneration prevents whole-document hallucination or repeated review cycles.
Cloud Batch Queue Latency & On-Device Vital Computation Port
Ruby backend batch processing through job queues caused delayed vital calculations for ring wearers, introducing multi-second delays and failing completely when wearers lacked internet access. Ring wearers woke up to delayed scores waiting for backend queue execution.
I contributed to shifting health computation from server background queues to on-device execution by porting vital signal processing and SpO₂ computation routines to Kotlin Multiplatform (KMP). This allowed raw sensor streams to be processed locally on iOS and Android.
- Ruby to KMP Migration: Rewrote computation pipelines in shared Kotlin Multiplatform running natively on device.
- Parity Test Suite: Built validation harness comparing server and device outputs against real ring wearer biometrics, proving 99%+ numerical parity.
- Latency Reduction: Pre-release benchmarks by engineering leads projected an ~80% latency reduction by eliminating backend batch queues.
Platform-Wide CJK Localization & Prompt Caching
Independent of health reporting, a separate standalone translation workflow powered user-facing localization across the entire Ultrahuman mobile applications and website. Standard LLM translation failed on Chinese, Japanese, and Korean (CJK) due to context nuances, terminology drift, and trademark transliteration.
To solve this, I engineered a dedicated localization pipeline injecting strict medical glossaries and brand preservation rules. By leveraging API prompt caching on repetitive system context blocks and request batching, we reduced translation token costs by ~67% while improving translation quality evaluation scores from 86% to 91%.
Quantified impact
Powerplug subscription conversions in 60 days via nightly biometric cohort evaluation and distributed batch queues.
Estimated vital latency reduction projected by engineering leads by porting SpO₂ routines to on-device Kotlin Multiplatform.
Numerical parity validated between historical server baselines and device-side KMP vital calculations on wearer telemetry.
CJK localization quality score lift with ~67% lower translation token costs via prompt caching and request batching.
Key engineering takeaways
AI systems need structured workflows, not just prompts: Production LLM applications are 90% ingestion, normalization, deterministic validation, and scoped regeneration rails. The model is merely one execution step in a resilient pipeline.
Human review as a core product primitive: In high-stakes health domains, total autonomy is an antipattern. Granular diffing and single-section regeneration give clinicians leverage without compromising medical accuracy.
Edge vs. cloud transforms the user experience: Migrating computation from background batch queues to on-device KMP transforms the experience from waiting for background jobs to instantaneous feedback.
Working through a clinical AI or distributed pipeline challenge? Let’s talk about it.