A study using the 2018 N2C2 Track 1 benchmark dataset found that MedGemma-27B with retrieval-augmented generation achieved a micro-F1 score of 91.2% and reduced latency per decision by 47% for clinical trial screening.
Screening patients for clinical trial enrollment is a labor-intensive bottleneck that leads to under-enrollment and trial failures, the study said. Breakthroughs in large language models offer a chance to improve screening with artificial intelligence, the researchers said.
Researchers systematically tested encoder- and decoder-based generative LLMs for screening clinical narratives to facilitate recruitment. They examined general-purpose and medical-adapted LLMs and explored three strategies to alleviate the “Lost in the Middle” issue when handling long documents.
The three strategies were: 1) Original long-context, using default context windows of LLMs; 2) NER-based extractive summarization, converting long documents into summaries using named entity recognition; and 3) RAG, dynamic evidence retrieval based on eligibility criteria.
The N2C2 2018 Track 1 benchmark dataset covered 288 diabetic patients with annotations for 13 real-world criteria related to cardiovascular and diabetes risk. Researchers examined encoder-based (BERT, GatorTron-2k) and decoder-based (Llama 3.1 8B, MedGemma-27B, GPT-OSS 20B) LLMs, with domain-specific adaptation for both types.
The paper, titled Improving Clinical Trial Recruitment using Clinical Narratives and Large Language Models, lists Ziyi Chen as submitting author alongside three other authors. The work was first submitted to arXiv on April 6, 2026 (v1), with a revised version released on April 28, 2026 (v2), each sized at 940 KB.
| Model | Strategy | Micro-F1 Score |
|---|---|---|
| MedGemma-27B | RAG | 0.8905 |
| BERT | Encoder | 0.7240 |
MedGemma with the RAG strategy achieved the best micro-F1 score of 89.05%, outperforming other models. MedGemma-27B-it with RAG reached an even higher micro-F1 score of 91.2%, as reported in the Nature publication.
NER-based extracts reduced input to a mean of 2,955 tokens, while RAG achieved a mean of 1,403 tokens, representing substantial compute savings.
“Lost in the Middle” describes models struggling to process information in the middle of long documents. Findings show generative LLMs markedly improve trial criteria needing long-term reasoning across long documents, whereas criteria spanning short context show only incremental gains.
Criteria derivable from structured or short-context data, such as CREATININE and MI-6MOS, show only incremental improvement from advanced context management. The NER-based summarization strategy, though effective at reducing sequence length, incurs notable information loss, especially for criteria with evidence diffused across notes.
For Llama 3.1 8B, NER filtering degraded micro-F1 from 0.8671 (long-context) to 0.8293, indicating simplistic entity-driven filtering is less reliable than targeted RAG.
Compared with using full notes, the RAG strategy reduces latency per decision by 47% and total GPU-hours by 61%, the study found. MedGemma-27B paired with RAG achieved the highest micro-F1 score of 0.8905 and AUROC of 0.8922, outperforming all encoder-based models and general-purpose decoders.
Real-world adoption of LLMs for trial recruitment must weigh specific criteria for selecting among rule-based queries, encoder-based LLMs, and generative LLMs to maximize efficiency within reasonable computing costs, the researchers concluded. The study further strengthens the theoretical framing of clinical trial recruitment as a test-bed for reliable, interpretable clinical NLP systems.
The findings were first submitted to arXiv on April 6, 2026, with a revised version released on April 28, 2026, before publication in Nature on December 5.