Can Large Language Models Reliably Extract Physiology Index Values from Coronary Angiography Reports?
Organizations: Sofia Morgado is with the Computer Science Department at Nova School of Science and Technology, Universidade NOVA de Lisboa, Caparica, Portugal (FCT-UNL) · Filipa Valdeira is with Center for Computational and Stochastic Mathematics - Department of Mathematics at Instituto Superior Técnico · Niklas Sander is with the Department of Computer Science at FCT-UNL · Diogo Ferreira is with the Cardiology Department at Centro Hospitalar Universitário Lisboa Norte (CHULN) ·
Abstract
Coronary angiography (CAG) reports contain clinically relevant physiological measurements, yet this information is typically in the form of unstructured natural language, limiting its use in research. We investigate the use of Large Language Models (LLMs) to automatically extract these values, along with their anatomical locations, from Portuguese CAG reports. To our knowledge, this study is the first addressing physiology indexes extraction from a large (1342 reports) corpus of CAG reports, and one of the few focusing on CAG or Portuguese clinical text. We explore local privacy-preserving general-purpose and medical LLMs under different settings. Prompting strategies included zero-shot, few-shot, and few-shot prompting with implausible examples. In addition, we apply constrained generation and introduce a post-processing step based on RegEx. Given the sparsity of measurements, we propose a multi-stage evaluation framework separating format validity, value detection, and value correctness, while accounting for asymmetric clinical error costs. This study demonstrates the potential of LLMs in for extracting physiological indices from Portuguese CAG reports. Non-medical models performed similarly, the best results were obtained with Llama with a zero-shot prompting, while GPT-OSS demonstrated the highest robustness to changes in the prompts. While MedGemma demonstrated similar results to non-medical models, MedLlama's results were out-of-format in the unconstrained setting, and had a significant lower performance in the constrained one. Changes in the prompt techinique and adding a RegEx layer showed no significant improvement across models, while using constrained generation decreased performance, although having the benefit of allowing the usage of specific models that are not able to conform with the templates.
Figures & tables
| Ref | Models | Privacy | Language | Domain | Extracted Data | Sample size |
| [ 12 ] | Llama2 | Yes | En, De | Chest X-ray | Closed-ended questions (Multichoice) | 399 |
| [ 23 ] | GPT-4 | No | En, De | Chest X-ray, CT-scan, MRI | Free-text | 923 |
| [ 46 ] | Vicuna | Yes | En | Chest X-ray | Closed-ended questions (Yes/No) | 100 |
| [ 32 ] | T5 (fine-tuned) | Yes | En | CT scan | Free-text, Multichoice Numerical | 174 |
| [ 16 ] | GPT-4o, Gemini, Claude | No | En | CAG | Closed-ended questions (Multichoice or Numerical) | 250 |
| Ours | Mistral, LLama3, GPT-OSS, MedLlama2, MedGemma | Yes | Pt | CAG | Numerical (FFR/iFR) | 1342 |
| Field | Value |
| Tronco Comum FFR | NA |
| Descendente Anterior FFR | 0.83 |
| Circunflexa FFR | NA |
| Coronária Direita FFR | NA |
| Outras Artérias FFR | NA |
| Tronco Comum iFR | NA |
| Index | Vessel | Count (%) |
| FFR | Left Main | 16 (1.2%) |
| Left Anterior Descending | 387 (29.5%) | |
| Circumflex | 91 (6.9%) | |
| Right Coronary | 95 (7.2%) | |
| Other arteries | 14 (1.1%) | |
| iFR | Left Main | 32 (2.4%) |
| Model | Baseline | Constrained |
| GPT-OSS 0/F-S/F-S I | 0 | 0 |
| Mistral 0/F-S/F-S I | 0 | 0 |
| Llama 0/F-S/F-S I | 0 | 0 |
| MedGemma 0-S | 2 | 0 |
| MedGemma F-S | 8 | 0 |
| MedGemma F-S I | 2 | 0 |
| Extraction | Value | ||||
| Model | Accuracy | Precision | Recall | F1 | Accuracy |
| Baseline RegEx | 0.943 | 0.832 | 0.727 | 0.776 | 0.888 |
| Mistral 0-S | 0.966 | 0.867 | 0.881 | 0.874 | 0.939 |
| Mistral F-S | 0.965 | 0.869 | 0.871 | 0.870 | 0.943 |
| Mistral F-S Implausible values | 0.965 | 0.868 | 0.875 | 0.871 | 0.943 |
| Llama 0-S | 0.967 | 0.872 | 0.885 | 0.878 | 0.941 |
| Type of typographical error | Report | Extracted |
| Missing ”0” | ,93 | 0.93 |
| Missing Comma | 089 | 0.89 |
| Extra Space | 0, 75 | 0.75 |
| Wrong Comma Placing | ,099 | 0.099 |
| Repeated ”0” and Punctuation | 0,0.93 | 0.93 |
| Extraction | Value | ||||
| Model | Accuracy | Precision | Recall | F1 | Accuracy |
| Baseline RegEx | 0.943 | 0.832 | 0.727 | 0.776 | 0.888 |
| GPT-OSS 0-S | 0.966 | 0.871 | 0.884 | 0.877 | 0.939 |
| GPT-OSS F-S | 0.965 | 0.865 | 0.877 | 0.871 | 0.939 |
| GPT-OSS F-S Implausible values | 0.964 | 0.866 | 0.873 | 0.869 | 0.941 |
| GPT-OSS 0-S + RegEx | 0.966 | 0.870 | 0.879 | 0.874 | 0.939 |
| Extraction | Value | ||||
| Model | Accuracy | Precision | Recall | F1 | Accuracy |
| Baseline RegEx | 0.943 | 0.832 | 0.727 | 0.776 | 0.888 |
| MedGemma 0-S | 0.967 | 0.874 | 0.885 | 0.880 | 0.940 |
| MedGemma F-S | 0.965 | 0.865 | 0.877 | 0.871 | 0.939 |
| MedGemma F-S Implausible | 0.965 | 0.870 | 0.872 | 0.871 | 0.938 |
| MedGemma 0-S + RegEx | 0.966 | 0.874 | 0.880 | 0.877 | 0.941 |
| Extraction | Value | ||||
| Model | Accuracy | Precision | Recall | F1 | Accuracy |
| Baseline RegEx | 0.943 | 0.832 | 0.727 | 0.776 | 0.888 |
| Mistral 0-S | 0.966 | 0.867 | 0.881 | 0.874 | 0.939 |
| Mistral F-S | 0.965 | 0.869 | 0.871 | 0.870 | 0.943 |
| Mistral F-S Implausible values | 0.965 | 0.868 | 0.875 | 0.871 | 0.943 |
| Llama 0-S | 0.967 | 0.872 | 0.885 | 0.878 | 0.941 |
Clinical Information Extraction
Clinical Information Extraction turns clinical notes, reports, and patient narratives into structured, searchable facts and relations.
See all 106 papers