Paper · Agents and tools · Version v1
An explainable multi-agent system for syncope diagnosis and prognosis in the emergency department
First published: PLOS Digital Health, . Original
Copyright the authors. Licensed under Creative Commons Attribution 4.0 International.
This page holds the text of the paper, converted to HTML; figures may be left out.
Correct etiological diagnosis and accurate prognostic risk stratification in the emergency department (ED) are essential for promptly identifying patients with high-risk syncope (i.e., cardiovascular syncope), who require timely management. Large Language Models (LLMs) are particularly well suited for the real-time analysis of unstructured electronic health record data, thus potentially supporting physicians in syncope diagnosis and risk stratification. This study aimed to classify syncope by etiology and predict 30-day adverse events using LLMs, while ensuring that the criteria guiding these classifications remained interpretable to emergency physicians. We enrolled 266 consecutive patients (age 73, IQR 58–83; 52% males) admitted for syncope at three tertiary centers. We collected demographic and clinical information, as well as the occurrence of significant outcomes at 30-day follow-up. The etiologic classification of syncope (i.e., cardiovascular versus non-cardiovascular) was performed independently by two experienced investigators based on the review of available ED medical reports. We developed optimized decision-tree models, trained on LLMs augmented dataset, capable of classifying syncope and predicting 30-day adverse events with good discrimination (MCC 0.5740 and 0.4343, respectively). Additionally, leveraging decision-tree’s explainability features and the automatically generated clinical reports, physicians were able to assess the quality of the models’ predictions, thus enhancing clinical reasoning. The present algorithm is proposed as a clinical decision support system for syncope management in the ED. Author summary: Syncope is a common clinical event in the ED, and it is crucial for physicians to identify high-risk patients, i.e., those with a cardiovascular etiology. In this study, we used Large Language Models to classify cardiovascular versus non-cardiovascular syncope and to stratify the risk of adverse events within 30 days of ED evaluation with good discrimination. Furthermore, since the predictions were generated by a visualized decision tree classifier, physicians can understand the rationale behind the predictions, thus enhancing their clinical reasoning to support the decision-making process.
Introduction
Emergency medicine (EM) represents a highly promising field for the application of Artificial Intelligence (AI), both for organizational and coordination tasks and for the intrinsic need for rapid and accurate clinical decision-making in the emergency setting [1,2]. Recently, the potential use of Large Language Models (LLMs) in EM has attracted considerable interest [3].
A LLM is a deep learning–based artificial neural network, distinguished from traditional machine learning (ML) models by being trained on vast amounts of textual data [4], often including internet content, books, and other text sources. Their transformer-based architecture makes these models specifically suited for interpreting unstructured text data, making them particularly useful for real-time analysis of electronic health records (EHR) and, consequently, for the identification of acute clinical conditions in the Emergency Department (ED) [5]. In addition, LLMs are capable of generating human-like text, such as medical reports [6] and clinical recommendations [7,8].
Syncope is a symptom associated with a wide spectrum of clinical conditions characterized of extremely variable origin and prognosis [9,10]. Its impact on ED activity is substantial, accounting for a significant proportion of emergency visits [11]. Consequently, establishing a correct etiological diagnosis is essential for guiding appropriate diagnostic and therapeutic pathways. Moreover, prompt risk stratification in the ED is crucial for identifying patients with high-risk syncope, particularly those with a cardiovascular etiology, who require timely management.
In a recent study [12], we developed LLM-based algorithms for syncope recognition from triage nurse and emergency physician notes. Using the Italian-language Bidirectional Encoder Representations from Transformers (Italian BERT) model [13] on approximately 30,000 EHRs, we could detect syncopal loss of consciousness with high discriminative capability, thus proposing an effective framework for integrating these models into the clinical workflow.
In the current study, we integrated these findings with the results of our previous investigations on syncope detection and risk stratification [12,14,15], to develop a clinical decision support system (CDSS) for syncope management in the ED. Specifically, we used LLMs to classify syncope as either cardiovascular (i.e., high risk) or non-cardiovascular (i.e., intermediate-low risk) and to predict the risk of adverse events within 30 days of ED evaluation. Additionally, we analyzed how physicians could incorporate the clinical reports automatically generated by these algorithms into the assessment of patients presenting with syncope, ultimately proposing a tool to support and optimize syncope management in the ED.
Methods
The present investigation is a sub-study of The Syncope Monitoring and Natriuretic peptides in the Emergency department (SyMoNE) study [16].
1. Ethics statement
The main study received approval from the institutional review board of the coordinating center (L. Sacco Hospital, approval number 608/2015). All participants provided written consent to participate in the study and written or oral consent to telephone interviews as applicable.
2. Study population
We enrolled 266 consecutive patients (age ≥ 18 years) who presented to the ED of three tertiary hospitals in the Milan area (Ospedale Maggiore Policlinico, Luigi Sacco Hospital, Humanitas Research Hospital) for syncope between September 1, 2015 and February 28, 2017. Exclusion criteria were: loss of consciousness (LOC) following head trauma; nonspontaneous recovery of consciousness; episodes of falling, dizziness, or lightheadedness without LOC; LOC associated with alcohol or drug abuse; pregnancy or breastfeeding status; inability to provide informed consent to study participation or to complete follow up; syncope as an underlying symptom of an acute condition diagnosed in the ED or requiring therapeutic intervention irrespective of syncope (acute myocardial infarction, pulmonary embolism, aortic dissection, cerebral hemorrhage, carotid sinus syndrome, or arrhythmia diagnosed before ECG monitoring in the ED); non-syncopal LOC (i.e., history of epilepsy); and poor prognosis in the next 30 days [16].
Demographics, past medical history, features of the index syncopal episode, vital signs, hemoglobin levels, and 12-lead ECG features at presentation were extracted from the ED electronic repositories and recorded in structured tabular format.
All participants underwent a 30-day follow-up conducted by telephone to assess the occurrence of adverse events.
3. Definitions
Syncope is defined as a transient loss of consciousness, likely due to transient global cerebral hypoperfusion, and characterized by rapid onset, short duration, and spontaneous complete recovery [9,10,17].
Cardiovascular syncope is defined as any syncopal loss of consciousness due to arrhythmia (bradycardia or tachycardia), structural heart disease, cardiopulmonary disease, or disease of the great vessels. Conversely, non-cardiovascular syncope is defined as any syncopal episode attributable to non-cardiovascular causes, including reflex syncope, orthostatic hypotension, volume depletion, dehydration, and blood loss [9,10].
For the purpose of this study, the etiological classification of syncope (i.e., cardiovascular versus non-cardiovascular) was independently performed by two experienced investigators (FD and MS) based on a review of the available clinical and electrocardiographic data, as well as 30-day outcomes.
Electrocardiogram (ECG) was considered abnormal in the presence of a newly detected non-sinus rhythm or other abnormalities according to previously published consensus criteria [18,19].
In accordance with the “Standardized Reporting Guidelines for Emergency Department Syncope Risk-Stratification Research” [18], the following events occurring within 30 days were considered adverse outcomes: all-cause mortality or syncope-related death; ventricular fibrillation; sustained or symptomatic non-sustained ventricular tachycardia; sinus arrest with cardiac pause > 3 s; sick sinus syndrome with alternating bradycardia and tachycardia; second-degree type 2 or third-degree atrioventricular (AV) block; permanent pacemaker (PM) or implantable cardioverter defibrillator (ICD) malfunction associated with cardiac pauses; aortic stenosis with valve area ≤ 1 cm; hypertrophic cardiomyopathy with outflow tract obstruction; left atrial myxoma or thrombus causing outflow tract obstruction; myocardial infarction; pulmonary embolism; aortic dissection; occult hemorrhage or anemia requiring transfusion; syncope or fall resulting in major traumatic injury requiring admission or procedural/surgical intervention; PM or ICD implantation; cardiopulmonary resuscitation; recurrent syncope requiring hospital admission; and cerebrovascular events.
In the current study, acute conditions diagnosed during the ED evaluation for which syncope was the presenting symptom were not considered adverse events. However, because the aim of the primary study was to evaluate the diagnostic accuracy of ECG monitoring in non-low-risk patients, adverse events diagnosed during ED monitoring were included.
4. Models development
As to the model development, our main objective was to develop accurate and explainable algorithms for the classification and risk stratification of patients presenting with syncope. Classification refers to the binary categorization of syncope etiology as cardiovascular or non-cardiovascular, whereas risk stratification refers to the binary prediction of adverse events occurring within 30 days of ED evaluation. By accurate, we refer to the ability of the models to provide clinician with a choice between two types of performance metrics: a balanced metric, which assigns equal importance to precision and recall, and a sensitive metric, which gives greater weight to recall. By explainable, we mean that the algorithms should not only generate a prediction but also provide the rationale or criteria underlying that prediction. As the balanced metric, we selected the Matthews Correlation Coefficient (MCC) [20]. As the sensitive metric, we used the F2 score, which assigns twice as much weight to recall as to precision. For completeness, we also report the AUC score, as this metric remains the most widely used measure of discrimination in clinical prediction studies and facilitates comparison with previously published studies.
All algorithms used in the current article leverage a dataset of 266 patients with syncope and known 30-day outcomes [15]. For the purposes of the present study, the dataset was further manually annotated by adding a column containing the true labels for syncope classification. The first data preparation step consisted of tabular data serialization, whereby numerical and categorical variables were converted into textual format. For example, an age value of 60 was converted into the phrase “age is sixty”. This step is crucial because it allows the incorporation of domain-specific medical knowledge related to age within the context of syncope classification and risk stratification. To clarify this concept, traditional ML algorithms typically treat the name of a variable (e.g., ‘age’) as irrelevant and will generally produce identical results regardless of the variable label. In contrast, generative models based on LLMs can distinguish age from other clinical variables and may also identify specific thresholds, such as 60 years, as relevant to syncope assessment. This capability arises from the conversion of words into numerical vectors (embedding technique) that preserve their contextual meaning.
Before describing the model development process in detail, several key concepts used throughout this section should be introduced. This section begins with three thematic subsections covering agents, LLMs, and performance metrics. This is followed by a subsection providing an overview of the study methodology and, subsequently, by detailed descriptions of each component of the proposed framework.
4.1 Agents.
A generative agent is a software component that generates text based on specific instructions (the prompt) using an LLM trained for that purpose. Fig 1 presents an example comprising four generative agents, each designed to accomplish a specific task. The Patient Summary agent is specialized in generating a summary of patient data tailored for syncope risk stratification. This agent uses the Phi-4 LLM together with a dedicated prompt to produce its output [21].
Fig 1. Basic RAG agent workflow used in this study.
Phi4 and DeepHermes are models implemented for the different tasks.
A Retrieval-Augmented Generation (RAG) agent [22] is a generative agent that enhances the original prompt with text retrieved from a knowledge base (KB), thereby incorporating domain-specific information and reducing the risk of LLM hallucinations. In the example shown in Fig 1, all agents are RAG agents that access the same KB (not shown in the figure).
A workflow of RAG agents is structured as a directed acyclic graph, meaning that the graph contains no loops. In this structure, nodes represent RAG agents, while edges represent the flow of information between them. For instance, in Fig 1, the edge connecting the Syncope Classification node to the Risk Stratification node represents the transfer of information from the former to the latter, allowing its output to be used for further processing. The connections between agents, that is, the information flow, are static, and defined at design time rather than dynamically determined by the agents themselves during execution. The workflow exposes an ‘execute’ method that, when invoked, triggers the execution of the root nodes (i.e., nodes with no incoming edges). In the example shown in Fig 1, the Patient Summary node is the only root node.
Execution consists of invoking the agent’s LLM, extracting the relevant information from its output, and passing this information to all downstream nodes (i.e., nodes receiving incoming edges from the current node). A node becomes eligible for execution once it has received inputs from all its upstream nodes, at which point it is executed automatically. Workflow execution terminates when all nodes have been processed. The execution flow in Fig 1 proceeds as follows: 1) the Patient Summary node is executed, and its output is passed to both the Syncope Classification and Risk Stratification nodes; 2) the Syncope Classification node is then executed, and its output is passed to the Risk Stratification node; 3) the Risk Stratification node is executed; 4) the computation terminates.
Unlike popular agent frameworks (e.g., LangGraph) [23], our agents do not use external tools, because they only require access to a KB for RAG. Similarly, they do not maintain conversational memory, since they are not designed to manage dialogues. Instead, information is explicitly transferred between agents through edges during execution.
4.2 Large Language Models (LLMs).
A language model is a model that either computes the joint probability or the conditional probability of natural language text [24]. When such a model contains a large number of parameters (e.g., more than 1 billion), it is referred to as a Large Language Model (LLM).
Two families of LLMs are particularly important for this study: the autoencoders (i.e., embedding models) and the autoregressive language models. The autoencoders receive text tokens as inputs and generate numerical vectors representations as outputs. Tokens are the atomic components of text and may correspond to words, characters, or subwords. BERT [13] is a well-known example of embedding model. The autoregressive language models receive a sequence of tokens as input and generate another sequence of tokens as outputs. GPT [25] is a widely used example of this class of models. Throughout this article, the term LLM refers to either an embedding model or an autoregressive language model. The former provides a dense mathematical representation of tokens that enables the transformation of textual data into numerical form. The latter generates text autoregressively and is implemented using MLX models [26], specifically adapted for use on Apple Silicon.
All agents in this study use the embedding model BAAI/bge-base-en-v1.5 [27]. This choice was selected based on both memory requirements and performance considerations. Similarly, MLX models were selected based on memory limitations and empirical testing.
For the generative component of all agents, we chose the model mlx-community/phi-4–4bit [20]. The only exception was the clinical report revision task, for which we obtained superior results using mlx-community/DeepHermes-3-Llama-3-8B-Preview-8bit [28].
4.3 Performance metrics.
Numerous performance metrics have been developed to measure the ‘accuracy’ of binary classification algorithms. Some of these metrics (e.g., precision, recall, accuracy) require a true label and a predicted label. Others (e.g., AUC, ECE, see below) require a true label and a predicted probability. Since RAG agentic workflows do not provide prediction probabilities, these latter metrics cannot be used to evaluate their performance. In contrast, decision tree pipelines produce prediction probabilities, allowing all types of metrics to assess their overall performance.
Although metrics such as precision and recall can be computed, they do not provide a single balanced number that represents overall performance. Others, like accuracy, are sensitive to dataset imbalance. For these reasons, we selected the MCC as our primary performance metric [20,29]. The MCC offers a single-value summary that incorporates all four categories of binary classification results: true positives, false positives, true negatives, and false negatives. Its value ranges from –1 to +1, with 0 corresponding to a performance no better than random.
However, there may be situations where a physician considers the true positive rate more important than the true negative rate—or equivalently, where sensitivity is prioritized over specificity. In such cases, we require a metric that weighs more heavily than precision. For this purpose, we use the F2 score, which gives twice as much importance to recall.
Finally, since physicians are accustomed to using AUC as a primary evaluation metric, we also report AUC results for completeness.
Models’ calibration was assessed using the expected calibration error (ECE) [30]. Calibration discretizes the probability interval into a fixed number of bins and assigns each predicted probability to the corresponding bin. The ECE is the difference between the fraction of correct predictions in the bin (accuracy) and the mean of the probabilities in the bin (confidence). Therefore, if a model’s accuracy is equal to the bin’s mean probability, the ECE would be 0, indicating perfect calibration. Lower ECE values therefore indicate better calibration.
4.4 Method overview.
The method used in this article consists of two main components:
1) an ensemble of five RAG agentic workflows that predicts the syncope class and the risk of adverse events using a zero-shot learning approach (i.e., the prompts do not contain examples of the expected outputs). Consequently, no model training is required, thereby eliminating the risk of overfitting associated with supervised learning approaches [24]; 2) a set of six decision-tree classifiers trained on a dataset obtained by splitting the dataset with the predictions obtained by the RAG agentic workflows.
In the following two subsections, we describe the purpose and structure of these components. Subsequently, we present and explain the overall structure of the method.
4.4.1 Ensemble of RAG agentic workflows: The RAG agentic workflows share identical structures but use different KBs. Each workflow consists of four agents: a patient summary agent that generates a summary of the patient’s data specifically tailored for syncope risk stratification; a binary classification agent that classifies the patient’s syncope as either cardiovascular or non-cardiovascular; a risk stratification agent that assigns the patient to one of three risk categories: low risk, intermediate risk, or high risk; a report revision agent that generates the final clinical risk stratification report.
Each workflow is associated with a specific KB, meaning that all agents within that workflow are RAG agents that retrieve information exclusively from the corresponding KB. The five RAG agentic workflows are combined into an ensemble by first converting the risk classes into integers (low risk - > 0, intermediate risk - > 1, high risk - > 2) and then averaging these integers to obtain an ensemble prediction. Finally, the ternary average prediction with possible values 0, 1, 2 is converted into the binary event prediction 0 (the adverse event will not occur), or 1 (the adverse event will occur) by using the following rule: if the ternary average prediction is greater or equal than 1 then the binary event prediction is 1. This rule embeds a conservative clinical principle into the algorithm, namely that, in the presence of uncertainty, the prediction should favor the worst plausible outcome to minimize the risk of missing potentially serious adverse events. Examples of ensemble prediction are shown in S1 Table of the Supporting Information. The contents of the five KBs are summarized in Table 1 below.
Table 1. Knowledge base documents.
| Name | Article |
|---|---|
| acc | 2017 ACC/AHA/HRS Guideline for the Evaluation and Management of Patients With Syncope [10] |
| esc | 2018 ESC Guidelines for the diagnosis and management of syncope [9] |
| utd | UpToDate: Approach to the adult patient with syncope in the emergency department [31] UpToDate: Syncope in adults: Management and prognosis [32] UpToDate: Syncope in adults: Risk assessment and additional diagnostic evaluation [33] |
| pup | Syncope: Classification and risk stratification [34] |
| sut | Risk stratification of syncope: Current syncope guidelines and beyond [35] |
The decision to use five different KBs containing a limited number of documents, rather than a single KB containing all documents, was made following preliminary RAG experiments, which clearly demonstrated the superiority of the ensemble approach. The first three documents were selected because they represent the de-facto reference documents for clinicians involved in syncope management. The remaining two papers are valuable review articles written by experts in syncope classification and risk stratification.
4.4.2 Decision tree classifiers: The predictions generated by the ensemble of RAG agentic workflow are used to augment the original tabular dataset. The resulting augmented dataset is then split into training and test datasets. The training dataset is used to train six different decision-tree classifiers: a classifier for the binary classification optimized for the MCC performance metric; a classifier for the binary classification optimized for the F2 score; a classifier for the binary classification optimized for the AUC; a classifier for the risk stratification optimized for the MCC performance metric; a classifier for the risk stratification optimized for the F2 score; a classifier for the risk stratification optimized for the AUC.
To reduce the risk of overfitting, the maximum depth of each decision tree was limited to four, meaning that each tree could perform at most four splits, thereby improving the generalizability of each leaf [36]. Furthermore, to mitigate class imbalance during training, higher weights were assigned to minority classes [36].
The performance of trained models depends on the specific dataset split used. To prevent generalization errors, we performed 100 different dataset splits (with different random seeds). The reported performance metrics correspond to the mean values obtained across all iterations.
Before training the classifiers, feature selection was performed by choosing the features that yielded the optimal result for a specific target metric (e.g., the F2 score for binary classification). We refer to this process as optimizing the feature set for the chosen metric. For example, when the features are selected to maximize the MCC, we say that the classifier is optimized for MCC or MCC-optimized.
Ideally, feature selection should be performed using a validation dataset. However, due to the size of our dataset, feature selection was performed using performance on the test dataset.
The main feature-selection steps were as follows:1) all numeric predictors are converted into categorical predictors according to clinically meaningful thresholds reported in the scientific literature. Specifically, age was converted into the variable ‘age>=65’; SBP (systolic blood pressure) into ‘SBP<90’; and HR (heart rate) into ‘HR<=50’ (mild-moderate bradycardia), and ‘HR>=100’ (tachycardia); 2) for each predictor (except for the predictor obtained from the RAG agentic workflows) we compute the performance score (MCC, F2 or AUC) with the outcome on the entire dataset; 3) predictors were tanked in descending order according to the performance score obtained in step 2; 4) the ten highest-ranked predictors were selected, and all possible subsets were explored to identify the subset that maximizes the target performance metric.
Shapley Additive exPlanations (SHAP) is one of the most widely used methods in the field of Explainable AI [37]. Based on game theory, SHAP can be applied to any ML model. In this study, SHAP was used to compute feature importance for features used by decision trees.
4.5 Method details
The overall study methodology is illustrated in Fig 2.
Fig 2. Overview of the study methodology.
The five embedding blocks are shown at the top (blue). The 5 + 1 RAG agentic workflows are shown in the middle (red). The six decision-tree pipelines are shown at the bottom (green). Cylinders represent data, while rounded boxes represent algorithms. The input datasets are the five KBs on the top left and the patient dataset. The output datasets are the agent-generated reports and the final clinical report.
At the top of the figure are five KB embedding blocks (in blue), one for each KB. Each block converts the textual content of the corresponding articles into dense vector representation. First the text is read from PDF files and converted into a structured (JSON) format using the docling library [38]. Next, the text is split into smaller chunks to facilitate processing. Finally, each chunk is transformed into a vector representation (embeddings) using the embedding model BAAI/bge-base-en-v1.5 [39].
The main patient dataset corresponds to the tabular dataset described in a previous study [15]. This dataset serves as input to both the RAG agentic workflows and the decision-tree classifiers.
The RAG workflows require tabular data serialization, whereby structured tabular information is converted into textual form to enable processing by language models. Input features of the RAG workflows were all the serialized variables of the dataset (see S3 Table). In contrast, the decision-tree operates directly on the original tabular data. Importantly, serialization enriches tabular data with semantic context, thereby improving its interpretability by language models. Moreover, the decision-tree classifiers do not rely solely on the raw tabular variables, they also incorporate the ensemble predictions produced by the RAG agentic workflows as additional input features. Another key distinction between the two components is that the RAG agentic workflows operate in a zero-shot setting. Specifically, they are not trained on patient data and are not provided with examples of the correct output. Consequently, they do not require a train/test split. In this sense, the RAG workflows represent a priori knowledge (i.e., domain expertise encoded in external knowledge bases), whereas the decision tree classifiers represent a posteriori knowledge, as they are trained directly on patient data.
4.6 Ablation studies
Two ablation studies were conducted to evaluate the contributions of the agentic workflows to the overall prediction framework. The first examined the contribution of individual agentic workflows to the agentic ensemble risk predictions. The second assessed the contribution of agentic predictions to the performance of the decision tree classifiers.To assess the contribution of each of the five agentic RAG workflows, a leave-one-class-out analysis was performed. For each analysis, one pipeline was excluded. Ternary predictions of the remaining four workflows were used to calculate the final binary prediction as previously reported. AUCs of the ablated models were compared to the full agentic pipeline.To evaluate the contribution of agentic predictions to decision tree performance, a model incorporating agentic predictions as input features were compared with one model trained exclusively on patient features. This comparison was conducted for both binary classification and risk stratification using the best MCC, F2 score, and AUC scores as performance metrics. The model incorporating agentic predictions was designated as with agentic predictions (WAP), whereas the model excluding these predictions was designated as without agentic predictions (No-WAP). To ensure comparability, both models were evaluated across 100 train–test splits generated using the same set of 100 random seeds.
Results
1. Characteristics of the study population and 30-day adverse events
Table 2 summarizes the main demographics characteristics, ECG findings, the number of 30-day adverse events according to syncope etiology, and the number of cardiovascular and non-cardiovascular syncopal events based on expert clinical assessment of the 266 enrolled patients. Complete clinical characteristics are reported in S2 Table of the Supporting Information. At the 30-day follow-up, 45 (16.9%) patients experienced one adverse event, including three deaths. Based on the review of all available clinical data and 30-day adverse events, approximately 20% of syncopal episodes were judged to be of cardiovascular etiology (Table 2). Diagnostic features and outcomes for each patient with cardiovascular syncope are further detailed in Table 3.
Table 2. Characteristics of enrolled patients.
| Population characteristics, outcomes and syncope etiology | n (%) or median (IQR) |
|---|---|
| Patients enrolled | 266 |
| Patient characteristics Sex (male) Age (years) Admitted to hospital | 139 (52.3) 73 (58-83) 90 (33.8) |
| ECG findings * Normal Non-sinus rhythm (new) New (or previously unknown) left bundle branch block Bifascicular block Bifascicular block + first degree AV block High-grade (second-degree type 2 or third-degree) AV block Sinus bradycardia (≤ 50 bpm) Prolonged QTc (>450 ms) Brugada ECG pattern Arrhythmogenic right ventricular cardiomyopathy ECG changes consistent with acute ischemia | 224 (86.8) 12 (4.6) 8 (3.1) 2 (0.78) 8 (3.1) 3 (1.2) 11 (4.3) 5 (1.9) 1 (0.39) 0 (0) 0 (0) |
| 30-day adverse events Non-cardiovascular events Cardiovascular events Deaths | 13 (4.9) 29 (10.9) 3 (1.1) |
| Syncope etiology Non-cardiovascular Cardiovascular | 213 (80.1) 53 (19.1) |
* More than one alteration may be present in each single abnormal ECG at the same time. ECG results were available for 258 patients.
AV block indicates atrioventricular block; ECG, electrocardiogram. Descriptive data are presented as numbers and percentages for categorical variables.
Table 3. Clinical features, ECG and outcomes of patients diagnosed with cardiovascular syncope.
| Patients | Diagnostic factors | Outcome | Notes |
|---|---|---|---|
| # 1 | History of ischemic heart disease; sitting syncope; non-sinus rhythm (new or unknown); bradycardia | 7-day PM implantation | Atrial tachycardia with 2:1 block |
| # 2 | History of ischemic heart disease; chest pain | 30-day PM implantation | AF |
| # 3 | History of ischemic heart disease; chest pain; non-sinus rhythm (new or unknown); | – | AF |
| # 4 | Chest pain; palpitations | – | AF |
| # 5 | History of ischemic heart disease | 30-day PM implantation | Discharged from ED |
| # 6 | Sitting syncope; non-sinus rhythm (new or unknown); bradycardia | 7-day PM implantation | Sick sinus syndrome |
| # 7 | Supine syncope; palpitations; II-III° AVB | – | Mobitz1 type II AVB |
| # 8 | Sitting syncope; non-sinus rhythm (new or unknown); LBBB (new or unknown); bradycardia | – | AF with RVR |
| # 9 | History of ischemic heart disease; sitting syncope; | 7-day PM malfunction with pauses | – |
| # 10 | Non-sinus rhythm (new or unknown) | – | AF with RVR |
| # 11 | Non-sinus rhythm (new or unknown) | 7-day PM implantation | Sick sinus syndrome, AF |
| # 12 | History of ischemic heart disease and heart failure; EF < 40%; ICD | 7-day ventricular fibrillation | – |
| # 13 | – | 7-day myocardial infarction | Ventricular tachycardia |
| # 14 | History of ischemic heart disease and heart failure; EF < 40%; bifascicular block+ I° AVB | – | No criteria for alternative etiology |
| # 15 | Chest pain; palpitations | 7-day PM implantation | Paroxysmal AF |
| # 16 | History of ischemic heart disease; EF < 40%; supine syncope | – | No criteria for alternative etiology |
| # 17 | Supine syncope; chest pain; | 7-day cerebrovascular event | – |
| # 18 | Family history of sudden cardiac death; bradycardia | 7-day PM implantation | AF with SVR |
| # 19 | History of ischemic heart disease; palpitations; ICD (ventricular fibrillation); LBBB (new) | 7-day death | Fatal myocardial infarction |
| # 20 | Non-sinus rhythm (new or unknown) | – | AF with SVR |
| # 21 | Severe bradycardia; II-III° AV block | 7-day PM implantation | – |
| # 22 | History of ischemic heart disease; exertional syncope | 7-day PM implantation | Severe bradycardia |
| # 23 | – | 7-day PM implantation | Sick sinus syndrome, AF |
| # 24 | Sitting syncope | 7-day PM implantation | III° AV block |
| # 25 | Non-sinus rhythm (new or unknown) | – | AF with RVR |
| # 26 | Bifascicular block+ I° AVB | 7-day PM implantation | – |
| # 27 | Family history of sudden cardiac death | 7-day PM implantation | – |
| # 28 | – | 7-day pulmonary embolism | – |
| # 29 | Sitting syncope; long QT; bradycardia | 30-day PM implantation | Sick sinus syndrome |
| # 30 | History of ischemic heart disease; palpitations | – | No criteria for alternative etiology |
| # 31 | Sitting syncope; chest pain; palpitations | – | No criteria for alternative etiology |
| # 32 | Palpitations | 30-day PM implantation | III° AV block |
| # 33 | Sitting syncope | 7-day PM implantation | Cardiac pause > 3 seconds |
| # 34 | Sitting syncope; bifascicular block+ I° AVB | – | – |
| # 35 | Severe bradycardia | 7-day PM implantation | – |
| # 36 | History of ischemic heart disease; bifascicular block+ I° AVB | 7-day PM implantation | – |
| # 37 | Bifascicular block+ I°AVB | – | Paroxysmal AF |
| # 38 | History of ischemic heart disease; aortic stenosis; hypertrophic cardiomyopathy; severe bradycardia | – | – |
| # 39 | Chest pain; non-sinus rhythm (new or unknown) | – | AF |
| # 40 | History of ischemic heart disease; sitting syncope | 7-day PM implantation | LBBB (new onset) |
| # 41 | History of ischemic heart disease and heart failure | – | AF at 7-day follow up |
| # 42 | History of ischemic heart disease and heart failure | – | AF at 7-day follow up |
| # 43 | Family history of sudden cardiac death; supine syncope; palpitations | – | Ascending aortic dilation; no criteria for alternative etiology |
| # 44 | History of ischemic heart disease; bifascicular block | – | RBBB + LAFB |
| # 45 | Severe bradycardia; II°-III° AV block | 7-day PM implantation | – |
| # 46 | – | 7-day II°-III°AV block | – |
| # 47 | Sitting syncope; tachycardia | 7-day PM implantation | 7-day cardiac pause > 3 s |
| # 48 | Non-sinus rhythm (new or unknown) | – | AF |
| # 49 | History of ischemic heart disease | 7-day PM implantation | – |
| # 50 | Sitting syncope | 7-day cardiac pause > 3 s | – |
| # 51 | Moderate bradycardia; history of ventricular tachycardia | – | No criteria for alternative etiology |
| # 52 | History of ischemic heart disease; sitting syncope; LBBB (new onset) | – | Paroxysmal AF; no criteria for alternative etiology |
| # 53 | LBBB (new or unknown) | 30-day III°AV block | – |
PM indicates pacemaker; ED, emergency department; AVB, atrioventricular block; LBBB, left bundle branch block; RVR, rapid ventricular response; AF, atrial fibrillation; EF, ejection fraction; SVR, slow ventricular response; ICD, implantable cardioverter defibrillator; QT, QT interval; RBBB, right bundle branch block; LAFB, left anterior fascicular block.
2. Models performance
The models performance metrics for syncope classification and risk stratification (i.e., prediction of syncope 30-day adverse events) are summarized in Table 4.
Table 4. Models performance in syncope classification and risk stratification.
| MCC (mean) | F2 (mean) | Recall (mean) | Precision (mean) | Accuracy (mean) | Specificity (mean) | AUC (mean) | ECE (mean) | |
|---|---|---|---|---|---|---|---|---|
| Binary classification MCC optimized | 0.5740 | 0,6084 | 0.6000 | 0,7152 | 0.8752 | 0.9377 | 0.7845 | 0.2243 |
| Binary classification F2 optimized | 0.4835 | 0.6626 | 0.7380 | 0.4957 | 0.7985 | 0.8122 | 0.7969 | 0.1363 |
| Binary classification AUC optimized | 0.4880 | 0.6283 | 0.6720 | 0.5350 | 0.8219 | 0.8560 | 0.8338 | 0.1386 |
| Risk stratification MCC optimized | 0.4343 | 0.5598 | 0.5828 | 0.5063 | 0.7982 | 0.8751 | 0.6930 | 0.2252 |
| Risk stratification F2 optimized | 0.2969 | 0.6001 | 0.8529 | 0.2871 | 0.5802 | 0.5224 | 0.7224 | 0.2198 |
| Risk stratification AUC optimized | 0.3089 | 0.5520 | 0.6743 | 0.3424 | 0.6587 | 0.7000 | 0.7679 | 0.1896 |
Performance metrics over 100 random dataset splits. By optimization, we refer to selecting features that result in the highest performance metric value.
Fig 3 presents the ROC curves for the MCC-optimized decision-tree models used for syncope binary classification and risk stratification.
Fig 3. ROC curves for the decision tree pipeline for syncope binary classification (left) and syncope risk stratification (right), both optimized for MCC performance metric.
The left plot shows the averages obtained out of 100 random train/test data splits (blue curve) and the standard deviations (green lines). By optimization, we refer to selecting features that result in the highest MCC value. The right plot shows the averages obtained from 100 random train/test data splits (blue curve) together with the corresponding standard deviations (green lines).
The figures showing the remaining pipelines are provided in Supporting Information (see S1-S4 Figs). Summary plots of SHAP values for each of the six decision-tree pipelines, illustrating the contribution of individual features to model predictions, are shown in S5-S10 Figs in the Supporting Information. S4 Table summarizes the acronyms of each selected feature with its definition.
3. Ablation studies
AUC of the full agentic pipeline and the ablated pipeline are reported in Table 5. Discrimination of the agentic pipelines remained stable across the ablation study. Only the exclusion of the ESC syncope guideline pipeline significantly reduced the discrimination of the agentic predictions.
Table 5. Agentic pipeline performance and ablation study.
| Excluded pipeline | Reference | AUC | p value |
|---|---|---|---|
| Full pipeline | 0.68 | – | |
| ACC syncope guideline | 0.66 | 0.5166 | |
| UpToDate syncope management | 0.65 | 0.2120 | |
| ESC syncope guideline | 0.60 | 0.0128 | |
| Puppala et.al | 0.64 | 0.1185 | |
| Sutton et.al | 0.64 | 0.1575 |
ACC, American College of Cardiology; ESC, European society of cardiology; AUC, area under the curve
AUC, MCC and F2 performances of the decision trees including agentic predictions and without agentic predictions are presented in Table 6. Including agentic predictions in training decision trees improved performance across all metrics for both binary classification and risk stratification.
Table 6. Decision tree performance ablation study.
| WAP Tree | No-WAP Tree | Absolute Delta | Relative Delta (%) | |
|---|---|---|---|---|
| Binary classification MCC optimized | 0.5740 | 0.2201 | +0.3539 | 160.79 |
| Binary classification F2 optimized | 0.6626 | 0.4153 | +0.2473 | 59.55 |
| Binary classification AUC optimized | 0.8304 | 0.7394 | +0.0910 | 12.31 |
| Risk stratification MCC optimized | 0.4343 | 0.2422 | +0.1921 | 79.31 |
| Risk stratification F2 optimized | 0.6001 | 0.4800 | +0.1201 | 25.02 |
| Risk stratification AUC optimized | 0.7679 | 0.6412 | +0.1267 | 19.76 |
WAP, with agentic predictions; No-WAP, without agentic predictions
4. Architecture overview and proposed CDSS use workflow
An overview of the proposed workflow for syncope management in the ED is provided in Fig 4.
Fig 4. Proposed CDSS for syncope management.
Architectural overview of AI components.
The figure shows the main process actors (patient, triage operator, and physician), AI-supported tasks (syncope identification, tabular data extraction, syncope classification, risk stratification), and data (triage data, EHR data, tabular data and clinical reports).
From the clinical perspective, the first step is the identification of patients who have experienced a loss of consciousness of syncopal origin. The subsequent step involves extracting relevant clinical information from the patient’s EHR. This includes retrieving both structured data (e.g., age) and unstructured data (e.g., the patient’s position and activity at the time of syncope onset). The extracted data are then used for syncope classification and risk stratification tasks.
Fig 5 illustrates a proposed workflow describing how ED doctors may incorporate the syncope classification and risk stratification outputs into clinical decision-making. Following the initial patient evaluation, the physician should first review the patient’s data and select the preferred performance metric (e.g., MCC). Next, the automatically predicted syncope diagnosis and 30-day risk of adverse events are to be examined. At this point, the physician may use the model explanations to assess the plausibility of the prediction. This process begins with examination of the corresponding decision tree (see example below) and, if necessary, may be complemented by reviewing the clinical reports generated by the RAG agentic workflow pipelines.
Fig 5. Proposed workflow for physician use of the CDSS developed in this study.
4.1 Choice of the decision tree pipeline.
To maintain the ED doctor “into the loop” [40,41], the final decision is left to the clinician whether to opt for a balanced prediction (equal weighting of recall and precision) or a sensitive prediction (recall weighted twice as much as precision). The first approach may be preferred when both confirmation and exclusion of a diagnosis are considered equally important. The second may be more appropriate when minimizing the false-negative rate is a priority, thereby increasing the safety of discharge decisions. Based on the selected strategy, the system provides both a syncope classification (cardiovascular vs. non-cardiovascular) and a prediction of 30-day adverse events (event vs. no event). Because these predictions are generated using a decision-tree classifier, the corresponding decision trees can be visualized to explain the rational underlying the prediction. A portion of a decision tree produced by our algorithmic pipeline is shown in Fig 6.
Fig 6. MCC-optimized decision tree for syncope risk stratification.
This figure shows an example of an MCC-optimized decision tree for risk stratification. The decision tree improves the performance of the RAG agentic pipelines, increasing the MCC from 0.4163 to 0.5599.
The right side of the graph indicates that if the patient has a history of AMI, PTCA, or CABG, then only the risk stratification agent’s predictions are used. In this case, a “no event” prediction is made for 7.5% of samples, and an “event” prediction for 8.8% of samples. Conversely, if the patient does not have a history of AMI, PTCA, or CABG, heart rate is evaluated. If the heart rate is below 50 BPM (indicative of moderate bradycardia), an adverse event is expected. If the heart rate is above 50 BPM, gender is considered: for males, a “no event” is predicted, while for females, the risk stratification agent should be used to make the prediction.
4.2 The clinical reports.
One of the input variables used by the decision-tree classifiers is the prediction generated by an ensemble of five RAG agentic workflows (one for each of the reference KBs). Fig 7 shows an example of clinical report generated by one of these workflows.
Fig 7. Example of clinical report generated by one of the RAG agentic workflow.
In routine clinical practice, particularly when evaluating patients with intermediate-risk features, the predictions generated by individual workflows may either agree with or differ from the prediction produced by the decision-tree classifier. Depending on whether the clinician wishes to seek confirmatory evidence or explore alternative interpretations, they may review the reports generated by workflows that are either concordant or discordant with the decision-tree prediction. Fig 8 illustrates this concept by presenting reports that assign the same etiology but different risk profiles to the same clinical case.
Fig 8. Example of clinical reports generated by different RAG agentic workflows on the same syncope patient.
Discussion
In the present study, we developed optimized decision-tree models trained on LLM-augmented datasets that were capable of classifying syncope by etiology (cardiovascular vs. non-cardiovascular) with good discriminative performance (MCC 0.5740, AUC 0.7845). Since etiology is the primary prognostic determinant in syncope risk stratification [9,10], the ability to automatically identify cardiovascular syncope may provide substantial support for clinical decision-making, especially in the emergency setting.
Regarding the prediction of 30-day adverse events, the present MCC-optimized model achieved performance comparable to that of the hybrid model developed in our previous study [15] using the same patient population (MCC 0.4343 versus 0.4300, respectively), while substantially improving operational efficiency. In the previous hybrid model, explicit expert intervention was required to identify clinically relevant decision rules. In the present approach, this process was replaced by automated RAG agentic workflows, resulting in a significant reduction in both development time and human involvement. Importantly, the physician remains central to the decision-making process and retains full responsibility for the management of patients presenting with syncope.
Syncope risk prediction poses several inherent methodological challenges that must be considered when interpreting the performance of any predictive model. Because prognosis is largely determined by the underlying etiology, composite outcomes are necessary to capture the broad spectrum of adverse events associated with the various conditions that may manifest as syncope [9]. However, this complexity comes at a methodological cost: predictors must simultaneously capture risk signals across multiple etiologies, while the relatively low incidence of adverse events limits the number of predictors that can be reliably incorporated into a model. Consequently, predictive performance may be inherently lower than that observed in models designed to predict a single, well-defined outcome [42]. From a clinical perspective, however, the use of a composite outcome is particularly relevant to emergency medicine practice, where physicians must rapidly identify patients at risk of short-term adverse events in order to guide immediate management decisions. In this context, identifying high-risk patients helps maintain potentially life-threatening conditions within the differential diagnosis and supports a more cautious approach to discharge decisions.
The present study represents the culmination of a stepwise research program aimed at developing AI-based tools for syncope diagnosis and risk stratification. Previous investigations conducted by our group [12,14,15] provided the foundation for the current work, whose ultimate objective was the development of a CDSS for physicians managing patients with syncope in the ED.
A CDSS is generally defined as any software designed to directly assist doctors in clinical decision making by matching patients-specific characteristics with a computerized knowledge-based algorithm to generate individualized assessments or recommendations. These outputs are then presented to clinicians for consideration [43]. Contemporary CDSSs are primarily used at the point-of-care through web-based applications or integration with EHRs, helping clinicians combine their knowledge with information provided by the CDSS itself. Increasingly, however, CDSSs are being developed to leverage information that may be difficult or impossible for humans to recognize directly [44]. These non-knowledge-based CDSSs still require a data source, but the decision leverages ML techniques or statistical pattern recognition rather than being programmed to follow pre-defined rules [44,45]. Possible functions and benefits that a CDSS can provide the clinician with may include reducing the incidence of medication/prescribing errors and adverse events, facilitating adherence to guidelines, supporting follow-up and treatment reminders, reducing healthcare costs by minimizing testing or order duplication, providing diagnostic support through analysis of patient data, medical images, and laboratory findings, and improving workflow efficiency through automated extraction and visualization of information contained within EHRs [44].
The clinical decision-making process for syncope management in the ED is particularly vulnerable to diagnostic uncertainty and several potential pitfalls [9,10]. First, syncope is a symptom shared by a wide range of clinical conditions characterized by markedly different etiologies, incidence rates, and prognoses. Consequently, establishing the correct etiological diagnosis is essential for selecting appropriate diagnostic investigations and therapeutic strategies. Second, for patients who remain undiagnosed after the initial evaluation [9,10], an accurate prognostic stratification is necessary to promptly identify patients with high-risk syncope who may require hospitalization and urgent treatment. Third, the diagnostic process should promote the appropriate use of second-level investigations in order to avoid unnecessary testing, resource waste, and potential patient harm [46]. Finally, the clinical decision-making process should result in the implementation of the most appropriate treatment according to the underlying cause of syncope.
To date, only few preliminary studies have proposed knowledge-based CDSSs for the application of clinical guidelines [47–49] or risk scores [50] in the management of syncope in the ED. In the absence of adequate dissemination and implementation [50,51] in clinical practice as well as external validation, the effective benefits of these software programs on patient’s clinical outcome and on the optimization of the diagnostic-therapeutic pathway remains uncertain.
To the best of our knowledge, the current study represents the first attempt to develop a non-knowledge-based CDSS for syncope management in the emergency setting. We first described how the AI components of this and previous studies from our group [12] can be integrated into an AI-supported workflow for syncope management in the ED. We then outlined how physicians may use the explanations generated by the system to support and enhance their diagnostic reasoning. Importantly, our approach deliberately maintains the physician “in the loop,” in accordance with the principles proposed by Dipaola et al. [40].
A distinctive feature of the proposed system is its ability to adapt to the performance priorities of individual clinicians. In the ED, the relative importance of sensitivity and specificity may vary according to the clinical decision being considered. For instance, during the initial evaluation of a patient, maximizing sensitivity may be desirable to minimize the risk of overlooking high-risk individuals. Conversely, when deciding whether to admit a patient for further investigation, maximizing specificity may be more important in order to avoid unnecessary hospitalizations. To address these differing needs, the proposed system incorporates multiple predictive pipelines optimized for different performance metrics, allowing physicians to select the configuration most appropriate for the specific clinical context. To our knowledge, this adaptive approach has not previously been described in AI systems developed for syncope management. By allowing clinicians to select the optimization target, the system supports individualized decision-making whilst preserving physician autonomy and judgement.
A critical assumption underlying the proposed framework is the completeness of the available clinical data. Unlike human clinicians, all software components developed in the present study operate exclusively on a static snapshot of patient information and cannot directly account for the temporal evolution of clinical findings. Consequently, predictions may change when new information becomes available or when previously collected information is revised. Although the RAG agentic workflows can operate with incomplete data, potentially at the expense of reduced performance, the decision-tree models require all input variables used during model development to be available. Whenever required information is missing, the system explicitly notifies the clinician. Data incompleteness may therefore delay or even preclude use of the system. Conversely, when all required information can be readily collected, the system may be applied at the conclusion of the ED evaluation to support clinical report generation, particularly with regard to syncope etiology and risk stratification.
One of the inputs used by the decision-tree classifier is the prediction generated by an ensemble of five RAG agentic workflows, each associated with a different reference KB. We found that decision tree performance improved in both classification and risk stratification tasks across all metrics, suggesting that agentic contributions can improve the overall system performance. Furthermore, among the KB, the European guidelines [9] were found to be the most important contributor to the agentic predictions. Since each workflow draws upon a distinct source of clinical knowledge, individual predictions may either agree with or differ from the final decision-tree prediction. Rather than representing a limitation, we believe this feature encourages active physician participation in the decision-making process and may prompt a more thorough reassessment of the clinical case. For example, as illustrated in Fig 8, seemingly minor details regarding the circumstances under which an atrioventricular block was identified, whether incidentally on a previous ECG, during overnight Holter monitoring, or during continuous monitoring in the ED following the syncopal event, may substantially influence the final clinical decision. In our context, the principal value of the system lies in its ability to enhance clinical reasoning rather than replace it. The availability of alternative explanations may help mitigate cognitive biases such as confirmation bias and denial bias. Confirmation bias refers to the tendency to accept a system’s recommendation without sufficient critical appraisal, whereas denial bias refers to the tendency to reject recommendations solely because they originate from an automated system [52].
A key conceptual strength of the proposed framework lies in the complementary nature of its two algorithmic components. Decision-tree models derive predictive relationships exclusively from the training data, whilst LLM-based models integrate broader clinical knowledge through pre-existing training and retrieval-augmented generation (RAG). By combining these approaches, the system bridges empirical, data-driven patterns with established medical literature. Importantly, this integration is not intended merely to improve predictive performance, but also to support physician reasoning. Decision trees identify the clinical variables that most strongly influence predictions, whereas the RAG-generated reports provide explanations in a format that is familiar to clinicians. Together, these complementary outputs encourage consideration of alternative diagnostic pathways and promote critical reflection, ultimately supporting more informed clinical judgement rather than replacing it.
Study limitations
The main limitation of the current study is the lack of external validation, which precludes definitive conclusions regarding the generalizability of our findings. Future investigations are therefore warranted to validate the proposed algorithms in independent patient populations and clinical settings. A second limitation is that the predictive framework relies on the integration of LLM-based components with decision-tree classifiers. Although this hybrid approach enhances explainability and provides clinically interpretable outputs, it also increases the overall complexity of the system, which may limit its implementation and usability in routine clinical practice. An additional limitation concerns the feature selection process. Owing to the relatively small sample size, feature selection was performed on the entire dataset rather than on a dedicated validation set, thereby introducing a potential risk of overfitting. To mitigate this issue, we adopted a zero-shot learning approach for the RAG agentic workflows and restricted the maximum depth of the decision trees to four levels. Nevertheless, external validation on an independent cohort remains essential to confirm the model’s generalizability.
Conclusions
We developed LLMs-based models capable of classifying syncope according to etiology (cardiovascular vs. non-cardiovascular) and predicting 30-day adverse events with good discriminative performance. Furthermore, the proposed workflow enables physicians to leverage the explainability features of the models to critically assess the quality of the predictions, thus supporting clinical reasoning and potentially reducing cognitive biases. These findings provide a promising foundation for the development of an efficient AI-supported CDSS for the management of patients presenting with syncope in the ED.
Future research areas will necessarily have to address the external validation of the proposed predictive models and the systematic evaluation of the quality of the clinical reports generated by the LLMs and of their actual impact on the emergency physician clinical judgment.
References
- Kirubarajan A, Taher A, Khan S, Masood S. Artificial intelligence in emergency medicine: A scoping review. J Am Coll Emerg Physicians Open. 2020;1(6):1691–702. doi: 10.1002/emp2.12277
- Masoumian Hosseini M, Masoumian Hosseini ST, Qayumi K, Ahmady S, Koohestani HR. The aspects of running artificial intelligence in emergency care; A scoping review. Arch Acad Emerg Med. 2023;11(1):e38. doi: 10.22037/aaem.v11i1.1974
- Preiksaitis C, Ashenburg N, Bunney G, Chu A, Kabeer R, Riley F. The role of large language models in transforming emergency medicine: Scoping review. JMIR Med Inform. 2024;12. doi: 10.2196/53787
- Thirunavukarasu AJ, Ting DSJ, Elangovan K, Gutierrez L, Tan TF, Ting DSW. Large language models in medicine. Nat Med. 2023;29(8):1930–40. doi: 10.1038/s41591-023-02448-8
- Williams CYK, Zack T, Miao BY, Sushil M, Wang M, Kornblith AE, et al. Use of a large language model to assess clinical acuity of adults in the emergency department. JAMA Netw Open. 2024;7. doi: 10.1001/JAMANETWORKOPEN.2024.8895
- Williams CYK, Bains J, Tang T, Patel K, Lucas AN, Chen F, et al. Evaluating large language models for drafting emergency department encounter summaries. PLOS Digit Health. 2025;4(6):e0000899. doi: 10.1371/journal.pdig.0000899
- Williams CYK, Miao BY, Kornblith AE, Butte AJ. Evaluating the use of large language models to provide clinical recommendations in the Emergency Department. Nat Commun. 2024;15(1):8236. doi: 10.1038/s41467-024-52415-1
- van Zanten S, Boel TT, de Jong JS, Bais B, Fedorowski A, Sutton R, et al. Clinical decision-making of artificial intelligence vs medical professionals in patients with syncope. JACC Adv. 2026;5(1):102426. doi: 10.1016/j.jacadv.2025.102426
- Brignole M, Moya A, de Lange FJ, Deharo J-C, Elliott PM, Fanciulli A, et al. 2018 ESC guidelines for the diagnosis and management of syncope. Eur Heart J. 2018;39(21):1883–948. doi: 10.1093/eurheartj/ehy037
- Shen W-K, Sheldon RS, Benditt DG, Cohen MI, Forman DE, Goldberger ZD, et al. 2017 ACC/AHA/HRS guideline for the evaluation and management of patients with syncope: A report of the American College of Cardiology/American Heart Association Task force on clinical practice guidelines and the heart rhythm society. J Am Coll Cardiol. 2017;70(5):e39–110. doi: 10.1016/j.jacc.2017.03.003
- Reed MJ, Karuranga S, Kearns D, Alawiye S, Clarke B, Möckel M, et al. Management of syncope in the Emergency Department: A European prospective cohort study (SEED). Eur J Emerg Med. 2024;31(2):136–46. doi: 10.1097/MEJ.0000000000001101
- Levra AG, Gatti M, Mene R, Shiffer D, Costantino G, Solbiati M, et al. A large language model-based clinical decision support system for syncope recognition in the emergency department: A framework for clinical workflow integration. Eur J Intern Med. 2025;131:113–20. doi: 10.1016/j.ejim.2024.09.017
- Devlin J, Chang M-W, Lee K, Toutanova K. BERT: Pre-training of deep bidirectional transformers for language understanding. In: Proceedings of the 2019 Conference of the North American chapter of the association for computational linguistics: Human language technologies, Volume 1 (Long and short papers), 2019. 4171–86. https://doi.org/10.18653/v1/n19-1423
- Dipaola F, Gatti M, Pacetti V, Bottaccioli AG, Shiffer D, Minonzio M, et al. Artificial intelligence algorithms and natural language processing for the recognition of syncope patients on emergency department medical records. J Clin Med. 2019;8(10):1677. doi: 10.3390/jcm8101677
- Dipaola F, Gatti M, Menè R, Shiffer D, Giaj Levra A, Solbiati M, et al. A hybrid model for 30-day syncope prognosis prediction in the emergency department. J Pers Med. 2023;14(1):4. doi: 10.3390/jpm14010004
- Solbiati M, Dipaola F, Villa P, Seghezzi S, Casagranda I, Rabajoli F, et al. Predictive accuracy of electrocardiographic monitoring of patients with syncope in the emergency department: The SyMoNE multicenter study. Acad Emerg Med. 2020;27(1):15–23. doi: 10.1111/acem.13842
- Sun BC, McCreath H, Liang L-J, Bohan S, Baugh C, Ragsdale L, et al. Randomized clinical trial of an emergency department observation syncope protocol versus routine inpatient admission. Ann Emerg Med. 2014;64(2):167–75. doi: 10.1016/j.annemergmed.2013.10.029
- Sun BC, Thiruganasambandamoorthy V, Cruz JD, Consortium to Standardize ED Syncope Risk Stratification Reporting. Standardized reporting guidelines for emergency department syncope risk-stratification research. Acad Emerg Med. 2012;19(6):694–702. doi: 10.1111/j.1553-2712.2012.01375.x
- Costantino G, Sun BC, Barbic F, Bossi I, Casazza G, Dipaola F, et al. Syncope clinical management in the emergency department: A consensus from the first international workshop on syncope risk stratification in the emergency department. Eur Heart J. 2016;37(19):1493–8. doi: 10.1093/eurheartj/ehv378
- Chicco D, Jurman G. The advantages of the Matthews correlation coefficient (MCC) over F1 score and accuracy in binary classification evaluation. BMC Genomics. 2020;21(1):6. doi: 10.1186/s12864-019-6413-7
- Abdin M, Aneja J, Behl H, Bubeck S, Eldan R, Gunasekar S. Phi-4 Technical Report. 2024. doi: 10.48550/arXiv.2412.08905
- Lewis P, Perez E, Piktus A, Petroni F, Karpukhin V, Goyal N. Retrieval-augmented generation for knowledge-intensive NLP tasks. Adv Neural Inform Process Syst. 2020. doi: 10.48550/arXiv.2005.11401
- LangGraph. Accessed 2025 August 27. https://www.langchain.com/langgraph
- Paaß G, Giesselbach S. Foundation Models for Natural Language Processing -- Pre-trained Language Models Integrating Media. ArXiv. 2023. doi: 10.48550/arXiv.2302.08575
- OpenAI, Achiam J, Adler S, Agarwal S, Ahmad L, Akkaya I, et al. GPT-4 technical report. ArXiv. 2023. doi: 10.48550/arXiv.2303.08774
- Hannun A, Digani J, Katharopoulos A, Collobert R. MLX: An array framework for Apple silicon. GitHub. Accessed 2025 August 27. https://github.com/ml-explore/mlx
- BAAI/bge-base-en-v1.5. Accessed 2025 August 27. https://huggingface.co/BAAI/bge-base-en-v1.5
- Jin T, Jin R, Guang C, Suphavadeeprasit J, Quesnelle J. mlx-community/DeepHermes-3-Llama-3-8B-Preview-8bit. Accessed 2025 August 27. https://huggingface.co/mlx-community/DeepHermes-3-Llama-3-8B-Preview-8bit
- Chicco D, Jurman G. The Matthews correlation coefficient (MCC) should replace the ROC AUC as the standard metric for assessing binary classification. BioData Min. 2023;16. doi: 10.1186/S13040-023-00322-4
- Nixon J, Dusenberry M, Ghassen J, Nguyen T, Liu J, Zhang L. Measuring calibration in deep learning. ArXiv. 2019. doi: 10.48550/arXiv.1904.01685
- McDermott D, Quinn J. Approach to the adult patient with syncope in the emergency department. In: Zachrison K, Ganetsky M, editors. UpToDate. Wolters Kluwer.
- Benditt D. Syncope in adults: Management and prognosis. In: Kowey P, Yeon S, editors. UpToDate. Wolters Kluwer.
- Kowey P, Yeon S. Syncope in adults: Risk assessment and additional diagnostic evaluation. Wolters Kluwer.
- Puppala VK, Dickinson O, Benditt DG. Syncope: Classification and risk stratification. J Cardiol. 2014;63(3):171–7. doi: 10.1016/j.jjcc.2013.03.019
- Sutton R, Ricci F, Fedorowski A. Risk stratification of syncope: Current syncope guidelines and beyond. Auton Neurosci. 2022;238:102929. doi: 10.1016/j.autneu.2021.102929
- Decision Tree Classifier — scikit-learn 1.8.0 Documentation. Accessed 2026 May 25. https://scikit-learn.org/stable/modules/generated/sklearn.tree.DecisionTreeClassifier.html
- Salih A, Raisi-Estabragh Z, Galazzo IB, Radeva P, Petersen SE, Menegaz G. A perspective on explainable artificial intelligence methods: SHAP and LIME. Adv Intelligent Syst. 2024;7. doi: 10.1002/aisy.202400304
- Livathinos N, Auer C, Lysak M, Nassar A, Dolfi M, Vagenas P, et al. Docling: An Efficient Open-Source Toolkit for AI-Driven Document Conversion. ArXiv. 2025. doi: 10.48550/arXiv.2501.17887
- Xiao S, Liu Z, Zhang P, Muennighoff N, Lian D, Nie JY. C-Pack: Packed Resources For General Chinese Embeddings. arXiv.org. 2023. doi: 10.1145/3626772.3657878
- Dipaola F, Gebska MA, Gatti M, Levra AG, Parker WH, Menè R, et al. Will artificial intelligence be “Better” than humans in the management of syncope? JACC: Advances. 2024;3:101072. doi: 10.1016/J.JACADV.2024.101072
- Benanti P. Human in the loop. Mondadori Università; 2022.
- Olesen JB, Lip GYH, Hansen ML, Hansen PR, Tolstrup JS, Lindhardsen J, et al. Validation of risk stratification schemes for predicting stroke and thromboembolism in patients with atrial fibrillation: Nationwide cohort study. BMJ. 2011;342:d124. doi: 10.1136/bmj.d124
- Hunt DL, Haynes RB, Hanna SE, Smith K. Effects of computer-based clinical decision support systems on physician performance and patient outcomes: A systematic review. JAMA. 1998;280(15):1339–46. doi: 10.1001/jama.280.15.1339
- Sutton RT, Pincock D, Baumgart DC, Sadowski DC, Fedorak RN, Kroeker KI. An overview of clinical decision support systems: Benefits, risks, and strategies for success. NPJ Digit Med. 2020;3:17. doi: 10.1038/s41746-020-0221-y
- Kim S, Kim E-H, Kim H-S. Physician knowledge base: Clinical decision support systems. Yonsei Med J. 2022;63(1):8–15. doi: 10.3349/ymj.2022.63.1.8
- Canzoniero JV, Afshar E, Hedian H, Koch C, Morgan DJ. Unnecessary hospitalization and related harm for patients with low-risk syncope. JAMA Intern Med. 2015;175(6):1065–7. doi: 10.1001/jamainternmed.2015.0945
- Amin S, Gupta V, Du G, McMullen C, Sirrine M, Williams MV, et al. Developing and demonstrating the viability and availability of the multilevel implementation strategy for syncope optimal care through engagement (MISSION) syncope app: Evidence-based clinical decision support tool. J Med Internet Res. 2021;23(11):e25192. doi: 10.2196/25192
- Brignole M, Ungar A, Bartoletti A, Ponassi I, Lagi A, Mussi C, et al. Standardized-care pathway vs. usual management of syncope patients presenting as emergencies at general hospitals. Europace. 2006;8(8):644–50. doi: 10.1093/europace/eul071
- Del Rosso A, Ungar A, Maggi R, Giada F, Petix NR, De Santo T, et al. Clinical predictors of cardiac syncope at initial evaluation in patients referred urgently to a general hospital: The EGSYS score. Heart. 2008;94(12):1620–6. doi: 10.1136/hrt.2008.143123
- Rouleau G, Thiruganasambandamoorthy V, Wu K, Ghaedi B, Nguyen PA, Desveaux L. Developing implementation strategies to support the uptake of a risk tool to aid physicians in the clinical management of patients with syncope: Systematic theoretical and user-centered design approach. JMIR Hum Factors. 2023;10:e44089. doi: 10.2196/44089
- Li J, Smyth SS, Clouser JM, McMullen CA, Gupta V, Williams MV. Planning implementation success of syncope clinical practice guidelines in the emergency department using CFIR framework. Medicina (Kaunas). 2021;57(6):570. doi: 10.3390/medicina57060570
- Elston DM. Confirmation bias in medical decision-making. J Am Acad Dermatol. 2020;82(3):572. doi: 10.1016/j.jaad.2019.06.1286