CohortFlow: A Steerable Clinical Cohort Curation Agent with Localized Semantic Correction
CohortFlow lets clinicians update cohort specifications locally, cutting correction time and model calls while keeping accuracy high.

Introduction
Clinical trial eligibility criteria often evolve, forcing researchers to reârun costly languageâmodel pipelines even when only a small part of the specification changes. CohortFlow addresses this pain point by treating naturalâlanguage edits as localized updates to a structured cohort graph. By tracking semantic dependencies, the system only recomputes the nodes that truly depend on a change, preserving prior results and dramatically speeding up the correction loop.
How Localized Semantic Steering Works
- Structured Cohort Specification â The original eligibility text is parsed into a graph of logical nodes (e.g., age limits, lab thresholds, diagnosis codes). Each node carries a clear semantic meaning.
- Persistent Execution Graph â As the model evaluates the specification, it records intermediate results alongside the graph structure. This creates a cache of alreadyâcomputed outcomes.
- NaturalâLanguage Corrections â When a user submits a correction (e.g., âincrease the upper age limit to 75â), CohortFlow translates the edit into a delta that updates only the relevant node.
- Dependency Invalidation â The system automatically flags downstream nodes that depend on the edited node, invalidating their cached results while leaving unrelated branches untouched.
- Selective Reâexecution â Only the invalidated portion of the graph is reârun, reducing the number of model calls and overall latency.
Performance Highlights
- Accuracy â On a benchmark of 100 clinicalâtrial scenarios (126 correction turns), CohortFlow achieved a microâF1 of 77.0âŻ%, essentially matching the 76.4âŻ% obtained by full regeneration.
- Latency Reduction â Mean correction latency dropped by 64.8âŻ% after the correction was completed and by 44.3âŻ% during execution.
- ModelâCall Savings â The approach required 38.1âŻ% fewer model invocations, translating into lower compute costs and faster turnaround for researchers.
- Robustness on Real Data â In a proofâofâconcept run over the MIMICâIV database, all 13 cohort states executed without error, and the system demonstrated selective preservation of unchanged computations.
Practical Implications for Clinical Researchers
- Iterative Design â Researchers can experiment with eligibility tweaks in real time, seeing the impact on cohort composition without waiting for a full pipeline rerun.
- Cost Efficiency â Fewer model calls mean lower cloudâcompute expenses, an important consideration for institutions with limited AI budgets.
- Transparency â Because each node and its dependencies are explicit, users gain insight into why a particular correction propagates, supporting auditability and regulatory compliance.
- Scalability â The graphâbased architecture scales to large, multiâcenter trial specifications, where only a handful of criteria may change between protocol amendments.
Closing Thoughts
CohortFlow illustrates that semantic awarenessâknowing which parts of a specification truly depend on each otherâcan turn a heavyweight, monolithic languageâmodel workflow into a nimble, steerable assistant. By preserving valid results and recomputing only whatâs necessary, the system delivers speed and cost benefits without sacrificing the high accuracy clinicians demand. As trial designs become more adaptive, tools like CohortFlow will be essential for keeping cohort curation both responsive and reliable.
Source
Read original sourceWhy we picked this
Introduces a steerable languageâmodel agent for clinical cohort curation, advancing AI applications in healthcare