AI Converts Cancer Trial Criteria Into Executable Eligibility Rules
Cancer trial screening still leans on a labor-intensive ritual: a clinician reads dense protocol language, interprets each inclusion and exclusion clause, and then decides whether a patient belongs in a study. In a preprint from Stanford investigators, a new artificial intelligence pipeline attempted to turn that process into something faster and far more explicit. The system converted unstructured eligibility text from actively recruiting interventional trials into structured SQL code, then used those rules to match patient records against trial requirements without further model inference.
The work focused on advanced and metastatic breast cancer, colon cancer, and non-small cell lung cancer, three common disease settings where trial access can shape treatment choices and where eligibility language is often long, inconsistent, and difficult to compare across protocols. Investigators pulled actively recruiting US interventional treatment trials from ClinicalTrials.gov and built 24 synthetic patient vignettes with medical oncologists. Cancer characteristics and treatment history were included in the matching process, while laboratory values and comorbidities were left out.
The core idea is straightforward but operationally important: if eligibility language can be translated once into a structured query, then the same logic can be reused across many patients and many trials. In other words, the platform is not simply summarizing criteria; it is executing them.
746 Trials, 24 Synthetic Patients, and a Median Matching Time Under One Second
Of 833 candidate studies, 746 met inclusion criteria. Matching all 746 trials across a patient set took a median of 0.459 seconds per patient, excluding the time needed to prepare the patient data. For a workflow that traditionally depends on manual review, that speed matters because it changes the scale at which trial screening can be attempted.
The platform was not treated as a black box. Validation included physician editing of the generated eligibility code for 30 trials, followed by independent assessments from two physicians and consensus adjudication across ten trials. Against physician consensus, automated matching agreed on 230 of 240 patient-trial pairs, or 95.8%. Sensitivity reached 83.3%, while specificity was 100%.
One sentence captures the tension in the findings: the system was highly specific, but it still missed some eligible matches.
Those misses matter because a tool designed to broaden trial access can only do so if it reliably identifies the patients who qualify. The authors therefore position the platform as feasible rather than finished, with the missed cases serving as a reminder that logic extraction from trial text remains imperfect even when the downstream execution is fast.
Eligibility Counts Fell With Geographic Limits and Poorer Performance Status
Potential eligibility varied widely across the synthetic cohort. Without geographic restrictions, the number of potentially eligible trials ranged from 10 to 258 depending on the patient vignette. Eligibility counts fell when trial access was limited by geography, and they also declined as performance status worsened. By contrast, the number of matching studies remained relatively stable across ages 30 to 90.
Several trial features were associated with lower match counts. Later-phase trials, randomized studies, and molecularly selective protocols generally matched fewer vignettes. That pattern fits the structure of oncology research itself: the more selective the study design, the more likely it is to narrow the candidate pool before any physician ever reviews a chart.
The study also explored how changes in age, ECOG performance status, sex, and ZIP code altered the apparent trial pool. This part of the analysis is clinically familiar even if the method is new. Trial access is not determined only by diagnosis; it is also shaped by location, functional status, and the eligibility language embedded in each protocol.
What Rule-Based Matching Can and Cannot Catch
The platform deliberately avoided a few major sources of complexity. Laboratory results and comorbidities were excluded, which simplifies the logic but leaves out a large share of the eligibility burden in real oncology care. Many protocols hinge on organ function, prior toxicities, autoimmune disease, cardiovascular history, or other details that can be decisive at the bedside. A system built on structured criteria can only be as complete as the criteria it receives.
Even so, the design offers a practical advantage over more opaque machine-learning approaches. Once the trial language is translated into SQL, the matching step becomes rule-based and auditable. Clinicians can inspect why a patient was or was not matched, rather than relying on a probabilistic score with no clear rationale. For trial navigation teams and oncology practices, that kind of transparency may be as valuable as raw speed.
The study’s validation approach strengthens that argument. Physician editing of generated code, followed by independent review and consensus adjudication, suggests the pipeline can function as a collaborative tool rather than a replacement for human judgment. The 100% specificity observed in agreement with physician consensus is especially relevant in oncology screening, where false positives can waste time and erode trust. At the same time, the lower sensitivity shows that some eligible patients would still be missed unless the system is refined.
Trial Access Still Depends on the Fine Print
This preprint points toward a future in which trial eligibility can be screened at scale, but it does not yet solve the hardest parts of the problem. Criteria that depend on laboratory thresholds, nuanced exclusion language, borderline treatment histories, or ambiguous protocol wording remain outside the current test case. Synthetic vignettes are useful for development, yet they are not the same as real-world chart data, where details are incomplete, contradictory, or buried in narrative notes.
The investigators also stop short of claiming clinical deployment. The work is framed as a feasibility study, and the manuscript explicitly cautions that the missed matches require further validation. The practical question now is not whether AI can translate some trial criteria into executable logic. It can. The harder question is how far that logic can be pushed before real-world oncology screening starts to break from the complexity of actual patients and actual protocols.
For now, the preprint shows a fast and explicit method for quantifying cancer clinical trial eligibility across a large set of active studies. It also shows the boundary lines clearly: strong specificity, incomplete sensitivity, and a workflow that still needs broader testing before it can be trusted in routine recruitment decisions.