Researchnpj Digital Medicine · Aug 13, 2026

Developing a scalable pipeline for data extraction from clinical letters through resource-efficient prompt engineering

Ong AY, Nguyen Q, Barai I, Engelmann J, Antaki F, Sevgi M, et al
Digital Health & AIAdult
Read the full paper free at PubMed Central ↗

Abstract

Free-text clinical records represent an untapped wealth of data for secondary use, but realising their potential is limited by resource demands necessary for accurate information extraction at scale. We introduce a scalable, resource-efficient, and high-performance information extraction pipeline that leverages large language models (LLMs) to address these challenges. Our pipeline was developed and tested using real-world dual specialist-annotated ophthalmic clinical letters, and achieved strong performance with a proprietary model in development, yielding a maximum micro-averaged F1 score of 0.954 (95% CI 0.941-0.967) for diagnosis across nine conditions through iterative prompt refinement alone, also demonstrating strong generalisability (micro-F1 0.945-0.980) in temporal validation. This approach was extended to other models in the same family and 17 LLMs from seven open-weight LLM families. Beyond performance, we develop a multi-dimensional assessment for deployment in data extraction tasks, including an error taxonomy and Pareto frontier analyses to systematically map the operational trade-offs across different LLM configurations. A robust approach to operationalisation in real-world workflows at scale may help lay the foundation for next-generation data pipelines that accelerate scientific discovery and power continuous learning health systems.

DOI: 10.1038/s41746-026-03136-w · PubMed: 43099069

Cite this article

Ong AY, Nguyen Q, Barai I, et al. Developing a scalable pipeline for data extraction from clinical letters through resource-efficient prompt engineering. NPJ Digit Med. 2026;9(1). doi:10.1038/s41746-026-03136-w

RIS (EndNote, Zotero, Mendeley)BibTeX

Spotted a mistake? Suggest a correction

Top Digital Health & AI studies every Monday

The week’s key trials and guidelines, free to read, in one short email. No account; unsubscribe in one click.

Choose specialties and topics

More in Digital Health & AI

Review · Lancet Digit Health · Nov 27, 2026 · Digital Health & AI

Scoping review finds ambient digital scribe evaluations lack safety and equity reporting

Research · NPJ Digit Med · Nov 27, 2026 · Digital Health & AI

Safety and accuracy diverge across deployment conditions in clinical large language models

Systematic review n = 29 · J Med Internet Res · Nov 26, 2026 · All ages · Digital Health & AI, Psychiatry & Mental Health

AI chatbots often give generic support but struggle to assess suicide risk

Research · J Med Internet Res · Nov 26, 2026 · Digital Health & AI, Infectious Disease

Integrating Multidimensional Clinical Data to Develop a Visual Nomogram for Individualized Prediction of Postinfectious Bone Loss in Patients With Spinal Infection: Retrospective Cohort Study

Meta-analysis n = 2,485 · J Med Internet Res · Nov 26, 2026 · Digital Health & AI, Oncology

AI models showed higher sensitivity than radiologists for detecting lymph node metastasis in esophageal cancer