Skip to main content

Open-Weight Language Models and Retrieval-Augmented Generation for Automated Structured Data Extraction from Diagnostic Reports: Assessment of Approaches and Parameters.

Publication ,  Journal Article
Jabal, MS; Warman, P; Zhang, J; Gupta, K; Jain, A; Mazurowski, M; Wiggins, W; Magudia, K; Calabrese, E
Published in: Radiol Artif Intell
May 2025

Purpose To develop and evaluate an automated system for extracting structured clinical information from unstructured radiology and pathology reports using open-weight language models (LMs) and retrieval-augmented generation (RAG) and to assess the effects of model configuration variables on extraction performance. Materials and Methods This retrospective study used two datasets: 7294 radiology reports annotated for Brain Tumor Reporting and Data System (BT-RADS) scores and 2154 pathology reports annotated for IDH mutation status (January 2017-July 2021). An automated pipeline was developed to benchmark the performance of various LMs and RAG configurations for accuracy of structured data extraction from reports. The effect of model size, quantization, prompting strategies, output formatting, and inference parameters on model accuracy was systematically evaluated. Results The best-performing models achieved up to 98% accuracy in extracting BT-RADS scores from radiology reports and greater than 90% accuracy for extraction of IDH mutation status from pathology reports. The best model was medical fine-tuned Llama 3. Larger, newer, and domain fine-tuned models consistently outperformed older and smaller models (mean accuracy, 86% vs 75%; P < .001). Model quantization had minimal effect on performance. Few-shot prompting significantly improved accuracy (mean [±SD] increase, 32% ± 32; P = .02). RAG improved performance for complex pathology reports by a mean of 48% ± 11 (P = .001) but not for shorter radiology reports (-8% ± 31; P = .39). Conclusion This study demonstrates the potential of open LMs in automated extraction of structured clinical data from unstructured clinical reports with local privacy-preserving application. Careful model selection, prompt engineering, and semiautomated optimization using annotated data are critical for optimal performance. Keywords: Large Language Models, Retrieval-Augmented Generation, Radiology, Pathology, Health Care Reports Supplemental material is available for this article. © RSNA, 2025 See also commentary by Tejani and Rauschecker in this issue.

Duke Scholars

Altmetric Attention Stats
Dimensions Citation Stats

Published In

Radiol Artif Intell

DOI

EISSN

2638-6100

Publication Date

May 2025

Volume

7

Issue

3

Start / End Page

e240551

Location

United States

Related Subject Headings

  • Retrospective Studies
  • Radiology Information Systems
  • Natural Language Processing
  • Information Storage and Retrieval
  • Humans
  • Brain Neoplasms
 

Citation

APA
Chicago
ICMJE
MLA
NLM
Jabal, M. S., Warman, P., Zhang, J., Gupta, K., Jain, A., Mazurowski, M., … Calabrese, E. (2025). Open-Weight Language Models and Retrieval-Augmented Generation for Automated Structured Data Extraction from Diagnostic Reports: Assessment of Approaches and Parameters. Radiol Artif Intell, 7(3), e240551. https://doi.org/10.1148/ryai.240551
Jabal, Mohamed Sobhi, Pranav Warman, Jikai Zhang, Kartikeye Gupta, Ayush Jain, Maciej Mazurowski, Walter Wiggins, Kirti Magudia, and Evan Calabrese. “Open-Weight Language Models and Retrieval-Augmented Generation for Automated Structured Data Extraction from Diagnostic Reports: Assessment of Approaches and Parameters.Radiol Artif Intell 7, no. 3 (May 2025): e240551. https://doi.org/10.1148/ryai.240551.
Jabal, Mohamed Sobhi, et al. “Open-Weight Language Models and Retrieval-Augmented Generation for Automated Structured Data Extraction from Diagnostic Reports: Assessment of Approaches and Parameters.Radiol Artif Intell, vol. 7, no. 3, May 2025, p. e240551. Pubmed, doi:10.1148/ryai.240551.
Jabal MS, Warman P, Zhang J, Gupta K, Jain A, Mazurowski M, Wiggins W, Magudia K, Calabrese E. Open-Weight Language Models and Retrieval-Augmented Generation for Automated Structured Data Extraction from Diagnostic Reports: Assessment of Approaches and Parameters. Radiol Artif Intell. 2025 May;7(3):e240551.

Published In

Radiol Artif Intell

DOI

EISSN

2638-6100

Publication Date

May 2025

Volume

7

Issue

3

Start / End Page

e240551

Location

United States

Related Subject Headings

  • Retrospective Studies
  • Radiology Information Systems
  • Natural Language Processing
  • Information Storage and Retrieval
  • Humans
  • Brain Neoplasms