ReadingResearchRadarInvestment framework
Sign in / Sign up
← Back to reading
NewsMaterial3 min readDisconfirmAI Editorial

How Flatiron Health Scaled LLM Extraction from 100,000 to 2.5 Million Patients with Three to Five Engineers

A Databricks co-authored engineering account describes how Flatiron Health moved from deep learning batch pipelines with a 100,000-patient ceiling to monthly LLM extraction covering 2.5 million patients across four oncology cohorts, using ephemeral clusters and Ray on Databricks to make compute provisioning part of application code.

2026-12-03 01:00 GMT+8

In early 2025, Flatiron Health made a bet: its flagship Panoramic research datasets, which provide cancer-care histories down to the biomarker level, would be built on large language models rather than in-house deep learning. The team had experience running production workloads on Databricks, but LLMs were new. By February 2025, they were scoring a 1-million-patient breast cancer cohort each month. By 2026, LLM extraction covered nearly 2.5 million patients across four cancer types — Breast, Prostate, NSCLC, and Heme — within a broader 6 million-patient population. A team of three to five engineers made that shift happen.

The constraint before the shift was architectural, not algorithmic. From 2019 through 2022, Flatiron's unstructured data processing relied on in-house deep learning models running on large, relatively static batch pipelines on an ad hoc compute platform. Projects continued to reach a ceiling of around 100,000-patient cohorts. The existing batch architecture could not provide the workload isolation, elastic compute, and operational simplicity needed for substantially larger cohorts. Engineers could not scale without hand-optimizing every model on its way to production.

The mechanism that removed that ceiling was what the article calls compute as application code. By late 2023, the engineering team had transitioned from a shared compute model to cost-efficient, ephemeral clusters dedicated to individual jobs. Each pipeline defines and provisions its own compute in Python, via the Databricks SDK or Declarative Automation Bundles, without a separate Terraform change or an additional platform team in the loop. Engineers define the compute each pipeline needs in the same file as its application logic. For LLM workloads specifically, extracting a single variable can require generating up to one million large prompts, each averaging approximately 20,000 tokens, and an individual pipeline can run for days. With dozens of variables in flight, this only works if each pipeline provisions exactly the compute it needs and tears it down afterward.

Sign in / Sign up
ReadingResearchRadarInvestment framework

Ray on Databricks provided the distributed execution layer. The practical effect is that the artifact a data scientist builds while iterating on a few thousand charts is the artifact the team can evaluate against abstractor labels and then run across the full cohort. Getting there is a matter of pointing the same code at more compute, with no re-implementation. Optimization happens in Python at the bottleneck, and engineers can tune the actual hotspot without reshaping their code to fit an external framework's rules. The team also built an internal Ray-as-a-primitive interface that allows remote applications to dispatch to an ephemeral Databricks cluster via a decorator-based API, since a Databricks job is already a queue and an execution engine addressable through the SDK.

The operational consequence is a compressed timeline. Before migrating to Databricks, projects that required a certain level of scale might have been scoped to take months, or might never have been prioritized. Now it can take a sprint. In one case involving the processing and delivery of millions of biomarker documents to a vendor, one engineer scaled the pipeline within a sprint because the workflow was already built to target distributed compute. In another, an AI agent simplified a deterministic pipeline that measures how upstream LLM changes ripple through complex lines-of-therapy rules, collapsing 9 steps into 1.

The account is co-authored by Databricks, and all scale figures are self-reported. The 2.5 million figure represents disease-specific populations covered to date rather than the full 6 million-patient base. Quality is validated against expert clinical abstractors under Flatiron's published VALID framework, but the article does not provide accuracy numbers, failure rates, or latency benchmarks. The pattern assumes existing Databricks investment, a domain with expert ground-truth labels for validation, and a workload shape where batch extraction dominates. Teams without those conditions may find the architectural principle useful but the specific numbers non-transferable.

Sources

  • databricks.comDatabricks↗
Continue researching →