ai-pathology-report-extraction

Turning narrative pathology reports into structured data with AI

Pathology reports are written as free narrative text. Each pathologist has a personal reporting style, and the format varies between hospitals. Key data such as tumor site, disease stage, and biomarker status are scattered across different paragraphs. Extracting these data requires reading the whole report, and conventional software often fails because the text does not follow a fixed structure.

In April 2026, The Pathologist published a study by Marlene Boye and Ghulam Rasool discussing a software system built to address this problem. The system uses large language models running locally to process medical text.

The system works in three stages. Several language models read the report and extract medical variables such as cell type, tumor stage, and site. Each model writes an explanation for why it selected those data. Other models then review these outputs and compare them with the original text to check accuracy. Finally, a consensus model combines the results and produces structured data with documentation showing how the result was reached. Using several models lowers the risk of automated errors and resembles the way physicians work when they consult each other.

The researchers tested the system on more than 6,000 reports from The Cancer Genome Atlas and real reports from Moffitt Cancer Center. The system extracted core diagnostic variables accurately.

Biomarker extraction was the hardest task. Physicians record biomarker results in separate parts of the report, including comments, addenda, or separate molecular reports. The algorithm had to assemble information from different parts of the text to understand the medical context.

Organizing these data speeds the use of precision medicine. Hospitals use this approach to search thousands of reports and find patients who may qualify for clinical trials, instead of manually reviewing medical records.

Using this system in routine practice requires direct integration with the laboratory information system. The language models run on the hospital’s internal servers to protect patient data. The system shows the source text used by the algorithm, and the pathologist reviews and approves the final result.