Comprehensive testing of large language models for extraction of structured data in pathology
Bastian Grothey1, Jan Odenkirchen2, Adnan Brkic3
1Institute of Pathology, University Hospital Cologne, Cologne, Germany. bastian.grothey@uk-koeln.de.
Communications Medicine
|March 31, 2025
Summary
Open-source language models can structure pathology reports as accurately as proprietary models, offering a cost-effective and privacy-preserving solution. Performance varies with prompt engineering and quantization, crucial for practical deployment.
Area of Science:
- Medical Informatics
- Natural Language Processing
- Computational Pathology
Background:
- Pathology departments produce vast amounts of unstructured text data in diagnostic reports.
- Manual structuring of this data for AI and analytics is labor-intensive and costly.
- Existing solutions often rely on proprietary language models, posing privacy and cost challenges.
Purpose of the Study:
- To evaluate the performance of open-source language models in extracting structured data from pathology reports.
- To compare open-source models against proprietary models like GPT-4.
- To investigate the impact of prompt engineering and model quantization on performance for practical deployment.
Main Methods:
- A bilingual dataset of 579 annotated German and English pathology reports was created.
- Six language models (GPT-4, Llama2, Llama3, Qwen2.5) were tested for extracting 11 key parameters.
- Prompt engineering strategies and quantization techniques were analyzed for deployment feasibility.
Main Results:
- Open-source language models achieved high precision in data extraction, comparable to GPT-4.
- Model performance varied significantly based on the specific model, prompt strategy, and quantization method.
- These factors are critical for optimizing practical deployment in pathology settings.
Conclusions:
- Open-source language models offer a viable, high-performance alternative to proprietary solutions for structuring pathology data.
- This research provides a cost-effective and privacy-conscious approach for healthcare institutions.
- The findings and the public dataset offer valuable insights for future research and development in computational pathology.
Related Concept Videos
Introduction to Language of Pathophysiology l
246
Pathophysiology investigates how biological mechanisms—typically starting at the cellular level—disrupt normal bodily functions. It bridges anatomy and physiology to explain the progression of disease. With this foundation, it is important to understand the following key terms used to describe disease processes: Diagnosis:The process of identifying a disease using clinical evaluation, including signs (objective evidence like rashes), symptoms (subjective experiences like...
246
Introduction to Language of Pathophysiology ll
69
This lesson explores key terms that describe how diseases progress, their outcomes, and their distribution in populations.Diagnostic tests identify diseases and monitor treatment. These include blood and urine tests, biopsies, imaging (X-ray, MRI), and detection of infectious agents.Remission is a reduction or disappearance of symptoms.Exacerbation refers to the worsening of symptoms, such as increased wheezing during an asthma attack.A precipitating factor triggers an acute episode, while a...
69


