Comparison of local large language models for extraction of signs and symptoms data from electronic health records

Publication date

2026-06-10

Authors

Spiero, Isa
Rijk, Merijn HORCID 0000-0003-4190-2126
Scheeres, Matthew A
Rutten, Frans HORCID 0000-0002-5052-7332ISNI 0000000389122794
Geersing, Geert-JanORCID 0000-0001-6976-9844
Platteel, Tamara N
Moons, Karel G MISNI 0000000390720943
Hooft, L.ISNI 0000000393460235
Damen, Johanna A A GORCID 0000-0001-7401-4593
Venekamp, Roderick PORCID 0000-0002-1446-9614ISNI 0000000393819260

Editors

Advisors

Supervisors

Document Type

Article

Collections

Open Access logo

License

cc_by

Abstract

Electronic health records (EHRs) provide a large source of data that can be used for research purposes. Extraction of information from unstructured clinical notes in EHRs can be automated by large language models (LLMs). Although LLMs are promising for this task, challenges remain in reliable application of LLMs to EHR, including the lack of development and validation for languages other than English. Here, we identified Dutch LLMs and compared their performance in a case study. We selected the MedRoBERTa.nl and RobBERT models based on local applicability, Dutch language compatibility, and model architecture. We evaluated their performance in a case study on the extraction of signs and symptoms from comprehensive Dutch primary care EHRs of patients with a lower respiratory tract infection. Using manually annotated clinical notes, models were trained as direct and prompt-based classifiers with varying amounts of training samples. Performance was expressed by precision, recall, and F1-score. The MedROBERTa.nl and RobBERT models showed good performance as direct classifiers, with a macro-averaged F1-score of 0.74 (range 0.56-0.87) and 0.69 (range 0.46-0.86) using 1600 training samples, respectively. The prompt-based classifiers performed worse with F1-scores of 0.08 (range 0.02-0.30) and 0.08 (range 0.02-0.22), respectively. In general, performance of the models was negatively affected by class imbalance and missingness of signs and symptoms. A minimum of 800 annotated training samples were required to obtain sufficient performance. The selected LLMs showed good performance as direct classifiers in extracting signs and symptoms from Dutch primary care EHRs. However, prompt-based models require performance improvement by further prompt engineering, and caution is warranted with imbalanced or partially missing EHR data.MedROBERTa.nl and RobBERT models, used as direct classifiers, can be considered for clinical research to extract information from clinical notes from Dutch primary care EHRs, potentially reducing manual annotation time and accelerating real-world research and evidence generation.

Keywords

Journal Article

Citation

Spiero, I, Rijk, M H, Scheeres, M A, Rutten, F H, Geersing, G-J, Platteel, T N, Moons, K G M, Hooft, L, Damen, J A A, Venekamp, R P & Leeuwenberg, A M 2026, 'Comparison of local large language models for extraction of signs and symptoms data from electronic health records', PLoS ONE, vol. 21, no. 6, e0350625. https://doi.org/10.1371/journal.pone.0350625