<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.0 20040830//EN" "journalpublishing.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="2.0" xml:lang="en" article-type="research-article"><front><journal-meta><journal-id journal-id-type="nlm-ta">J Med Internet Res</journal-id><journal-id journal-id-type="publisher-id">jmir</journal-id><journal-id journal-id-type="index">1</journal-id><journal-title>Journal of Medical Internet Research</journal-title><abbrev-journal-title>J Med Internet Res</abbrev-journal-title><issn pub-type="epub">1438-8871</issn><publisher><publisher-name>JMIR Publications</publisher-name><publisher-loc>Toronto, Canada</publisher-loc></publisher></journal-meta><article-meta><article-id pub-id-type="publisher-id">v28i1e81708</article-id><article-id pub-id-type="doi">10.2196/81708</article-id><article-categories><subj-group subj-group-type="heading"><subject>Original Paper</subject></subj-group></article-categories><title-group><article-title>Labeling Clinical Notes With Large Language Models: Retrospective Benchmarking Study</article-title></title-group><contrib-group><contrib contrib-type="author"><name name-style="western"><surname>Mukherjee</surname><given-names>Pritam</given-names></name><degrees>PhD</degrees><xref ref-type="aff" rid="aff1">1</xref></contrib><contrib contrib-type="author"><name name-style="western"><surname>Nazmifar</surname><given-names>Michael</given-names></name><degrees>BA</degrees><xref ref-type="aff" rid="aff1">1</xref></contrib><contrib contrib-type="author"><name name-style="western"><surname>Batheja</surname><given-names>Vivek</given-names></name><degrees>MD</degrees><xref ref-type="aff" rid="aff1">1</xref></contrib><contrib contrib-type="author"><name name-style="western"><surname>Bigolin Lanfredi</surname><given-names>Ricardo</given-names></name><degrees>PhD</degrees><xref ref-type="aff" rid="aff1">1</xref></contrib><contrib contrib-type="author"><name name-style="western"><surname>Suri</surname><given-names>Abhinav</given-names></name><degrees>MPH</degrees><xref ref-type="aff" rid="aff1">1</xref></contrib><contrib contrib-type="author"><name name-style="western"><surname>Prasad</surname><given-names>Anisa</given-names></name><degrees>BA</degrees><xref ref-type="aff" rid="aff1">1</xref></contrib><contrib contrib-type="author"><name name-style="western"><surname>Tran</surname><given-names>Nicole</given-names></name><degrees>BS</degrees><xref ref-type="aff" rid="aff1">1</xref></contrib><contrib contrib-type="author"><name name-style="western"><surname>Lewis</surname><given-names>Sydney</given-names></name><degrees>MS</degrees><xref ref-type="aff" rid="aff1">1</xref></contrib><contrib contrib-type="author"><name name-style="western"><surname>Rabbee</surname><given-names>Nusrat</given-names></name><degrees>PhD</degrees><xref ref-type="aff" rid="aff2">2</xref></contrib><contrib contrib-type="author" corresp="yes"><name name-style="western"><surname>Summers</surname><given-names>Ronald M</given-names></name><degrees>MD, PhD</degrees><xref ref-type="aff" rid="aff1">1</xref></contrib></contrib-group><aff id="aff1"><institution>Imaging Biomarkers and Computer Aided Diagnosis Lab, Radiology and Imaging Sciences, National Institutes of Health Clinical Center</institution><addr-line>10 Center Dr, Building 10, Rm 1C224</addr-line><addr-line>Bethesda</addr-line><addr-line>MD</addr-line><country>United States</country></aff><aff id="aff2"><institution>Biostatistics and Clinical Epidemiology Service, National Institutes of Health Clinical Center</institution><addr-line>Bethesda</addr-line><addr-line>MD</addr-line><country>United States</country></aff><contrib-group><contrib contrib-type="editor"><name name-style="western"><surname>Coristine</surname><given-names>Andrew</given-names></name></contrib></contrib-group><contrib-group><contrib contrib-type="reviewer"><name name-style="western"><surname>Garc&#x00ED;a-Barrag&#x00E1;n</surname><given-names>&#x00C1;lvaro</given-names></name></contrib><contrib contrib-type="reviewer"><name name-style="western"><surname>Raut</surname><given-names>Ganesh</given-names></name></contrib><contrib contrib-type="reviewer"><name name-style="western"><surname>Patil</surname><given-names>Vikas</given-names></name></contrib></contrib-group><author-notes><corresp>Correspondence to Ronald M Summers, MD, PhD, Imaging Biomarkers and Computer Aided Diagnosis Lab, Radiology and Imaging Sciences, National Institutes of Health Clinical Center, 10 Center Dr, Building 10, Rm 1C224, Bethesda, MD, 20892, United States, 1 301-402-5486; <email>rms@nih.gov</email></corresp></author-notes><pub-date pub-type="collection"><year>2026</year></pub-date><pub-date pub-type="epub"><day>10</day><month>11</month><year>2026</year></pub-date><volume>28</volume><elocation-id>e81708</elocation-id><history><date date-type="received"><day>01</day><month>08</month><year>2025</year></date><date date-type="rev-recd"><day>17</day><month>09</month><year>2026</year></date><date date-type="accepted"><day>23</day><month>09</month><year>2026</year></date></history><copyright-statement>&#x00A9; Pritam Mukherjee, Michael Nazmifar, Vivek Batheja, Ricardo Bigolin Lanfredi, Abhinav Suri, Anisa Prasad, Nicole Tran, Sydney Lewis, Nusrat Rabbee, Ronald M Summers. Originally published in the Journal of Medical Internet Research (<ext-link ext-link-type="uri" xlink:href="https://www.jmir.org">https://www.jmir.org</ext-link>), 10.11.2026. </copyright-statement><copyright-year>2026</copyright-year><license license-type="open-access" xlink:href="https://creativecommons.org/licenses/by/4.0/"><p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (<ext-link ext-link-type="uri" xlink:href="https://creativecommons.org/licenses/by/4.0/">https://creativecommons.org/licenses/by/4.0/</ext-link>), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work, first published in the Journal of Medical Internet Research (ISSN 1438-8871), is properly cited. The complete bibliographic information, a link to the original publication on <ext-link ext-link-type="uri" xlink:href="https://www.jmir.org/">https://www.jmir.org/</ext-link>, as well as this copyright and license information must be included.</p></license><self-uri xlink:type="simple" xlink:href="https://www.jmir.org/2026/1/e81708"/><abstract><sec><title>Background</title><p>Clinical notes are rich sources of clinical information and are routinely used in clinical practice to infer past diagnoses and other comorbidities. Large language models (LLMs) may simplify the task by extracting this information from clinical notes.</p></sec><sec><title>Objective</title><p>The study aims to evaluate the performance of state-of-the-art LLMs on the task of labeling English clinical notes.</p></sec><sec sec-type="methods"><title>Methods</title><p>This institutional review board&#x2013;approved retrospective study comprised 380 clinical notes obtained from 2 institutions in the United States. The notes were manually labeled for the presence or absence of 29 conditions (simplified Elixhauser Comorbidity Index) by 2 human readers&#x2014;a radiology resident and a medical student under the supervision of a senior radiologist. Forty-six LLMs, including 4 closed-source commercial models from the GPT and Claude families, and 42 open-weights LLMs from the Llama (13 models) and the Qwen (29 models) families were used to label each note. The GPT-o3-mini-high reasoning model was used to parse the free-text model responses to binary yes/no answers. Using the manual labels as the reference standard, the recall, precision, and <italic>F</italic><sub>1</sub>-scores for the models were evaluated. The effect of factors such as the length of the notes and the family, size, and release recency of the LLMs was analyzed using generalized linear models.</p></sec><sec sec-type="results"><title>Results</title><p>The top-performing LLMs included the GPT and Claude models, and the larger open-weights models included Llama 3 70B, Llama 3.1 70B, Llama 3.1 405B, Llama 3.3 70B, Qwen 1.5 72B, Qwen 1.5 110B, Qwen 2 72B, and Qwen 2 VL 72B, which achieved <italic>F</italic><sub>1</sub>-scores above 70%. The most recent and higher-capacity releases of the LLMs have been improving mainly in their precision. The evaluation of 29 conditions showed a large variance in performance depending on the condition.</p></sec><sec sec-type="conclusions"><title>Conclusions</title><p>In this evaluation with 46 LLMs, larger open-weights LLMs such as the Llama 3.3 70B performed on par with or better than the GPT and Claude models, achieving <italic>F</italic><sub>1</sub>-scores above 70%. The performance of open-weights models improved significantly with model size and recency. These results suggest that locally run open-weights LLMs can be potentially used to label clinical notes.</p></sec></abstract><kwd-group><kwd>large language models</kwd><kwd>clinical notes</kwd><kwd>information extraction</kwd><kwd>benchmarking</kwd><kwd>health records</kwd></kwd-group></article-meta></front><body><sec id="s1" sec-type="intro"><title>Introduction</title><p>Clinical notes are a crucial part of patient care, containing relevant medical data not captured elsewhere in the structured data (eg, diagnosis codes, laboratory test data, etc) of electronic medical records. The unstructured clinical narrative often provides comprehensive documentation of patients&#x2019; medical histories, diagnoses, treatments, and other critical information. Despite their importance, these notes are often lengthy, disorganized, and challenging to navigate. As a result, reviewing and analyzing large quantities of clinical notes can be a time-consuming and error-prone task. Additionally, the transition from paper records to electronic health records has inadvertently increased the volume of these notes since templates and copy-paste functions have introduced redundant information and unnecessary data into clinical notes [<xref ref-type="bibr" rid="ref1">1</xref>,<xref ref-type="bibr" rid="ref2">2</xref>]. This information overload further complicates the identification of critical clinical data and can potentially result in unfavorable outcomes for both patients and physicians.</p><p>Naturally, there has been a longstanding interest in developing natural language processing (NLP) tools to extract information from free-text clinical notes [<xref ref-type="bibr" rid="ref3">3</xref>]. With the recent advent of large language models (LLMs), many studies have investigated the efficacy of using LLMs for this task [<xref ref-type="bibr" rid="ref4">4</xref>-<xref ref-type="bibr" rid="ref7">7</xref>]. In our paper, we analyze 46 LLMs, which is an order of magnitude more than prior studies, and evaluate their performance across a much broader range of abnormality types. This comprehensive analysis allows us to uncover trends related to model capacity and recency, revealing considerable variability in performance depending on the condition examined. Compared to older rule-based NLP techniques, deep-learning&#x2013;based LLMs perform better and provide more flexibility by allowing prompting in natural language rather than writing bespoke rules for each different information extraction task [<xref ref-type="bibr" rid="ref8">8</xref>-<xref ref-type="bibr" rid="ref11">11</xref>]. Besides information extraction, these LLMs can potentially be used for many other clinically relevant tasks such as clinical decision support, answering medical questions, and generating medical notes and reports [<xref ref-type="bibr" rid="ref12">12</xref>].</p><p>In this study, we focus on a prototypical information extraction task: the task of labeling clinical notes with the presence or absence of a set of clinical diagnoses. This task is useful in both clinical and research contexts. For example, in the clinical context, the presence or absence of comorbidities can, in part, aid in diagnosis, prognosis, and determining the appropriate course of treatment. While <italic>International Classification of Diseases, Ninth/Tenth Revision (ICD-</italic>9/<italic>ICD</italic>-10) codes in the structured electronic medical record can be potentially used for this purpose, it has been demonstrated that these codes, which are primarily for billing purposes, are often inconsistent across institutions [<xref ref-type="bibr" rid="ref13">13</xref>], are prone to mistakes and omissions, particularly for secondary diagnoses and comorbidities [<xref ref-type="bibr" rid="ref14">14</xref>], and may be unreliable in many contexts [<xref ref-type="bibr" rid="ref15">15</xref>]. Additionally, in inpatient settings, the free-text progress notes may be the primary source of diagnosis information, as the assignment of billing codes often lags the course of treatment. In a research context, identifying patients with or without certain diagnoses is a typical step for curating patient cohorts via inclusion/exclusion criteria for clinical studies.</p><p>From a practical perspective, this task provides several advantages: first, different diagnoses may have to be inferred from the notes in various ways (including the presence of certain medications or lab test results), leading to a diversity in the test set. Second, the binary outcomes from the task are highly amenable to statistical analyses. A related task is summarizing notes; however, evaluating the free-text summarization requires careful manual review, which does not scale when a large number of notes (380 in our case) and models (46 in our case) are evaluated.</p><p>Prior work on this task has adopted many strategies, including rule-based NLP techniques, as well as traditional machine learning and deep learning models [<xref ref-type="bibr" rid="ref16">16</xref>-<xref ref-type="bibr" rid="ref19">19</xref>]. The possibility of using LLMs to label clinical notes has also been explored, and both the potential for higher performance and pitfalls related to hallucinations and inconsistent performance have been highlighted [<xref ref-type="bibr" rid="ref20">20</xref>,<xref ref-type="bibr" rid="ref21">21</xref>]. Here, our aim is to benchmark the performance of both closed-source commercial models, including GPT and Claude models, and 2 popular open-weights model families Llama and Qwen [<xref ref-type="bibr" rid="ref22">22</xref>-<xref ref-type="bibr" rid="ref27">27</xref>]. An advantage of the open-weights LLMs is that they can be used locally in a privacy-preserving manner, which can be an important consideration in the medical context. Additionally, we explore performance differences across different model families, model sizes, and model recency and the effect of the length of the notes on the performance.</p></sec><sec id="s2" sec-type="methods"><title>Methods</title><sec id="s2-1"><title>Ethical Considerations</title><p>This was a retrospective study approved by the Institutional Review Board at the National Institutes of Health (NIH) Clinical Center (number 000037). Informed consent was waived. All patient notes used in this study were deidentified before use. Participants received no compensation because the study involved retrospective analysis of existing data without direct participant involvement.</p></sec><sec id="s2-2"><title>Data</title><p>In this retrospective study approved by the institutional review board, we used 2 datasets from 2 medical institutions, the NIH Clinical Center (center 1) in Bethesda, United States, and the Beth Israel Deaconess Medical Center (center 2) in Boston, United States. The first dataset (referred to as NIH, henceforth) comprised 180 history and physical examination notes corresponding to the first visits of 180 participants randomly chosen from patients who were admitted and underwent computed tomography scans at center 1 between 2000 and 2023. The second dataset (Medical Information Mart for Intensive Care [MIMIC]), a subset of the publicly available MIMIC-IV-Note dataset [<xref ref-type="bibr" rid="ref28">28</xref>,<xref ref-type="bibr" rid="ref29">29</xref>], consisted of 200 discharge notes corresponding to 200 participants randomly chosen from patients admitted to the hospital and emergency department at center 2. The notes were deidentified before use with the Stanford deidentifier tool and reviewed by authors MN and VB [<xref ref-type="bibr" rid="ref30">30</xref>].</p></sec><sec id="s2-3"><title>Reference Standard Labeling of Free-Text Notes</title><p>Each note was labeled for the presence or absence of 29 conditions, a simplified version of the 30 conditions covered by the Elixhauser Comorbidity Index (ECI) [<xref ref-type="bibr" rid="ref31">31</xref>]. The 2 comorbidities of &#x201C;diabetes, uncomplicated&#x201D; and &#x201C;diabetes, complicated&#x201D; in the ECI are merged to a single category called &#x201C;diabetes&#x201D; (the full list is available in <xref ref-type="table" rid="table1">Table 1</xref>). The ECI was used as a framework for selecting a broad and clinically diverse set of conditions that may be documented in admission and discharge notes and may be relevant targets for automated clinical information extraction. The annotation task was not intended to reproduce formal Elixhauser coding, calculate an ECI score, or assign billing codes. Rather, annotators determined whether each condition was present or absent in the narrative documentation. The NIH notes were manually labeled by a medical student (MN), while the MIMIC notes were labeled by a first-year radiology resident (VB), both under the supervision of a senior radiologist (RMS) with more than 30 years of experience. These binary &#x201C;yes/no&#x201D; manual labels were used as the reference standard in the subsequent analysis of performance of AI models.</p><table-wrap id="t1" position="float"><label>Table 1.</label><caption><p>Prevalence of the Elixhauser comorbidities in National Institutes of Health (NIH) and Medical Information Mart for Intensive Care (MIMIC) datasets (N=380).</p></caption><table id="table1" frame="hsides" rules="groups"><thead><tr><td align="left" valign="bottom">Elixhauser comorbidities</td><td align="left" valign="bottom">NIH (n=180), n (%)</td><td align="left" valign="bottom">MIMIC (n=200), n (%)</td></tr></thead><tbody><tr><td align="left" valign="top">AIDS/HIV infection</td><td align="left" valign="top">11 (6.1)</td><td align="left" valign="top">1 (0.5)</td></tr><tr><td align="left" valign="top">Alcohol abuse</td><td align="left" valign="top">7 (3.9)</td><td align="left" valign="top">18 (9.0)</td></tr><tr><td align="left" valign="top">Blood loss anemia</td><td align="left" valign="top">1 (0.6)</td><td align="left" valign="top">53 (26.5)</td></tr><tr><td align="left" valign="top">Cardiac arrhythmias</td><td align="left" valign="top">25 (13.9)</td><td align="left" valign="top">63 (31.5)</td></tr><tr><td align="left" valign="top">Chronic pulmonary disease</td><td align="left" valign="top">37 (20.6)</td><td align="left" valign="top">42 (21.0)</td></tr><tr><td align="left" valign="top">Coagulopathy</td><td align="left" valign="top">9 (5.0)</td><td align="left" valign="top">49 (24.5)</td></tr><tr><td align="left" valign="top">Congestive heart failure</td><td align="left" valign="top">4 (2.2)</td><td align="left" valign="top">29 (14.5)</td></tr><tr><td align="left" valign="top">Deficiency anemia</td><td align="left" valign="top">14 (7.8)</td><td align="left" valign="top">82 (41.0)</td></tr><tr><td align="left" valign="top">Depression</td><td align="left" valign="top">31 (17.2)</td><td align="left" valign="top">43 (21.5)</td></tr><tr><td align="left" valign="top">Diabetes</td><td align="left" valign="top">36 (20.0)</td><td align="left" valign="top">31 (15.5)</td></tr><tr><td align="left" valign="top">Drug abuse</td><td align="left" valign="top">1 (0.6)</td><td align="left" valign="top">8 (4.0)</td></tr><tr><td align="left" valign="top">Fluid and electrolyte disorders</td><td align="left" valign="top">35 (19.4)</td><td align="left" valign="top">85 (42.5)</td></tr><tr><td align="left" valign="top">Hypertension</td><td align="left" valign="top">83 (46.1)</td><td align="left" valign="top">109 (54.5)</td></tr><tr><td align="left" valign="top">Hypothyroidism</td><td align="left" valign="top">33 (18.3)</td><td align="left" valign="top">23 (11.5)</td></tr><tr><td align="left" valign="top">Liver disease</td><td align="left" valign="top">46 (25.6)</td><td align="left" valign="top">32 (16.0)</td></tr><tr><td align="left" valign="top">Lymphoma</td><td align="left" valign="top">14 (7.8)</td><td align="left" valign="top">3 (1.5)</td></tr><tr><td align="left" valign="top">Metastatic cancer</td><td align="left" valign="top">33 (18.3)</td><td align="left" valign="top">13 (6.5)</td></tr><tr><td align="left" valign="top">Obesity</td><td align="left" valign="top">19 (10.6)</td><td align="left" valign="top">15 (7.5)</td></tr><tr><td align="left" valign="top">Other neurologic disorders</td><td align="left" valign="top">50 (27.8)</td><td align="left" valign="top">118 (59.0)</td></tr><tr><td align="left" valign="top">Paralysis</td><td align="left" valign="top">2 (1.1)</td><td align="left" valign="top">21 (10.5)</td></tr><tr><td align="left" valign="top">Peptic ulcer disease (excluding bleeding)</td><td align="left" valign="top">8 (4.4)</td><td align="left" valign="top">47 (23.5)</td></tr><tr><td align="left" valign="top">Peripheral vascular disorders</td><td align="left" valign="top">13 (7.2)</td><td align="left" valign="top">10 (5.0)</td></tr><tr><td align="left" valign="top">Psychoses</td><td align="left" valign="top">0 (0)</td><td align="left" valign="top">19 (9.5)</td></tr><tr><td align="left" valign="top">Pulmonary circulation disorders</td><td align="left" valign="top">11 (6.1)</td><td align="left" valign="top">18 (9.0)</td></tr><tr><td align="left" valign="top">Renal failure</td><td align="left" valign="top">12 (6.7)</td><td align="left" valign="top">31 (15.5)</td></tr><tr><td align="left" valign="top">Rheumatoid arthritis/collagen vascular diseases</td><td align="left" valign="top">9 (5.0)</td><td align="left" valign="top">6 (3.0)</td></tr><tr><td align="left" valign="top">Solid tumor without metastasis</td><td align="left" valign="top">70 (38.9)</td><td align="left" valign="top">32 (16.0)</td></tr><tr><td align="left" valign="top">Valvular disease</td><td align="left" valign="top">6 (3.3)</td><td align="left" valign="top">13 (6.5)</td></tr><tr><td align="left" valign="top">Weight loss</td><td align="left" valign="top">23 (12.8)</td><td align="left" valign="top">9 (4.5)</td></tr></tbody></table></table-wrap></sec><sec id="s2-4"><title>AI Labeling of Notes</title><p>Both datasets were combined, and each note was labeled by each of 46 LLMs, including 4 closed-source models: GPT-4, GPT-4o, Claude 3.5 Sonnet (version 20240620), and Claude 3.5 Sonnet (version 20241022), 13 Llama models (spanning versions 2, 3, 3.1, 3.2, and 3.3), and 29 Qwen models (spanning versions 1, 1.5, 2, and 2.5). Table S1 in <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref> provides a full list of the models. Figure S1 in <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref> shows an overview of the prompting strategy. The same prompt structure (Figure S1 in <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref>), asking the model if the patient had a given comorbidity based on the note, was used for every model. An individual prompt was used for each diagnosis and each note; thus, each response corresponded to a unique instance of the tuple (model, note, and diagnosis). If the model refused to answer (due to false-positive content filters in the models) or answered with empty strings, these responses were considered missing and dropped in subsequent analysis. The outputs from the model were also free text, and though the prompt instructed the model to end its answer with yes or no, not all models adhered to the instruction. Therefore, the GPT-o3-mini-high reasoning model was used to analyze the model outputs and parse the answer to a binary yes/no. If the model refused to answer, these were also considered to be missing responses. The prompt used for this step is also reported in <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref>.</p></sec><sec id="s2-5"><title>Performance Measures and Statistical Analysis</title><p>The measures used to evaluate performance were recall, precision, and the <italic>F</italic><sub>1</sub>-score. The metrics and their CIs were evaluated for every model and both datasets. The 95% CIs for precision and recall were computed using the exact Clopper-Pearson method [<xref ref-type="bibr" rid="ref32">32</xref>]; for the <italic>F</italic><sub>1</sub>-score, 95% CIs were obtained via a nonparametric bootstrap with 2000 resamples of notes (not individual note-diagnosis pairs, to preserve within-note correlation across diagnoses), recalculating precision, recall, and <italic>F</italic><sub>1</sub>-score on each resampled dataset and taking the 2.5th and 97.5th percentiles of the resulting <italic>F</italic><sub>1</sub>-score distribution as the interval bounds.</p><p>Additionally, we trained generalized linear models (GLMs) with a binomial family and logit link to predict the recall and precision (separately) using the covariates: model family (Llama, Qwen, GPT, and Claude), log10(model_size) (used for open-weights models only), length of the note (number of words), and the model recency (number of days since the model was released). The full model coefficients are provided in Tables S2 to S5 in <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref>. The recall model was trained to predict the model response (true/false) on the subset of instances (model, note, and diagnosis), on which the reference standard label was true. Likewise, the precision model was trained to predict the reference standard label on the subset of instances for which the model prediction was true. For the <italic>F</italic><sub>1</sub>-score, 95% CIs were obtained using the same note-level bootstrap procedure described above, applied to the GLM-derived precision and recall estimates. This was done primarily to analyze the trends of performance for the open-weights models along 2 axes: length of time since the model was released and the model size. This also enabled statistically grounded comparisons of performance across LLM model families while accounting for variability in model size and generation. Additional GLMs (for precision and recall), which also incorporated the dataset and the comorbidities as predictive factors, were trained to explore differences across datasets and diagnoses; for each model family and diagnosis, estimated marginal means of recall and precision were obtained and combined into an <italic>F</italic><sub>1</sub>-score, with a 95% CI from the same note-level bootstrap procedure described above (Figure S2 and Tables S6 and S7 in <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref>). Mixed-effects models with random intercepts for the note and the diagnosis were trained to account for the repeated-measures structure (results and Tables S8 and S9 in <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref>). Because the open-weights models include both text-only and vision-language variants, we additionally tested architecture type (multimodal vs text-only) as a covariate in the recall and precision GLMs to assess whether it confounds the model-family, size, and recency effects. As a check on the fidelity of the quoted evidence supporting each model&#x2019;s response, we additionally verified whether the quoted text excerpts in each response were actually present in the corresponding note, using an automated string-matching procedure (Table S12 in <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref>). As a check on the reliability of the GPT-o3-mini-high parsing step, we additionally compared its binary judgments against 3 alternate judge models (GPT-4, GPT-4o, and Claude 3.5 Sonnet) and found high agreement (Table S13 in <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref>). The analysis was done using R (version 4.3.3; R Foundation for Statistical Computing) and used the emmeans (version 1.10.1; Comprehensive R Archive Network) and dplyr (version 1.1.4; Posit Software, PBC) packages.</p></sec><sec id="s2-6"><title>Experimental Setup</title><p>All open-weights models, except Llama 3.1 405B, were run on a high-performance computing cluster (Biowulf at the NIH) using the vLLM (version 0.7.3; PyTorch Foundation) package in Python (version 3.12.9; Python Software Foundation). The Llama 3.1 405B and Claude models were run using the Amazon Web Services Bedrock platform. The GPT models were run using the Azure OpenAI Service. The temperature hyperparameter was set to 0 while running the models. The max_tokens parameter, representing the maximum number of tokens to generate per output sequence, was set to 8192 to allow long model outputs.</p></sec></sec><sec id="s3" sec-type="results"><title>Results</title><sec id="s3-1"><title>Data</title><p>A total of 380 notes, 180 from the NIH and 200 from the MIMIC dataset, were used in this study. The median lengths of a note in the NIH and MIMIC datasets were 1043 (IQR 670-1543) and 1553 (IQR 1106-1948) words, respectively. The prevalence of each Elixhauser comorbidity in each dataset in the reference standard is reported in <xref ref-type="table" rid="table1">Table 1</xref>.</p></sec><sec id="s3-2"><title>Performance of AI Models on the Labeling Task</title><sec id="s3-2-1"><title>Overall Performance</title><p>Overall, 20,036 out of 506,920 (46 models, 29 diagnoses, and 380 notes), 20,204 (3.99%) responses were missing. Of these, 171 (0.85%) missing responses belonged to the 4 closed-source commercial models: GPT-4 accounted for 94 missing responses (87 responses across 3 long notes that exceeded context-length limits, plus 7 unparseable outputs), GPT-4o for 38, Claude 3.5 Sonnet v1 for 6, and Claude 3.5 Sonnet v2 for 33 missing responses.</p><p><xref ref-type="table" rid="table2">Table 2</xref> summarizes the precision, recall, and <italic>F</italic><sub>1</sub>-score (microaveraged over all comorbidities) for all the models. Among the top-performing models were the GPT and Claude models, and some of the larger open-weights models included Llama 3 70B, Llama 3.1 70B, Llama 3.1 405B, Llama 3.3 70B, Qwen 1.5 72B, Qwen 1.5 110B, Qwen 2 72B, and Qwen 2 VL 72B, which all achieve <italic>F</italic><sub>1</sub>-scores above 70%. The worst performing model was Qwen 2 0.5B, which had an <italic>F</italic><sub>1</sub>-score of 1.5% (95% CI 0.2-3.2). Macroaveraged <italic>F</italic><sub>1</sub>-scores are also provided in Table S11 in <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref>. Rankings by micro- and macroaveraged <italic>F</italic><sub>1</sub>-scores are highly correlated (Spearman &#x03C1;=0.97 across the 46 models).</p><table-wrap id="t2" position="float"><label>Table 2.</label><caption><p>Performance of the models in terms of (microaveraged over diagnoses) recall, precision, and <italic>F</italic><sub>1</sub>-scores.</p></caption><table id="table2" frame="hsides" rules="groups"><thead><tr><td align="left" valign="bottom">Model family</td><td align="left" valign="bottom">Model size (in billions)</td><td align="left" valign="bottom">Recall (95% CI)</td><td align="left" valign="bottom">Precision (95% CI)</td><td align="left" valign="bottom"><italic>F</italic><sub>1</sub>-score (95% CI)</td></tr></thead><tbody><tr><td align="left" valign="top" colspan="5">Claude models</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Claude 3.5 Sonnet v1</td><td align="left" valign="top">&#x2014;<sup><xref ref-type="table-fn" rid="table2fn1">a</xref></sup></td><td align="left" valign="top">66.7 (64.4-69.0)</td><td align="left" valign="top">78.8 (76.5-80.9)</td><td align="left" valign="top">72.2 (70.5-73.9)<sup><xref ref-type="table-fn" rid="table2fn2">b</xref></sup></td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Claude 3.5 Sonnet v2</td><td align="left" valign="top">&#x2014;</td><td align="left" valign="top">66.2 (63.9-68.5)</td><td align="left" valign="top">78.5 (76.3-80.6)</td><td align="left" valign="top">71.8 (70.0-73.6)<sup><xref ref-type="table-fn" rid="table2fn2">b</xref></sup></td></tr><tr><td align="left" valign="top" colspan="5">GPT models</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>GPT-4</td><td align="left" valign="top">&#x2014;</td><td align="left" valign="top">60.9 (58.5-63.3)</td><td align="left" valign="top">83.1 (80.8-85.2)</td><td align="left" valign="top">70.3 (68.4-72.2)<sup><xref ref-type="table-fn" rid="table2fn2">b</xref></sup></td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>GPT-4o</td><td align="left" valign="top">&#x2014;</td><td align="left" valign="top">64.4 (62.0-66.7)</td><td align="left" valign="top">78.5 (76.2-80.7)</td><td align="left" valign="top">70.7 (68.8-72.5)<sup><xref ref-type="table-fn" rid="table2fn2">b</xref></sup></td></tr><tr><td align="left" valign="top" colspan="5">Llama models</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Llama 2</td><td align="left" valign="top">7</td><td align="left" valign="top">91.0 (89.0-92.7)</td><td align="left" valign="top">16.8 (15.8-17.9)</td><td align="left" valign="top">28.4 (26.7-30.1)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Llama 2</td><td align="left" valign="top">13</td><td align="left" valign="top">51.9 (48.7-55.1)</td><td align="left" valign="top">40.4 (37.7-43.2)</td><td align="left" valign="top">45.4 (42.7-48.2)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Llama 2</td><td align="left" valign="top">70</td><td align="left" valign="top">67.0 (64.0-70.0)</td><td align="left" valign="top">45.7 (43.1-48.3)</td><td align="left" valign="top">54.3 (51.8-56.7)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Llama 3</td><td align="left" valign="top">8</td><td align="left" valign="top">83.8 (81.9-85.6)</td><td align="left" valign="top">34.6 (33.2-36.2)</td><td align="left" valign="top">49.0 (47.2-51.1)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Llama 3</td><td align="left" valign="top">70</td><td align="left" valign="top">67.4 (65.0-69.7)</td><td align="left" valign="top">74.6 (72.3-76.8)</td><td align="left" valign="top">70.8 (69.1-72.5)<sup><xref ref-type="table-fn" rid="table2fn2">b</xref></sup></td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Llama 3.1</td><td align="left" valign="top">8</td><td align="left" valign="top">75.9 (73.7-77.9)</td><td align="left" valign="top">54.4 (52.4-56.5)</td><td align="left" valign="top">63.4 (61.5-65.1)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Llama 3.1</td><td align="left" valign="top">70</td><td align="left" valign="top">78.5 (76.5-80.5)</td><td align="left" valign="top">65.1 (63.0-67.2)</td><td align="left" valign="top">71.2 (69.7-72.8)<sup><xref ref-type="table-fn" rid="table2fn2">b</xref></sup></td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Llama 3.1</td><td align="left" valign="top">405</td><td align="left" valign="top">75.8 (73.7-77.9)</td><td align="left" valign="top">67.6 (65.4-69.7)</td><td align="left" valign="top">71.5 (69.7-73.1)<sup><xref ref-type="table-fn" rid="table2fn2">b</xref></sup></td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Llama 3.2</td><td align="left" valign="top">1</td><td align="left" valign="top">89.5 (88.0-91.0)</td><td align="left" valign="top">20.1 (19.2-21.0)</td><td align="left" valign="top">32.8 (31.1-34.4)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Llama 3.2</td><td align="left" valign="top">3</td><td align="left" valign="top">71.0 (68.8-73.2)</td><td align="left" valign="top">42.5 (40.7-44.4)</td><td align="left" valign="top">53.2 (51.5-54.8)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Llama 3.2 VL<sup><xref ref-type="table-fn" rid="table2fn3">c</xref></sup></td><td align="left" valign="top">11</td><td align="left" valign="top">74.7 (72.6-76.8)</td><td align="left" valign="top">56.7 (54.6-58.8)</td><td align="left" valign="top">64.5 (62.6-66.2)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Llama 3.2 VL</td><td align="left" valign="top">90</td><td align="left" valign="top">73.4 (71.2-75.5)</td><td align="left" valign="top">66.3 (64.1-68.5)</td><td align="left" valign="top">69.7 (67.9-71.4)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Llama 3.3</td><td align="left" valign="top">70</td><td align="left" valign="top">75.6 (73.5-77.7)</td><td align="left" valign="top">69.7 (67.5-71.8)</td><td align="left" valign="top">72.5 (70.9-74.2)<sup><xref ref-type="table-fn" rid="table2fn2">b</xref></sup></td></tr><tr><td align="left" valign="top" colspan="5">Qwen models</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 1</td><td align="left" valign="top">1.8</td><td align="left" valign="top">89.1 (87.5-90.5)</td><td align="left" valign="top">17.1 (16.3-17.9)</td><td align="left" valign="top">28.7 (27.3-30.2)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 1</td><td align="left" valign="top">7</td><td align="left" valign="top">71.6 (69.4-73.8)</td><td align="left" valign="top">25.0 (23.8-26.3)</td><td align="left" valign="top">37.1 (35.3-38.8)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 1</td><td align="left" valign="top">14</td><td align="left" valign="top">53.0 (48.0-57.9)</td><td align="left" valign="top">65.7 (60.3-70.9)</td><td align="left" valign="top">58.7 (53.8-63.1)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 1</td><td align="left" valign="top">72</td><td align="left" valign="top">62.3 (59.9-64.7)</td><td align="left" valign="top">76.9 (74.5-79.1)</td><td align="left" valign="top">68.8 (66.9-70.6)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 1.5</td><td align="left" valign="top">0.5</td><td align="left" valign="top">100.0 (99.8-100.0)</td><td align="left" valign="top">15.1 (14.4-15.8)</td><td align="left" valign="top">26.3 (24.9-27.6)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 1.5</td><td align="left" valign="top">1.8</td><td align="left" valign="top">98.9 (98.3-99.4)</td><td align="left" valign="top">15.7 (15.0-16.4)</td><td align="left" valign="top">27.1 (25.7-28.4)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 1.5</td><td align="left" valign="top">4</td><td align="left" valign="top">52.8 (50.4-55.2)</td><td align="left" valign="top">31.8 (30.0-33.5)</td><td align="left" valign="top">39.7 (37.5-42.0)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 1.5</td><td align="left" valign="top">7</td><td align="left" valign="top">78.0 (76.0-80.0)</td><td align="left" valign="top">45.6 (43.7-47.4)</td><td align="left" valign="top">57.5 (55.5-59.5)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 1.5</td><td align="left" valign="top">14</td><td align="left" valign="top">75.2 (73.1-77.3)</td><td align="left" valign="top">60.1 (58.0-62.2)</td><td align="left" valign="top">66.8 (65.1-68.5)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 1.5</td><td align="left" valign="top">32</td><td align="left" valign="top">72.7 (70.5-74.8)</td><td align="left" valign="top">67.3 (65.1-69.5)</td><td align="left" valign="top">69.9 (68.1-71.6)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 1.5</td><td align="left" valign="top">72</td><td align="left" valign="top">69.0 (66.7-71.2)</td><td align="left" valign="top">75.4 (73.2-77.6)</td><td align="left" valign="top">72.1 (70.4-73.8)<sup><xref ref-type="table-fn" rid="table2fn2">b</xref></sup></td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 1.5</td><td align="left" valign="top">110</td><td align="left" valign="top">70.4 (68.1-72.6)</td><td align="left" valign="top">73.7 (71.5-75.9)</td><td align="left" valign="top">72.0 (70.3-73.7)<sup><xref ref-type="table-fn" rid="table2fn2">b</xref></sup></td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 2</td><td align="left" valign="top">0.5</td><td align="left" valign="top">0.8 (0.4-1.4)</td><td align="left" valign="top">17.8 (9.8-28.5)</td><td align="left" valign="top">1.5 (0.2-3.2)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 2</td><td align="left" valign="top">1.5</td><td align="left" valign="top">43.0 (40.6-45.4)</td><td align="left" valign="top">66.3 (63.4-69.1)</td><td align="left" valign="top">52.1 (49.6-54.6)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 2 VL</td><td align="left" valign="top">2</td><td align="left" valign="top">7.5 (6.3-8.9)</td><td align="left" valign="top">90.6 (84.4-94.9)</td><td align="left" valign="top">13.9 (11.5-16.5)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 2</td><td align="left" valign="top">7</td><td align="left" valign="top">77.0 (74.9-79.0)</td><td align="left" valign="top">57.4 (55.3-59.5)</td><td align="left" valign="top">65.8 (63.9-67.7)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 2 VL</td><td align="left" valign="top">7</td><td align="left" valign="top">55.3 (52.9-57.7)</td><td align="left" valign="top">79.5 (77.0-81.8)</td><td align="left" valign="top">65.2 (63.2-67.3)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 2</td><td align="left" valign="top">72</td><td align="left" valign="top">68.5 (66.2-70.7)</td><td align="left" valign="top">76.7 (74.5-78.9)</td><td align="left" valign="top">72.4 (70.6-74.0)<sup><xref ref-type="table-fn" rid="table2fn2">b</xref></sup></td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 2 VL</td><td align="left" valign="top">72</td><td align="left" valign="top">62.3 (59.9-64.6)</td><td align="left" valign="top">81.2 (78.9-83.3)</td><td align="left" valign="top">70.5 (68.7-72.3)<sup><xref ref-type="table-fn" rid="table2fn2">b</xref></sup></td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 2.5</td><td align="left" valign="top">0.5</td><td align="left" valign="top">74.3 (72.1-76.4)</td><td align="left" valign="top">21.6 (20.6-22.7)</td><td align="left" valign="top">33.5 (31.9-35.2)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 2.5</td><td align="left" valign="top">1.5</td><td align="left" valign="top">42.5 (40.1-44.9)</td><td align="left" valign="top">77.1 (74.3-79.8)</td><td align="left" valign="top">54.8 (52.3-57.3)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 2.5</td><td align="left" valign="top">3</td><td align="left" valign="top">50.7 (48.3-53.2)</td><td align="left" valign="top">64.4 (61.8-67.0)</td><td align="left" valign="top">56.8 (54.5-59.0)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 2.5 VL</td><td align="left" valign="top">3</td><td align="left" valign="top">75.0 (72.9-77.1)</td><td align="left" valign="top">29.0 (27.7-30.4)</td><td align="left" valign="top">41.9 (39.8-43.9)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 2.5</td><td align="left" valign="top">7</td><td align="left" valign="top">60.9 (58.5-63.3)</td><td align="left" valign="top">73.0 (70.6-75.3)</td><td align="left" valign="top">66.4 (64.5-68.3)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 2.5 VL</td><td align="left" valign="top">7</td><td align="left" valign="top">63.0 (60.6-65.3)</td><td align="left" valign="top">65.0 (62.6-67.3)</td><td align="left" valign="top">64.0 (62.0-65.9)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 2.5</td><td align="left" valign="top">14</td><td align="left" valign="top">56.8 (54.4-59.2)</td><td align="left" valign="top">80.9 (78.5-83.1)</td><td align="left" valign="top">66.8 (64.8-68.7)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 2.5</td><td align="left" valign="top">32</td><td align="left" valign="top">60.4 (58.0-62.7)</td><td align="left" valign="top">80.9 (78.6-83.0)</td><td align="left" valign="top">69.1 (67.2-71.0)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 2.5</td><td align="left" valign="top">72</td><td align="left" valign="top">58.4 (56.0-60.8)</td><td align="left" valign="top">80.9 (78.6-83.1)</td><td align="left" valign="top">67.9 (65.8-69.8)</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content>Qwen 2.5 VL</td><td align="left" valign="top">72</td><td align="left" valign="top">60.9 (58.5-63.3)</td><td align="left" valign="top">80.2 (77.9-82.4)</td><td align="left" valign="top">69.3 (67.4-71.0)</td></tr></tbody></table><table-wrap-foot><fn id="table2fn1"><p><sup>a</sup>Not available.</p></fn><fn id="table2fn2"><p><sup>b</sup>Denotes <italic>F</italic><sub>1</sub>-scores above 70%.</p></fn><fn id="table2fn3"><p><sup>c</sup>VL: vision language.</p></fn></table-wrap-foot></table-wrap></sec><sec id="s3-2-2"><title>Sensitivity Analysis for Missing Responses</title><p>Missing/unparseable responses were not evenly distributed across models: 4 open-weights models accounted for a disproportionate share of them&#x2014;Qwen 1 14B (65.0% missing), Llama 2 13B (31.0%), Llama 2 70B (30.8%), and Llama 2 7B (30.7%)&#x2014;while the remaining 42 models each had a missing rate below 2.8%. If missing responses are instead treated as mistakes rather than dropped (a false negative when the true label was positive, a false positive when it was negative), the performance of these 4 models drops substantially: <italic>F</italic><sub>1</sub>-score falls from 58.7% to 5.4% for Qwen 1 14B, from 45.4% to 17.9% for Llama 2 13B, from 54.3% to 22.5% for Llama 2 70B, and from 28.4% to 18.4% for Llama 2 7B. For the remaining 42 models, where the missing rate was at most 2.8%, the median observed drop in <italic>F</italic><sub>1</sub>-score was 0.6 (IQR 0.2&#x2010;0.9, max: 5.8) percentage points. This confirms that dropping missing responses has a negligible effect on the reported results overall, except for these 4 models with unusually high refusal/nonparse rates, whose performance should be interpreted with this caveat in mind.</p></sec></sec><sec id="s3-3"><title>Performance Modeling and Trends</title><sec id="s3-3-1"><title>Comparing Model Families</title><p><xref ref-type="fig" rid="figure1">Figure 1</xref> shows the average performance across model families for both closed-source and open-weights models. Among closed-source model families, Claude showed higher recall than GPT (estimated marginal means: 65.9 vs 63.3; <italic>P</italic>=.04) but similar mean precision (79.4% vs 80.0; <italic>P</italic>=.60), resulting in higher <italic>F</italic><sub>1</sub>-score (72.0 vs 70.6). These differences are unlikely to be clinically relevant. For the open-weights models, Llama had higher average recall (76.2 vs 62.6; <italic>P</italic>&#x003C;.001) but lower average precision (29.5 vs 42.3; <italic>P</italic>&#x003C;.001), resulting in a lower overall <italic>F</italic><sub>1</sub>-score (42.5 vs 50.5). The figure represents the estimated marginal means, which are adjusted for covariates such as model size and recency.</p><fig position="float" id="figure1"><label>Figure 1.</label><caption><p>Comparing performance across model families for (A) closed-source and (B) open-weights models.</p></caption><graphic alt-version="no" mimetype="image" position="float" xlink:type="simple" xlink:href="jmir_v28i1e81708_fig01.png"/></fig></sec><sec id="s3-3-2"><title>Effect of Model Size</title><p><xref ref-type="fig" rid="figure2">Figure 2</xref> shows the effect of model size on the performance of open-weights models. As is clear from the figure, recall shows a small but statistically significant increase (estimated coefficient of log10(model_size): 0.055; <italic>P</italic>&#x003C;.001) with increasing model size, but the precision (and consequently, <italic>F</italic><sub>1</sub>-score) shows a substantially larger upward trend with increasing model size (coefficient: 1.275; <italic>P</italic>&#x003C;.001).</p><fig position="float" id="figure2"><label>Figure 2.</label><caption><p>Performance of the open-weights models with model size, in terms of (A) recall, (B) precision, and (C) <italic>F</italic><sub>1</sub>-score. The regression line is obtained from generalized linear models for recall and precision, fit on response data using predictors including model family, duration since model release, note length in words, and the size of the model.</p></caption><graphic alt-version="no" mimetype="image" position="float" xlink:type="simple" xlink:href="jmir_v28i1e81708_fig02.png"/></fig></sec><sec id="s3-3-3"><title>Effect of Model Recency</title><p><xref ref-type="fig" rid="figure3">Figure 3</xref> shows the trend of model performance over time. As is clear from the figure, the closed-source models have little variation in <italic>F</italic><sub>1</sub>-scores with respect to the release recency of the model. On the other hand, for the open-weights models, strong trends are observed: the recall of the models has tended to decrease, while the precision of the models has gone up, resulting in an improvement of <italic>F</italic><sub>1</sub>-scores for the more recent models.</p><fig position="float" id="figure3"><label>Figure 3.</label><caption><p>Performance of the (A) closed-source and (B) open-weights model vs date of model response. Note that the regression line is obtained from generalized linear models for recall and precision, fit on response data using predictors including model family, duration since model release, note length and words, and the size of the model (for open-weights models only). For the closed-source models, the trend lines are fit across only 2 models per family (GPT-4/GPT-4o and Claude 3.5 Sonnet v1/v2) and should be interpreted as illustrative rather than a statistically robust trend.</p></caption><graphic alt-version="no" mimetype="image" position="float" xlink:type="simple" xlink:href="jmir_v28i1e81708_fig03.png"/></fig></sec><sec id="s3-3-4"><title>Effect of Note Length</title><p><xref ref-type="fig" rid="figure4">Figure 4</xref> shows the effect of note length on the performance of the models. The closed-source models show consistent performance irrespective of the length of the note. The open-weights models, on the other hand, show improved performance with increasing note length. This finding contradicts previous reports in the literature [<xref ref-type="bibr" rid="ref7">7</xref>] and underscores the need for further investigation. In this analysis, all variables except note_length were held constant in the GLMs in order to control for model factors such as size and recency.</p><fig position="float" id="figure4"><label>Figure 4.</label><caption><p>Performance of the (A) closed-source models and (B) open-weights models vs the length of the notes. For the closed-source models, the trend lines are fit across only 2 models per family (GPT-4/GPT-4o and Claude 3.5 Sonnet v1/v2) and should be interpreted as illustrative rather than a statistically robust trend.</p></caption><graphic alt-version="no" mimetype="image" position="float" xlink:type="simple" xlink:href="jmir_v28i1e81708_fig04.png"/></fig></sec><sec id="s3-3-5"><title>Effect of Model Architecture</title><p>Because the open-weights model set pools text-only and vision-language (multimodal) variants of the same architectures, we tested architecture type as an additional covariate in the open-weights recall and precision GLMs. Multimodal architecture was a significant negative predictor of both recall and precision (both <italic>P</italic>&#x003C;.001; Table S10 in <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref>), indicating that vision-language variants underperform their text-only counterparts of the same family, size, and release date on this text-only clinical extraction task. Including this covariate did not change the sign or significance of the model-family, size, or recency effects reported above, indicating those associations are not confounded by the mix of architectures among the open-weights models.</p></sec><sec id="s3-3-6"><title>Variation of Performance Across Different Comorbidities</title><p>Figure S2 in <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref> shows the average performance of the model families across different comorbidities. Among the open-weights models, performance was worst for drug abuse (estimated mean <italic>F</italic><sub>1</sub>-scores of 11.6%, 95% CI 4.8&#x2010;18.6 for Llama and 18.2%, 95% CI 7.9&#x2010;27.8 for Qwen); the closed-source models performed markedly better on this comorbidity (77.0%, 95% CI 51.8&#x2010;89.8 for Claude and 76.2%, 95% CI 51.1&#x2010;89.4 for GPT). The best performance across all 4 model families was obtained on hypertension, with estimated mean <italic>F</italic><sub>1</sub>-scores of 76.7% (95% CI 72.7&#x2010;80.3) for Llama and 80.0% (95% CI 77.2&#x2010;82.4) for Qwen and 93.3% (95% CI 90.8&#x2010;95.5) for Claude and 92.9% (95% CI 90.3&#x2010;95.1) for GPT. For AIDS/HIV infection, Claude and GPT achieved an <italic>F</italic><sub>1</sub>-score of 100% reflecting perfect agreement with the reference standard on all 12 positive cases for this comorbidity in our dataset.</p></sec></sec></sec><sec id="s4" sec-type="discussion"><title>Discussion</title><sec id="s4-1"><title>Principal Findings</title><p>In this study, we benchmarked the performance of 46 LLMs, including 4 closed-source commercial models (GPT-4, GPT-4o, Claude 3.5 Sonnet [version 20240620] and Claude 3.5 Sonnet [version 20241022]), and 42 open-weights LLMs from 2 popular model families, Llama and Qwen, spanning various model sizes and generations. Using GLMs, we also analyzed how the performance varied based on various factors such as the model size, family, and generation and the length of the notes. We found that in the labeling task, larger open-weights models such as the Llama 3.3 70B and the Qwen 2 72B performed at par or better than the commercial models in terms of <italic>F</italic><sub>1</sub>-scores. Controlling for model factors such as size and recency, the Qwen family had higher precision and <italic>F</italic><sub>1</sub>-scores than the Llama family of models. Model size primarily improved precision (recall showed much smaller improvement), leading to an overall increase in <italic>F</italic><sub>1</sub>-scores. Recent open-weights models have lower recall but significantly higher precision than older models, resulting in an improvement in <italic>F</italic><sub>1</sub>-scores. Perhaps surprisingly, longer notes seemed to improve the performance of open-weights models (the closed-source models had a relatively stable performance) in terms of both recall and precision.</p></sec><sec id="s4-2"><title>Comparison to Prior Work</title><p>The performance of LLMs on similar tasks has been explored in prior literature. For example, several papers have studied the task of note summarization and found that LLMs can perform on par with clinicians, with low hallucination and omission rates [<xref ref-type="bibr" rid="ref33">33</xref>,<xref ref-type="bibr" rid="ref34">34</xref>]. Other papers have tackled the task of labeling clinical notes; for example, Burford et al [<xref ref-type="bibr" rid="ref20">20</xref>] evaluated the performance of GPT-4 in identifying helmet status of patients injured in micromobility-related accidents from clinical notes, evaluating the extraction of presence of a single condition. Wu et al [<xref ref-type="bibr" rid="ref7">7</xref>] extracted a variety of conditions from clinical notes but did not report performance for individual conditions, likely due to the rarity of the target diseases. McInerney et al [<xref ref-type="bibr" rid="ref6">6</xref>] extracted 10 common conditions but relied on a single, now-outdated LLM, achieving an average <italic>F</italic><sub>1</sub>-score of approximately 0.42. Other papers have focused on labeling other forms of clinical text such as radiology or pathology reports [<xref ref-type="bibr" rid="ref4">4</xref>,<xref ref-type="bibr" rid="ref35">35</xref>]; however, clinical notes considered in this study are usually longer and pose greater challenges than radiology and pathology reports. Most existing papers focus on single LLMs or single conditions, unlike this current study that uses a multi-institutional set of notes, a diverse set of comorbidities to be labeled, and evaluates 46 models, including 2 families of closed-source commercial LLMs (GPT and Claude) and 2 families of open-weights LLMs (Llama and Qwen). Additionally, we modeled the performance of these LLMs using factors such as model family, size, and recency to provide insight into how these factors affect performance.</p><p>While it is somewhat dogmatic to assume that newer and larger model sizes will necessarily be better at every task, it may not always be the case. For example, Zhou et al [<xref ref-type="bibr" rid="ref36">36</xref>] found that larger and more instructable models may become less reliable. Our results show the general trend of improving performance with increasing model size holds for the note-labeling task. However, outliers exist, and, in some cases, the general trend may not be true; for example, the recall of Llama 3.1 405B is less than that of the Llama 3 8B model (75.8, 95% CI 73.7-77.9 vs 83.8, 95% CI 81.9-85.6). When considering model recency, we found that the recall shows a decreasing trend&#x2014;recent models have lower recall than older models (though this was accompanied by an improvement in precision and an improvement in the overall <italic>F</italic><sub>1</sub>-score). Notably, within the Qwen family, Qwen 2.5 72B showed lower recall than Qwen 2 72B (58.4% vs 68.5%), offset by higher precision (80.9% vs 76.7%), reducing the overall <italic>F</italic><sub>1</sub>-score (67.9% vs 72.4%) in the newer generation model.</p><p>One of the surprising findings in the study was that the open-weights LLMs tended to perform better (both precision and recall) on longer notes when controlling for model factors such as family, size, and recency. The effect did not go away when controlling for the dataset (Tables S6 and S7 in <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref>), and in fact, the dataset was not a significant factor when modeling precision for the open-weights models. This may perhaps be due to more redundancy or more explicit presentation of information in longer notes.</p><p>In this study, we chose to combine the datasets from 2 different institutions (n=180 and n=200) to create a single large cohort (n=380) on which all the models were tested. This increased the diversity of the notes, both note type and institution (history and physical notes from the NIH and discharge notes from the MIMIC datasets), as well as the size of the cohort, giving us more robust estimates of real-world performance and trends. We also did not use the dataset or note type as factors in the GLMs. This simplicity allowed us to focus on the model factors such as family, size, and recency and analyze how those influence performance. Additionally, an alternative formulation of the GLMs with dataset (consequently the note type, as well) for the open-weights models shows that the coefficients (and trends) of the fitted models are very similar, particularly for the model-related factors (note length was significantly associated with the dataset; Tables S6 and S7 in <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref>). This also highlights the robustness of the GLM-based analysis method used here, a conclusion further supported by a mixed-effects model sensitivity analysis accounting for repeated measures within notes and diagnoses (Tables S8 and S9 in <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref>).</p></sec><sec id="s4-3"><title>Limitations</title><p>Our study has several limitations. First, the reference standard was established by a medical student and a first-year radiology resident under the supervision of a senior radiologist, rather than by internal medicine physicians or certified medical coders. Although the annotation task involved simplified binary identification of clinical conditions in narrative notes rather than formal Elixhauser coding or billing-code assignment, some conditions may have required greater specialty-specific or coding expertise. In addition, the annotations were completed in sequential phases without a double-labeled subset, precluding formal assessment of interrater reliability. The senior radiologist provided guidance and spot-checked the annotations, but this quality-control process does not substitute for specialist adjudication or quantitative measurement of agreement. Consequently, some degree of reference-standard misclassification cannot be excluded. Second, the GLMs used to model trends in model family, size, and recency (<xref ref-type="fig" rid="figure2">Figures 2</xref> and <xref ref-type="fig" rid="figure3">3</xref>) exclude comorbidity as a predictor, in favor of the interpretability of those specific coefficients. A separate analysis incorporating comorbidity (Figure S2 in <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref>) confirmed substantial variation in performance across conditions, underscoring the importance of evaluating LLMs on the specific clinical use case before deployment. Third, since the MIMIC-IV-Note dataset is publicly available, it may have been included, in part or whole, in the training corpora of at least some of the LLMs we evaluated, and this may have affected the reported performance. However, including the dataset as an additional covariate in the GLMs for precision and recall did not alter the coefficients of model family, model size, and model recency (note length showed more modest shifts), suggesting that the principal associations identified in our analyses were robust to adjustment for systematic differences between the public MIMIC-IV-Note dataset and the nonpublic institutional dataset. Fourth, we used a fixed prompt for all our models and did not evaluate the variability of results to variation in the prompts. Additionally, the prompt did not explicitly instruct models to distinguish between comorbidities active at the time of admission and those noted only as part of the patient&#x2019;s past history, and models may not have reliably made this distinction on their own. Fifth, our automated parsing of free-text responses into binary judgments, while shown to have high agreement across independent judge models (Table S13 in <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref>), was not manually verified at scale and cannot rule out an error shared by all LLM judges&#x2014;for example, a note phrasing that misleads every judge model in the same way. Finally, we dropped missing/unparseable responses (3.99% overall) from our analysis. The median model had fewer than 0.4% missing responses, but 4 models&#x2014;Qwen 1 14B (65.0%) and the 3 Llama 2 variants (30.7%&#x2010;31.0%)&#x2014;had substantially higher rates. A sensitivity analysis recomputing performance with missing responses treated as incorrect shows that this had negligible effect for nearly all models, but shifted <italic>F</italic><sub>1</sub>-score by 10 to 53 percentage points for these 4 high-missingness models. We therefore expect our reported performance to be reliable for most models, with the results for these 4 specifically interpreted with this caveat in mind.</p></sec><sec id="s4-4"><title>Conclusions</title><p>We performed a comprehensive evaluation of 2 families of closed-source commercial LLMs (GPT and Claude) and 2 families of popular open-weights LLMs (Llama and Qwen) on the task of labeling clinical notes. We also analyzed the trends of performance with respect to various factors such as model family, model size, and model recency. Our results present a comprehensive picture of the LLM performance on the clinically relevant task of labeling clinical notes.</p></sec></sec></body><back><ack><p>This study used the computing resources of the Biowulf HPC cluster at the National Institutes of Health (NIH) and was supported by the Intramural Research Program of the NIH Clinical Center.</p></ack><notes><sec><title>Generative AI Use</title><p>Generative AI (Claude Sonnet 4.6, Anthropic) was used to assist with editing the manuscript text for clarity and with generating code for supplementary analyses conducted in response to peer review. No generative AI tools were used in the original manuscript drafting, study design, data collection, or original statistical analysis. All AI-assisted content was reviewed, verified, and edited by the authors, who take full responsibility for the accuracy and integrity of the manuscript and its analyses. This use is separate from the large language models that are the subject of this study&#x2019;s evaluation.</p></sec><sec><title>Funding</title><p>This work was supported by the Intramural Research Program of National Institutes of Health (NIH) Clinical Center (1Z01 CL040004) and utilized the computational resources of the NIH HPC Biowulf cluster. This study also received internal NIH funding to use the cloud computing resources of the NIH STRIDES High-Value Datasets program. The contributions of the NIH authors are considered works of the US government.</p></sec><sec><title>Disclaimer</title><p>The views, information, or content, and conclusions presented do not necessarily represent the official position or policy of, nor should any official endorsement be inferred on the part of, the Clinical Center, the National Institutes of Health, or the Department of Health and Human Services.</p></sec><sec><title>Data Availability</title><p>This study uses 2 datasets; the first was an internal NIH dataset of clinical notes, which cannot be made publicly available due to institutional policies. Data may be available from the corresponding author upon reasonable request, subject to institutional review board approval, and execution of a data use agreement with the NIH. The second was a subset of the Medical Information Mart for Intensive Care (MIMIC)-IV-Note dataset, which is publicly available [<xref ref-type="bibr" rid="ref28">28</xref>]. The statistical analysis code is publicly available on GitHub [<xref ref-type="bibr" rid="ref37">37</xref>]. The model weights of the generalized linear models trained for the analysis can be found in <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref>.</p></sec></notes><fn-group><fn fn-type="con"><p>Conceptualization: PM, AP, NT, SL, RMS</p><p>Data curation: PM, MN, VB, AS</p><p>Formal analysis: PM, NR</p><p>Funding acquisition: RMS</p><p>Investigation: MN, VB</p><p>Methodology: PM, RBL, NR</p><p>Project administration: PM</p><p>Resources: RMS</p><p>Software: PM, MN, RBL, AS</p><p>Supervision: RMS</p><p>Validation: PM, NR, RMS</p><p>Visualization: PM</p><p>Writing &#x2013; original draft: PM, MN, NR</p><p>Writing &#x2013; review and editing: PM, RMS</p></fn><fn fn-type="conflict"><p>RMS received royalties for patents or software licenses from iCAD, Philips, and ScanMed. The other authors declare no conflicts of interest.</p></fn></fn-group><glossary><title>Abbreviations</title><def-list><def-item><term id="abb1">ECI</term><def><p>Elixhauser Comorbidity Index</p></def></def-item><def-item><term id="abb2">GLM</term><def><p>generalized linear model</p></def></def-item><def-item><term id="abb3">ICD</term><def><p>International Classification of Diseases</p></def></def-item><def-item><term id="abb4">LLM</term><def><p>large language model</p></def></def-item><def-item><term id="abb5">MIMIC</term><def><p>Medical Information Mart for Intensive Care</p></def></def-item><def-item><term id="abb6">NIH</term><def><p>National Institutes of Health</p></def></def-item><def-item><term id="abb7">NLP</term><def><p>natural language processing</p></def></def-item><def-item><term id="abb8">VL</term><def><p>vision language</p></def></def-item></def-list></glossary><ref-list><title>References</title><ref id="ref1"><label>1</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Rule</surname><given-names>A</given-names> </name><name name-style="western"><surname>Bedrick</surname><given-names>S</given-names> </name><name name-style="western"><surname>Chiang</surname><given-names>MF</given-names> </name><name name-style="western"><surname>Hribar</surname><given-names>MR</given-names> </name></person-group><article-title>Length and redundancy of outpatient progress notes across a decade at an academic medical center</article-title><source>JAMA Netw Open</source><year>2021</year><month>07</month><day>1</day><volume>4</volume><issue>7</issue><fpage>e2115334</fpage><pub-id pub-id-type="doi">10.1001/jamanetworkopen.2021.15334</pub-id><pub-id pub-id-type="medline">34279650</pub-id></nlm-citation></ref><ref id="ref2"><label>2</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Searle</surname><given-names>T</given-names> </name><name name-style="western"><surname>Ibrahim</surname><given-names>Z</given-names> </name><name name-style="western"><surname>Teo</surname><given-names>J</given-names> </name><name name-style="western"><surname>Dobson</surname><given-names>R</given-names> </name></person-group><article-title>Estimating redundancy in clinical text</article-title><source>J Biomed Inform</source><year>2021</year><month>12</month><volume>124</volume><fpage>103938</fpage><pub-id pub-id-type="doi">10.1016/j.jbi.2021.103938</pub-id><pub-id pub-id-type="medline">34695581</pub-id></nlm-citation></ref><ref id="ref3"><label>3</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Wang</surname><given-names>Y</given-names> </name><name name-style="western"><surname>Wang</surname><given-names>L</given-names> </name><name name-style="western"><surname>Rastegar-Mojarad</surname><given-names>M</given-names> </name><etal/></person-group><article-title>Clinical information extraction applications: a literature review</article-title><source>J Biomed Inform</source><year>2018</year><month>01</month><volume>77</volume><fpage>34</fpage><lpage>49</lpage><pub-id pub-id-type="doi">10.1016/j.jbi.2017.11.011</pub-id><pub-id pub-id-type="medline">29162496</pub-id></nlm-citation></ref><ref id="ref4"><label>4</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Huang</surname><given-names>J</given-names> </name><name name-style="western"><surname>Yang</surname><given-names>DM</given-names> </name><name name-style="western"><surname>Rong</surname><given-names>R</given-names> </name><etal/></person-group><article-title>A critical assessment of using ChatGPT for extracting structured data from clinical notes</article-title><source>NPJ Digit Med</source><year>2024</year><month>05</month><day>1</day><volume>7</volume><issue>1</issue><fpage>106</fpage><pub-id pub-id-type="doi">10.1038/s41746-024-01079-8</pub-id><pub-id pub-id-type="medline">38693429</pub-id></nlm-citation></ref><ref id="ref5"><label>5</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Zhang</surname><given-names>H</given-names> </name><name name-style="western"><surname>Jethani</surname><given-names>N</given-names> </name><name name-style="western"><surname>Jones</surname><given-names>S</given-names> </name><etal/></person-group><article-title>Evaluating large language models (LLMs) in information extraction: a case study of extracting cognitive exam dates and scores</article-title><source>Alzheimers Dement</source><year>2024</year><month>12</month><volume>20</volume><issue>S4</issue><fpage>e087416</fpage><pub-id pub-id-type="doi">10.1002/alz.087416</pub-id></nlm-citation></ref><ref id="ref6"><label>6</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>McInerney</surname><given-names>D</given-names> </name><name name-style="western"><surname>Young</surname><given-names>G</given-names> </name><name name-style="western"><surname>van de Meent</surname><given-names>JW</given-names> </name><name name-style="western"><surname>Wallace</surname><given-names>B</given-names> </name></person-group><article-title>CHiLL: zero-shot custom interpretable feature extraction from clinical notes with large language models</article-title><source>Findings Assoc Comput Linguist EMNLP</source><year>2023</year><fpage>8477</fpage><lpage>8494</lpage><pub-id pub-id-type="doi">10.18653/v1/2023.findings-emnlp.568</pub-id></nlm-citation></ref><ref id="ref7"><label>7</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Wu</surname><given-names>J</given-names> </name><name name-style="western"><surname>Dong</surname><given-names>H</given-names> </name><name name-style="western"><surname>Li</surname><given-names>Z</given-names> </name><etal/></person-group><article-title>A hybrid framework with large language models for rare disease phenotyping</article-title><source>BMC Med Inform Decis Mak</source><year>2024</year><month>10</month><day>8</day><volume>24</volume><issue>1</issue><fpage>289</fpage><pub-id pub-id-type="doi">10.1186/s12911-024-02698-7</pub-id><pub-id pub-id-type="medline">39375687</pub-id></nlm-citation></ref><ref id="ref8"><label>8</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Yang</surname><given-names>X</given-names> </name><name name-style="western"><surname>Chen</surname><given-names>A</given-names> </name><name name-style="western"><surname>PourNejatian</surname><given-names>N</given-names> </name><etal/></person-group><article-title>A large language model for electronic health records</article-title><source>NPJ Digit Med</source><year>2022</year><month>12</month><day>26</day><volume>5</volume><issue>1</issue><fpage>194</fpage><pub-id pub-id-type="doi">10.1038/s41746-022-00742-2</pub-id><pub-id pub-id-type="medline">36572766</pub-id></nlm-citation></ref><ref id="ref9"><label>9</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Gu</surname><given-names>B</given-names> </name><name name-style="western"><surname>Shao</surname><given-names>V</given-names> </name><name name-style="western"><surname>Liao</surname><given-names>Z</given-names> </name><etal/></person-group><article-title>Scalable information extraction from free text electronic health records using large language models</article-title><source>BMC Med Res Methodol</source><year>2025</year><month>01</month><day>28</day><volume>25</volume><issue>1</issue><fpage>23</fpage><pub-id pub-id-type="doi">10.1186/s12874-025-02470-z</pub-id><pub-id pub-id-type="medline">39871166</pub-id></nlm-citation></ref><ref id="ref10"><label>10</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Peng</surname><given-names>C</given-names> </name><name name-style="western"><surname>Yang</surname><given-names>X</given-names> </name><name name-style="western"><surname>Chen</surname><given-names>A</given-names> </name><etal/></person-group><article-title>Generative large language models are all-purpose text analytics engines: text-to-text learning is all your need</article-title><source>J Am Med Inform Assoc</source><year>2024</year><month>09</month><day>1</day><volume>31</volume><issue>9</issue><fpage>1892</fpage><lpage>1903</lpage><pub-id pub-id-type="doi">10.1093/jamia/ocae078</pub-id><pub-id pub-id-type="medline">38630580</pub-id></nlm-citation></ref><ref id="ref11"><label>11</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Agrawal</surname><given-names>M</given-names> </name><name name-style="western"><surname>Hegselmann</surname><given-names>S</given-names> </name><name name-style="western"><surname>Lang</surname><given-names>H</given-names> </name><name name-style="western"><surname>Kim</surname><given-names>Y</given-names> </name><name name-style="western"><surname>Sontag</surname><given-names>D</given-names> </name></person-group><article-title>Large language models are few-shot clinical information extractors</article-title><source>Proc Conf Empir Methods Nat Lang Process</source><year>2022</year><fpage>1998</fpage><lpage>2022</lpage><pub-id pub-id-type="doi">10.18653/v1/2022.emnlp-main.130</pub-id></nlm-citation></ref><ref id="ref12"><label>12</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Liu</surname><given-names>J</given-names> </name><name name-style="western"><surname>Wang</surname><given-names>C</given-names> </name><name name-style="western"><surname>Liu</surname><given-names>S</given-names> </name></person-group><article-title>Utility of ChatGPT in clinical practice</article-title><source>J Med Internet Res</source><year>2023</year><month>06</month><day>28</day><volume>25</volume><fpage>e48568</fpage><pub-id pub-id-type="doi">10.2196/48568</pub-id><pub-id pub-id-type="medline">37379067</pub-id></nlm-citation></ref><ref id="ref13"><label>13</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Palestine</surname><given-names>AG</given-names> </name><name name-style="western"><surname>Merrill</surname><given-names>PT</given-names> </name><name name-style="western"><surname>Saleem</surname><given-names>SM</given-names> </name><name name-style="western"><surname>Jabs</surname><given-names>DA</given-names> </name><name name-style="western"><surname>Thorne</surname><given-names>JE</given-names> </name></person-group><article-title>Assessing the precision of ICD-10 codes for uveitis in 2 electronic health record systems</article-title><source>JAMA Ophthalmol</source><year>2018</year><month>10</month><day>1</day><volume>136</volume><issue>10</issue><fpage>1186</fpage><lpage>1190</lpage><pub-id pub-id-type="doi">10.1001/jamaophthalmol.2018.3001</pub-id><pub-id pub-id-type="medline">30054618</pub-id></nlm-citation></ref><ref id="ref14"><label>14</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Horsky</surname><given-names>J</given-names> </name><name name-style="western"><surname>Drucker</surname><given-names>EA</given-names> </name><name name-style="western"><surname>Ramelson</surname><given-names>HZ</given-names> </name></person-group><article-title>Accuracy and completeness of clinical coding using ICD-10 for ambulatory visits</article-title><source>AMIA Annu Symp Proc</source><year>2017</year><volume>2017</volume><fpage>912</fpage><lpage>920</lpage><pub-id pub-id-type="medline">29854158</pub-id></nlm-citation></ref><ref id="ref15"><label>15</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Rattanaumpawan</surname><given-names>P</given-names> </name><name name-style="western"><surname>Wongkamhla</surname><given-names>T</given-names> </name><name name-style="western"><surname>Thamlikitkul</surname><given-names>V</given-names> </name></person-group><article-title>Accuracy of ICD-10 coding system for identifying comorbidities and infectious conditions using data from a Thai university hospital administrative database</article-title><source>J Med Assoc Thai</source><year>2016</year><month>04</month><volume>99</volume><issue>4</issue><fpage>368</fpage><lpage>373</lpage><pub-id pub-id-type="medline">27396219</pub-id></nlm-citation></ref><ref id="ref16"><label>16</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Humbert-Droz</surname><given-names>M</given-names> </name><name name-style="western"><surname>Mukherjee</surname><given-names>P</given-names> </name><name name-style="western"><surname>Gevaert</surname><given-names>O</given-names> </name></person-group><article-title>Strategies to address the lack of labeled data for supervised machine learning training with electronic health records: case study for the extraction of symptoms from clinical notes</article-title><source>JMIR Med Inform</source><year>2022</year><month>03</month><day>14</day><volume>10</volume><issue>3</issue><fpage>e32903</fpage><pub-id pub-id-type="doi">10.2196/32903</pub-id><pub-id pub-id-type="medline">35285805</pub-id></nlm-citation></ref><ref id="ref17"><label>17</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Zhan</surname><given-names>X</given-names> </name><name name-style="western"><surname>Humbert-Droz</surname><given-names>M</given-names> </name><name name-style="western"><surname>Mukherjee</surname><given-names>P</given-names> </name><name name-style="western"><surname>Gevaert</surname><given-names>O</given-names> </name></person-group><article-title>Structuring clinical text with AI: old versus new natural language processing techniques evaluated on eight common cardiovascular diseases</article-title><source>Patterns (N Y)</source><year>2021</year><month>07</month><day>9</day><volume>2</volume><issue>7</issue><fpage>100289</fpage><pub-id pub-id-type="doi">10.1016/j.patter.2021.100289</pub-id><pub-id pub-id-type="medline">34286303</pub-id></nlm-citation></ref><ref id="ref18"><label>18</label><nlm-citation citation-type="book"><person-group person-group-type="author"><name name-style="western"><surname>Baumel</surname><given-names>T</given-names> </name><name name-style="western"><surname>Nassour-Kassis</surname><given-names>J</given-names> </name><name name-style="western"><surname>Cohen</surname><given-names>R</given-names> </name><name name-style="western"><surname>Elhadad</surname><given-names>M</given-names> </name><name name-style="western"><surname>Elhadad</surname><given-names>N</given-names> </name></person-group><article-title>Multi-label classification of patient notes: case study on ICD code assignment</article-title><source>2018 AAAI Joint Workshop on Health Intelligence (W3PHIAI 2018)</source><year>2018</year><access-date>2026-10-14</access-date><publisher-name>AAAI Press</publisher-name><fpage>409</fpage><lpage>416</lpage><comment><ext-link ext-link-type="uri" xlink:href="https://cris.bgu.ac.il/en/publications/multi-label-classification-of-patient-notes-case-study-on-icd-cod/">https://cris.bgu.ac.il/en/publications/multi-label-classification-of-patient-notes-case-study-on-icd-cod/</ext-link></comment></nlm-citation></ref><ref id="ref19"><label>19</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Dong</surname><given-names>H</given-names> </name><name name-style="western"><surname>Su&#x00E1;rez-Paniagua</surname><given-names>V</given-names> </name><name name-style="western"><surname>Whiteley</surname><given-names>W</given-names> </name><name name-style="western"><surname>Wu</surname><given-names>H</given-names> </name></person-group><article-title>Explainable automated coding of clinical notes using hierarchical label-wise attention networks and label embedding initialisation</article-title><source>J Biomed Inform</source><year>2021</year><month>04</month><volume>116</volume><fpage>103728</fpage><pub-id pub-id-type="doi">10.1016/j.jbi.2021.103728</pub-id><pub-id pub-id-type="medline">33711543</pub-id></nlm-citation></ref><ref id="ref20"><label>20</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Burford</surname><given-names>KG</given-names> </name><name name-style="western"><surname>Itzkowitz</surname><given-names>NG</given-names> </name><name name-style="western"><surname>Ortega</surname><given-names>AG</given-names> </name><name name-style="western"><surname>Teitler</surname><given-names>JO</given-names> </name><name name-style="western"><surname>Rundle</surname><given-names>AG</given-names> </name></person-group><article-title>Use of generative AI to identify helmet status among patients with micromobility-related injuries from unstructured clinical notes</article-title><source>JAMA Netw Open</source><year>2024</year><month>08</month><day>1</day><volume>7</volume><issue>8</issue><fpage>e2425981</fpage><pub-id pub-id-type="doi">10.1001/jamanetworkopen.2024.25981</pub-id><pub-id pub-id-type="medline">39136946</pub-id></nlm-citation></ref><ref id="ref21"><label>21</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Wang</surname><given-names>H</given-names> </name><name name-style="western"><surname>Gao</surname><given-names>C</given-names> </name><name name-style="western"><surname>Dantona</surname><given-names>C</given-names> </name><name name-style="western"><surname>Hull</surname><given-names>B</given-names> </name><name name-style="western"><surname>Sun</surname><given-names>J</given-names> </name></person-group><article-title>DRG-LLaMA: tuning LLaMA model to predict diagnosis-related group for hospitalized patients</article-title><source>NPJ Digit Med</source><year>2024</year><month>01</month><day>22</day><volume>7</volume><issue>1</issue><fpage>16</fpage><pub-id pub-id-type="doi">10.1038/s41746-023-00989-3</pub-id><pub-id pub-id-type="medline">38253711</pub-id></nlm-citation></ref><ref id="ref22"><label>22</label><nlm-citation citation-type="other"><person-group person-group-type="author"><collab>OpenAI</collab><name name-style="western"><surname>Achiam</surname><given-names>J</given-names> </name><name name-style="western"><surname>Adler</surname><given-names>S</given-names> </name><name name-style="western"><surname>Agarwal</surname><given-names>S</given-names> </name><etal/></person-group><article-title>GPT-4 technical report</article-title><source>arXiv</source><comment>Preprint posted online on  Mar 1, 2023</comment><pub-id pub-id-type="doi">10.48550/arXiv.2303.08774</pub-id></nlm-citation></ref><ref id="ref23"><label>23</label><nlm-citation citation-type="other"><person-group person-group-type="author"><name name-style="western"><surname>Bai</surname><given-names>J</given-names> </name><name name-style="western"><surname>Bai</surname><given-names>S</given-names> </name><name name-style="western"><surname>Chu</surname><given-names>Y</given-names> </name><etal/></person-group><article-title>Qwen technical report</article-title><source>arXiv</source><comment>Preprint posted online on  Sep 28, 2023</comment><pub-id pub-id-type="doi">10.48550/arXiv.2309.16609</pub-id></nlm-citation></ref><ref id="ref24"><label>24</label><nlm-citation citation-type="other"><person-group person-group-type="author"><name name-style="western"><surname>Yang</surname><given-names>A</given-names> </name><name name-style="western"><surname>Yang</surname><given-names>B</given-names> </name><name name-style="western"><surname>Hui</surname><given-names>B</given-names> </name><etal/></person-group><article-title>Qwen2 technical report</article-title><source>arXiv</source><comment>Preprint posted online on  Jul 15, 2024</comment><pub-id pub-id-type="doi">10.48550/arXiv.2407.10671</pub-id></nlm-citation></ref><ref id="ref25"><label>25</label><nlm-citation citation-type="other"><person-group person-group-type="author"><name name-style="western"><surname>Grattafiori</surname><given-names>A</given-names> </name><name name-style="western"><surname>Dubey</surname><given-names>A</given-names> </name><name name-style="western"><surname>Jauhri</surname><given-names>A</given-names> </name><etal/></person-group><article-title>The Llama 3 herd of models</article-title><source>arXiv</source><comment>Preprint posted online on  Jul 31, 2024</comment><pub-id pub-id-type="doi">10.48550/arXiv.2407.21783</pub-id></nlm-citation></ref><ref id="ref26"><label>26</label><nlm-citation citation-type="other"><person-group person-group-type="author"><name name-style="western"><surname>Touvron</surname><given-names>H</given-names> </name><name name-style="western"><surname>Lavril</surname><given-names>T</given-names> </name><name name-style="western"><surname>Izacard</surname><given-names>G</given-names> </name><etal/></person-group><article-title>LLaMA: open and efficient foundation language models</article-title><source>arXiv</source><comment>Preprint posted online on  Feb 27, 2023</comment><pub-id pub-id-type="doi">10.48550/arXiv.2302.13971</pub-id></nlm-citation></ref><ref id="ref27"><label>27</label><nlm-citation citation-type="other"><person-group person-group-type="author"><name name-style="western"><surname>Touvron</surname><given-names>H</given-names> </name><name name-style="western"><surname>Martin</surname><given-names>L</given-names> </name><name name-style="western"><surname>Stone</surname><given-names>K</given-names> </name><etal/></person-group><article-title>Llama 2: open foundation and fine-tuned chat models</article-title><source>arXiv</source><comment>Preprint posted online on  Jul 18, 2023</comment><pub-id pub-id-type="doi">10.48550/arXiv.2307.09288</pub-id></nlm-citation></ref><ref id="ref28"><label>28</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Johnson</surname><given-names>A</given-names> </name><name name-style="western"><surname>Pollard</surname><given-names>T</given-names> </name><name name-style="western"><surname>Horng</surname><given-names>S</given-names> </name><name name-style="western"><surname>Celi</surname><given-names>LA</given-names> </name><name name-style="western"><surname>Mark</surname><given-names>R</given-names> </name></person-group><article-title>MIMIC-IV-Note: deidentified free-text clinical notes</article-title><source>PhysioNet</source><year>2023</year><month>01</month><day>6</day><pub-id pub-id-type="doi">10.13026/1n74-ne17</pub-id></nlm-citation></ref><ref id="ref29"><label>29</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Goldberger</surname><given-names>AL</given-names> </name><name name-style="western"><surname>Amaral</surname><given-names>LA</given-names> </name><name name-style="western"><surname>Glass</surname><given-names>L</given-names> </name><etal/></person-group><article-title>PhysioBank, PhysioToolkit, and PhysioNet: components of a new research resource for complex physiologic signals</article-title><source>Circulation</source><year>2000</year><month>06</month><day>13</day><volume>101</volume><issue>23</issue><fpage>E215</fpage><lpage>E220</lpage><pub-id pub-id-type="doi">10.1161/01.cir.101.23.e215</pub-id><pub-id pub-id-type="medline">10851218</pub-id></nlm-citation></ref><ref id="ref30"><label>30</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Chambon</surname><given-names>PJ</given-names> </name><name name-style="western"><surname>Wu</surname><given-names>C</given-names> </name><name name-style="western"><surname>Steinkamp</surname><given-names>JM</given-names> </name><name name-style="western"><surname>Adleberg</surname><given-names>J</given-names> </name><name name-style="western"><surname>Cook</surname><given-names>TS</given-names> </name><name name-style="western"><surname>Langlotz</surname><given-names>CP</given-names> </name></person-group><article-title>Automated deidentification of radiology reports combining transformer and &#x201C;hide in plain sight&#x201D; rule-based methods</article-title><source>J Am Med Inform Assoc</source><year>2023</year><month>01</month><day>18</day><volume>30</volume><issue>2</issue><fpage>318</fpage><lpage>328</lpage><pub-id pub-id-type="doi">10.1093/jamia/ocac219</pub-id><pub-id pub-id-type="medline">36416419</pub-id></nlm-citation></ref><ref id="ref31"><label>31</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Elixhauser</surname><given-names>A</given-names> </name><name name-style="western"><surname>Steiner</surname><given-names>C</given-names> </name><name name-style="western"><surname>Harris</surname><given-names>DR</given-names> </name><name name-style="western"><surname>Coffey</surname><given-names>RM</given-names> </name></person-group><article-title>Comorbidity measures for use with administrative data</article-title><source>Med Care</source><year>1998</year><month>01</month><volume>36</volume><issue>1</issue><fpage>8</fpage><lpage>27</lpage><pub-id pub-id-type="doi">10.1097/00005650-199801000-00004</pub-id><pub-id pub-id-type="medline">9431328</pub-id></nlm-citation></ref><ref id="ref32"><label>32</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Clopper</surname><given-names>CJ</given-names> </name><name name-style="western"><surname>Pearson</surname><given-names>ES</given-names> </name></person-group><article-title>The use of confidence or fiducial limits illustrated in the case of the binomial</article-title><source>Biometrika</source><year>1934</year><volume>26</volume><issue>4</issue><fpage>404</fpage><lpage>413</lpage><pub-id pub-id-type="doi">10.1093/biomet/26.4.404</pub-id></nlm-citation></ref><ref id="ref33"><label>33</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Asgari</surname><given-names>E</given-names> </name><name name-style="western"><surname>Monta&#x00F1;a-Brown</surname><given-names>N</given-names> </name><name name-style="western"><surname>Dubois</surname><given-names>M</given-names> </name><etal/></person-group><article-title>A framework to assess clinical safety and hallucination rates of LLMs for medical text summarisation</article-title><source>NPJ Digit Med</source><year>2025</year><month>05</month><day>13</day><volume>8</volume><issue>1</issue><fpage>274</fpage><pub-id pub-id-type="doi">10.1038/s41746-025-01670-7</pub-id><pub-id pub-id-type="medline">40360677</pub-id></nlm-citation></ref><ref id="ref34"><label>34</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Van Veen</surname><given-names>D</given-names> </name><name name-style="western"><surname>Van Uden</surname><given-names>C</given-names> </name><name name-style="western"><surname>Blankemeier</surname><given-names>L</given-names> </name><etal/></person-group><article-title>Adapted large language models can outperform medical experts in clinical text summarization</article-title><source>Nat Med</source><year>2024</year><month>04</month><volume>30</volume><issue>4</issue><fpage>1134</fpage><lpage>1142</lpage><pub-id pub-id-type="doi">10.1038/s41591-024-02855-5</pub-id><pub-id pub-id-type="medline">38413730</pub-id></nlm-citation></ref><ref id="ref35"><label>35</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Mukherjee</surname><given-names>P</given-names> </name><name name-style="western"><surname>Hou</surname><given-names>B</given-names> </name><name name-style="western"><surname>Lanfredi</surname><given-names>RB</given-names> </name><name name-style="western"><surname>Summers</surname><given-names>RM</given-names> </name></person-group><article-title>Feasibility of using the privacy-preserving large language model Vicuna for labeling radiology reports</article-title><source>Radiology</source><year>2023</year><month>10</month><volume>309</volume><issue>1</issue><fpage>e231147</fpage><pub-id pub-id-type="doi">10.1148/radiol.231147</pub-id><pub-id pub-id-type="medline">37815442</pub-id></nlm-citation></ref><ref id="ref36"><label>36</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Zhou</surname><given-names>L</given-names> </name><name name-style="western"><surname>Schellaert</surname><given-names>W</given-names> </name><name name-style="western"><surname>Mart&#x00ED;nez-Plumed</surname><given-names>F</given-names> </name><name name-style="western"><surname>Moros-Daval</surname><given-names>Y</given-names> </name><name name-style="western"><surname>Ferri</surname><given-names>C</given-names> </name><name name-style="western"><surname>Hern&#x00E1;ndez-Orallo</surname><given-names>J</given-names> </name></person-group><article-title>Larger and more instructable language models become less reliable</article-title><source>Nature</source><year>2024</year><month>10</month><volume>634</volume><issue>8032</issue><fpage>61</fpage><lpage>68</lpage><pub-id pub-id-type="doi">10.1038/s41586-024-07930-y</pub-id><pub-id pub-id-type="medline">39322679</pub-id></nlm-citation></ref><ref id="ref37"><label>37</label><nlm-citation citation-type="web"><article-title>GitHub</article-title><access-date>2026-10-17</access-date><comment><ext-link ext-link-type="uri" xlink:href="https://github.com/rsummers11/Benchmarking-LLMs-on-ClinicalNotes">https://github.com/rsummers11/Benchmarking-LLMs-on-ClinicalNotes</ext-link></comment></nlm-citation></ref></ref-list><app-group><supplementary-material id="app1"><label>Multimedia Appendix 1</label><p>Supplementary methodological detail, additional modeling approaches, and per-comorbidity performance results, including Tables S1&#x2013;S13 and Figures S1&#x2013;S2.</p><media xlink:href="jmir_v28i1e81708_app1.pdf" xlink:title="PDF File, 563 KB"/></supplementary-material></app-group></back></article>