TL;DR
This paper introduces a multi-agent Large Language Model (LLM) ensemble framework designed to automate the large-scale annotation of unstructured clinical text while mitigating model hallucinations. By combining seven diverse open-source LLMs with a structured voting mechanism, the system successfully annotated over 623,000 ECG reports for atrial fibrillation with 98% accuracy. This approach effectively compresses an estimated 6.8 person-years of manual clinical labor into just two weeks of compute time.
What Problem Does This Paper Address?
Supervised deep learning models hold immense promise for clinical risk prediction and automated diagnosis. However, training these models requires massive volumes of high-quality, annotated data. In healthcare, vital diagnostic insights are frequently locked away in unstructured, free-text electronic health records (EHRs), such as electrocardiogram (ECG) text reports.
Manual annotation by medical experts is the gold standard, but it is notoriously slow, expensive, and prone to inter-observer inconsistency. While individual LLMs can automate text classification, they suffer from "hallucinations"—generating plausible-sounding but factually incorrect or self-contradictory medical assertions. In a high-stakes clinical domain, these errors limit the reliability of single-model automation.
Methods
The authors developed a hybrid pipeline combining traditional rule-based filtering with an advanced multi-agent LLM ensemble workflow:
- Logical Filtering: To optimize compute resources, the team first applied regular expressions (regex) based on international cardiac guidelines (AHA/ACC) to screen the massive dataset. This step filtered out obviously irrelevant cases and isolated reports containing potential Atrial Fibrillation (AFib) or Atrial Flutter (AFL) terminology.
- Multi-Agent Architecture: Instead of relying on a single commercial model, the framework deploys a committee of seven distinct open-source LLMs (including variants of Llama3, Qwen, Gemma, Mistral, and Beluga) acting as independent "expert agents."
- Prompt Design & Postprocessing: The agents are given identical prompts to evaluate the cardiologist's assessment within the text and classify the confidence level into five initial categories (AF, Probable AF, Possible AF, Non-AF, Not Specified). A postprocessing step maps these into three final operational labels: AF, Non-AF, or Uncertain.
- Ensemble Voting: The final label is determined using a structured consensus rule (highest vote with a configurable winning threshold). If the models disagree sharply or fail to meet the consensus threshold, the case is safely routed to a human expert for "Review."
[Unstructured ECG Reports]
│
▼
[Logical Regex Filter] ──(89% Data Excluded as Non-AF)──► [Safe Automation]
│
(11% AF-Relevant)
▼
┌────────────────────────────────────────────────────────┐
│ Multi-Agent Ensemble (7 Open-Source LLMs) │
│ Agent 1 Agent 2 Agent 3 ... Agent 7 │
└────────────────────────────────────────────────────────┘
│
▼
[Structured Consensus Voting] ──(Below Threshold)──► [Human Expert Review]
│
(Above Threshold)
▼
[Final Structured Labels]
Datasets
- MIMIC-IV ECG Dataset: A massive corpus containing 623,566 unlabeled free-text clinical ECG reports.
- Expert-Labeled Subsets: The authors curated two gold-standard subsets from the data: AF200 (200 cases used for iterative prompt engineering) and AF600 (600 cases used strictly for testing performance).
- MIMIC-SDBH Dataset: A separate dataset containing 1,405 clinical social history notes, utilized to test the generalizability of the framework for extracting Social Determinants of Health (SDOH)—specifically employment and housing status.
Key Insights and Ideas
- The "Wisdom of the Crowd" Suppresses Hallucinations: The core philosophy is that while individual LLMs hallucinate due to differing training biases, the probability of multiple independent, diverse models fabricating the exact same clinical fact is vanishingly small. The ensemble architecture acts as a collaborative error-correction mechanism.
- Tactical Uncertainty Handling: By explicitly designing an "Uncertain" category and a flexible consensus threshold ($\theta$), the system mirrors real-world clinical ambiguity. Researchers can dynamically tune the threshold: higher thresholds maximize safety by routing complex cases to humans, while lower thresholds maximize pure automation.
- Cost-Effective Open-Source Deployment: The authors demonstrated that an ensemble of strategically selected open-source models can match or exceed the accuracy of top-tier commercial models like GPT-4o, providing a highly cost-effective, private solution for sensitive hospital data.
Key Results
- High Annotation Accuracy: On the ECG test dataset, the ensemble method achieved 98.2% accuracy and an F1-score of 98.1% at a practical 50% consensus threshold, outperforming specialized medical models (Meditron-70b) and individual component LLMs.
- Massive Efficiency Gains: The pipeline successfully processed the entire dataset in approximately two weeks (347 hours) on a single Nvidia A100 GPU node. In contrast, manual labeling by a cardiologist was estimated to take 6.83 person-years for the full corpus.
- Strong Generalizability: When applied to the completely different task of identifying SDOH from clinical notes, the framework achieved 95% accuracy for employment status and 99.7% accuracy for housing status.
- Quantifiable Hallucination Reduction: The study categorized four distinct types of LLM hallucinations (fabricated facts, uncertainty confusion, term misunderstandings, and self-contradictions) and proved that the ensemble voting mechanism effectively neutralized these errors.
Limitations and Future Work
- Residual Hallucinations: While the ensemble significantly mitigates errors, complete elimination of hallucinations remains challenging when encountering highly convoluted, ambiguous, or poorly written clinical narratives.
- Filter Bias: The initial rule-based regex filter relies on standard clinical terminology guidelines. If a clinician documents a diagnosis using highly irregular or non-standard phrasing, the filter might introduce bias by missing the case entirely.
- Single-Center Validation: The methodology was validated using datasets derived exclusively from the MIMIC ecosystem; testing on external datasets from different healthcare systems is required to confirm broader clinical generalizability.
- Future Directions: The authors suggest exploring more complex agent interactions, such as multi-agent debate protocols, and developing adaptive voting schemes that assign higher weights to agents that prove highly accurate at specific sub-tasks.
Summary updated