Manuscript Offprint

arXiv:2611.01409

RAG-TRACE: Tracing Measurement Evidence and Diagnostic Completeness in AI-Generated ECG Reports

Elyas Irankhah, Shahed Salehzehi, Parisa Hosseini

Abstract

Purpose: Retrieval-augmented generation (RAG) can introduce electrocardiogram (ECG) criteria that lack patient-specific measurement support. This study evaluates the reliability of retrieved diagnostic criteria in AI-generated ECG reports. Methods: We analyzed 1,083 human-validated PTB-XL patient records using a library of 47 criteria cards, including 33 without numeric verification rules. Language models generated structured reports with and without retrieval. Criterion applicability was evaluated using Marquette 12SL measurements, with independent assessment using Uni-G and comparison against expert-validated diagnostic labels. Results: Keyword retrieval introduced untestable or measurement-disconfirmed criteria in 46.8% of GPT-4.1-mini reports. A deterministic verification rule withdrew 647 criterion applications, including 639 without numeric checks, while preserving 268 of 269 applications independently supported by Uni-G. Restricting retrieval to 14 testable criteria reduced the initial unsupported-criterion rate to 13.8%. Under matched instructions and an identical output schema, retrieval increased unsupported-criterion reports from 17.4% to 31.1%, while hypertrophy recall remained unchanged at 62.6%. Conclusion: These findings identify a fundamental limitation of retrieval-based clinical report generation: retrieved criteria do not necessarily provide valid patient-specific evidence. Measurement-based verification can reduce unsupported criterion applications, but diagnostic validity requires independent assessment.

Keywords: electrocardiogram, language models, retrieval, measurement criteria, calibration, PTB-XL

1 Introduction

The 12-lead electrocardiogram (ECG) is an essential diagnostic tool for assessing cardiac activity through measurable intervals, axes, and voltages [1, 2]. Large datasets such as PTB-XL, comprising 21,799 recordings from 18,869 patients [3], have advanced automated ECG interpretation [4]. Deep learning models have achieved strong performance in detecting cardiac abnormalities [5–8] and supporting cardiovascular screening [9, 10]. Nevertheless, generating reliable clinical reports requires more than diagnostic predictions. Each reported finding must be supported by patient-specific evidence.

Large language models (LLMs) have demonstrated considerable potential for generating clinical narratives [11] and diagnostic explanations [12, 13]. Their outputs can contain unsupported statements and inaccurate evidence attribution [14, 15]. Retrieval-augmented generation (RAG) incorporates external knowledge to improve factual grounding [16–18], with promising applications in medical question answering [19, 20] and clinical information extraction [21]. Recent studies have investigated evidence alignment in clinical question answering [22] and query-level reliability in retriever upgrades [23]. These advances highlight the importance of evidence quality, but the reliability of retrieved criteria in ECG report generation remains insufficiently examined.

ECG interpretation depends on standardized criteria, including QRS duration, Sokolow–Lyon voltage, and corrected QT intervals [24–31]. Clinical guidelines establish measurable thresholds and diagnostic definitions [2, 32, 33]. A retrieved criterion may be clinically relevant without being satisfied by the patient's measurements. Other retrieved information, such as calibration settings or laboratory values, may lack a corresponding ECG measurement. These limitations create a critical gap between retrieval relevance and verifiable diagnostic evidence.

This study presents RAG-TRACE, a measurement-based framework for evaluating retrieved criteria in AI-generated ECG reports. We analyze 1,083 held-out PTB-XL patients using 47 criteria cards, including 14 with numeric checks and 33 without measurable verification rules. Structured reports are generated with and without retrieval. A deterministic rule evaluates applied criteria against Marquette 12SL measurements, while Uni-G provides independent assessment. Diagnostic agreement and completeness are evaluated separately against expert-validated labels. Additional experiments assess retrieval constraints, controlled generation settings, and generalizability to other physiological recordings. The evaluation distinguishes criterion applicability, independent measurement agreement, and diagnostic accuracy, following established reporting principles [34, 35]. Our objective is to determine whether retrieved clinical criteria provide verifiable patient-specific evidence and whether deterministic verification reduces unsupported applications without altering diagnostic conclusions.

References (42)