MedGuards: Multi-Agent System for Reliable Medical Error Detection and Correction

Congbo Ma, Hu Wang, Yichun Zhang, Farah E. Shamout · Submission to ICLR 2026 · Rejected

This blog-style summary provides a technical overview of the paper "MedGuards: Multi-Agent System for Reliable Medical Error Detection and Correction," currently under review for ICLR 2026.

TL;DR

MedGuards is a multi-agent framework that acts as a safety guardrail for medical AI, decomposing the complex task of error detection and correction into specialized stages of detection, localization, and correction. By using a confidence-guided arbitration mechanism to resolve agent disagreements, the system significantly improves the reliability and interpretability of LLMs in clinical settings without requiring any additional model training.

What Problem Does This Paper Address?

Large Language Models (LLMs) are increasingly used to draft clinical notes and provide diagnostic assistance. However, their tendency to "hallucinate" or make subtle factual errors poses a significant risk to patient safety. A single wrong drug name or an incorrect lab value interpretation can have dire consequences.

Existing error-correction methods often rely on simple heuristic checks or single-model prompts that fail to generalize across different medical datasets. Furthermore, standard evaluation metrics like BLEU or ROUGE treat every word equally. In a medical context, missing a specific pathogen name (e.g., Schistosoma mansoni) is a much more critical failure than missing a common preposition, yet standard metrics might still assign a high similarity score to the erroneous text. The authors aim to bridge this gap by creating a robust, interpretable "guardrail" system and a more clinically relevant evaluation metric.

Methods

The authors propose MedGuards, a framework grounded in three core AI principles: Chain-of-Thought (CoT) decomposition, Multi-agent self-consistency, and In-Context Learning (ICL).

  1. Task Decomposition: The process is broken into three distinct steps:
  2. Detection: Determining if an error exists.
  3. Localization: Identifying the specific erroneous sentence.
  4. Correction: Generating the corrected version of that sentence.
  5. Multi-Agent Self-Consistency: For detection and localization, the system employs two specialized agents that work in parallel. If both agents agree, the result is accepted.
  6. Confidence-Guided Arbitration: If the two agents disagree, a third "Arbitrator" agent is invoked. This arbitrator receives the original text, the conflicting predictions, the reasoning traces (CoT), and the confidence scores from the first two agents to make a final, informed decision.
  7. Keyword-Prioritized Correction Score (KPCS): The authors introduce a new metric that weights the presence of critical clinical keywords (diagnoses, medications, etc.) alongside traditional semantic similarity scores (ROUGE, BERTScore, BLEURT).

Datasets

The framework was evaluated across four multilingual datasets:

  • MEDEC: A publicly available benchmark for medical error detection and correction in clinical notes.
  • Internal Multilingual Dataset: A newly introduced dataset consisting of 2,506 clinical texts across English, Arabic, and Chinese. These were sampled from MedQA and MedArabiQ and perturbed to include ten clinician-defined error categories, such as lab value interpretation, histology, and epidemiology.

Key Insights and Ideas

  • Disagreement as a Feature, Not a Bug: Instead of treating agent disagreement as noise, MedGuards uses it as a signal to trigger "higher-order deliberation" via the arbitrator. This mimics a clinical "second opinion" process.
  • Soft Matching for Localization: The authors found that "hard matching" (asking an LLM to output a sentence index) is brittle. Instead, they use "soft matching," where the agent generates the erroneous sentence, which is then aligned to the original text using character-level string similarity (Longest Common Subsequence).
  • The Limits of Multi-Agent Correction: Interestingly, while adding more agents improved detection and localization, it actually decreased performance in the correction stage. The authors suggest this is because correction is a generative task where multiple valid outputs are hard to unify through simple arbitration.
  • Model Agnostic: The framework works across various backbones (Gemini, GPT-4o-mini, DeepSeek, Doubao) without needing fine-tuning, making it highly adaptable to new, more powerful models as they emerge.

Key Results

  • State-of-the-Art Performance: MedGuards (using Doubao-1.5-thinking-pro as the backbone) outperformed existing specialized models like knowlab_AIMed and Medifact on the MEDEC dataset, achieving a detection accuracy of 0.770 and a localization accuracy of 0.716.
  • Boosting "Weaker" Models: The framework provided massive gains for smaller models. For example, GPT-4o-mini saw a 66.2% average improvement across all metrics when wrapped in the MedGuards framework.
  • Multilingual Robustness: The system showed consistent improvements across English, Arabic, and Chinese, demonstrating that the multi-agent reasoning logic transcends language barriers.
  • Human Alignment: Human evaluations by clinical doctors confirmed that MedGuards' corrections were more clinically accurate and better preserved critical information compared to baseline LLM outputs.

Limitations and Future Work

  • Latency and Cost: The multi-agent approach naturally increases inference time and token usage. The authors noted that MedGuards took ~7 seconds per note compared to ~1.6 seconds for a single Gemini call. They suggest parallelization and context caching as potential mitigations.
  • Literal Keyword Matching: The current KPCS metric relies on exact string matching for keywords. This might penalize valid synonyms (e.g., "Advil" vs. "Ibuprofen"). The authors plan to integrate medical ontologies (like UMLS) to handle synonyms more flexibly.
  • Real-World Integration: While the results on benchmarks are promising, the authors acknowledge that the next step is testing the system on messy, non-curated real-world clinical data in collaboration with healthcare providers.

For those interested in reproducibility, the authors have made their code available at https://anonymous.4open.science/r/MedGuards-52F2/.

Summary updated

Abstract

As Large Language Models (LLMs) are increasingly deployed in healthcare settings, accurate error detection and correction in generated or existing text becomes critical, as even minor mistakes can pose risks to patient safety. Existing methods for error detection and correction, including automated checks and heuristic-based approaches, do not generalize well across unseen datasets. In this paper, we propose MedGuards as a medical safety guardrail, which is a new framework that treats medical error detection and correction as a multi-agent in-context learning task. Specialized agents separately detect, localize, and correct errors, while a confidence-guided arbitration mechanism resolves disagreements using reasoning traces and confidence scores. This design enhances interpretability, robustness, and adaptability, without requiring additional training of the base LLMs. Additionally, we introduce the Keyword-Prioritized Correction Score (KPCS), a new evaluation metric that considers whether critical keywords within the reference text are generated correctly, providing a more comprehensive assessment than conventional metrics. Experiments across four multilingual medical datasets consisting of clinical notes demonstrate significant improvements by the proposed framework across several metrics and models. Our aim is to enable safer deployment of LLMs in real-world healthcare applications. For reproducibility, we make our code publicly available at https://anonymous.4open.science/r/MedGuards-52F2/.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
MEDECMedGuards with Doubao-1.5-thinking-proDetection accuracy0.770backbone=Doubao-1.5-thinking-pro · framework=MedGuards
Source quote
L236: Table~\ref{tab:llm_backbones} summarizes the performance of different LLM base models with and without our multi-agent framework \texttt{MedGuards}. Overall, the results highlight the overall effectiveness of \texttt{MedGuards}. Across all backbones, \texttt{MedGuards} delivers substantial gains over the plain LLMs, with improvements spanning error detection, localization, and generation quality. For instance, Doubao-1.5-thinking-pro with \texttt{MedGuards} achieves state-of-the-art performance, reaching 0.770 in detection and 0.716 in localization, along with strong correction metrics. \texttt{MedGuards} consistently narrows the gap between weaker backbones (e.g., Gemini 2.0 Flash and GPT-4o-mini) and stronger ones, demonstrating robustness across heterogeneous LLMs. All results indicate statistically significant improvements (p < 0.05), demonstrating that the proposed \texttt{MedGuards} framework reliably enhances model performance.
MEDECMedGuards with Doubao-1.5-thinking-proLocalization accuracy0.716backbone=Doubao-1.5-thinking-pro · framework=MedGuards
Source quote
L236: Table~\ref{tab:llm_backbones} summarizes the performance of different LLM base models with and without our multi-agent framework \texttt{MedGuards}. Overall, the results highlight the overall effectiveness of \texttt{MedGuards}. Across all backbones, \texttt{MedGuards} delivers substantial gains over the plain LLMs, with improvements spanning error detection, localization, and generation quality. For instance, Doubao-1.5-thinking-pro with \texttt{MedGuards} achieves state-of-the-art performance, reaching 0.770 in detection and 0.716 in localization, along with strong correction metrics. \texttt{MedGuards} consistently narrows the gap between weaker backbones (e.g., Gemini 2.0 Flash and GPT-4o-mini) and stronger ones, demonstrating robustness across heterogeneous LLMs. All results indicate statistically significant improvements (p < 0.05), demonstrating that the proposed \texttt{MedGuards} framework reliably enhances model performance.
MEDECMedGuards with Doubao-1.5-thinking-proKeyword-Prioritized Correction Score (KPCS)0.554+0.34 vs baselinebackbone=Doubao-1.5-thinking-pro · framework=MedGuards · kpcs-alpha=0.5
Source quote
L237: Notably, the improvement is especially evident in KPCS, where \texttt{MedGuards} consistently raises scores greatly, for example, from 0.370 to 0.472 on Gemini-2.0-Flash, from 0.210 to 0.461 on GPT-4o-mini and from 0.219 to 0.554 on Doubao-1.5-thinking-pro, indicating that corrections not only match the reference text but also preserve clinical key-phrase fidelity. Moreover, we conduct human evaluations, further validating the effectiveness of \texttt{MedGuards}, with detailed results provided in the Appendix \ref{app_human_evaluation}.
Multilingual dataset · English subsetMedGuards with Gemini 2.0 FlashDetection accuracy0.755+0.24 vs baselinesubset=English · backbone=Gemini 2.0 Flash · framework=MedGuards
Source quote
L289: Table~\ref{tab:mederrbench_results} shows that integrating \texttt{MedGuards} consistently improves performance across all three languages in the second dataset. In English, \texttt{MedGuards} yields substantial gains over backbone LLMs, with improvements of over 20 points in error detection (e.g., Gemini 2.0 Flash: 0.514 → 0.755) and large boosts in generation quality. Similar trends are observed in Arabic, where \texttt{MedGuards} enhances both detection and localization accuracy, with Deepseek-v3 + \texttt{MedGuards} achieving the strongest overall performance. In Chinese, we observe similar improvements, where Deepseek-v3 + \texttt{MedGuards} achieves state-of-the-art results across all metrics, surpassing both its backbone and other models by a clear margin. These results demonstrate that \texttt{MedGuards} is model-agnostic and consistently strengthens LLMs in both safety-critical error identification and faithful correction across datasets with diverse languages.
Reported baseline / comparator measurements (2)
BenchmarkMethodMetricScoreProtocol / Evidence
MEDECDoubao-1.5-thinking-pro without MedGuards baselineKeyword-Prioritized Correction Score (KPCS)0.219backbone=Doubao-1.5-thinking-pro · framework=none · kpcs-alpha=0.5
Source quote
L237: Notably, the improvement is especially evident in KPCS, where \texttt{MedGuards} consistently raises scores greatly, for example, from 0.370 to 0.472 on Gemini-2.0-Flash, from 0.210 to 0.461 on GPT-4o-mini and from 0.219 to 0.554 on Doubao-1.5-thinking-pro, indicating that corrections not only match the reference text but also preserve clinical key-phrase fidelity. Moreover, we conduct human evaluations, further validating the effectiveness of \texttt{MedGuards}, with detailed results provided in the Appendix \ref{app_human_evaluation}.
Multilingual dataset · English subsetGemini 2.0 Flash without MedGuards baselineDetection accuracy0.514subset=English · backbone=Gemini 2.0 Flash
Source quote
L248: Gemini 2.0 Flash │ 0.514 │ 0.168 │ 0.281 │ 0.294 │ 0.288 │ --
BibTeX
@misc{ma2026medguards,
  author = {Congbo Ma and Hu Wang and Yichun Zhang and Farah E. Shamout},
  title = {{MedGuards: Multi-Agent System for Reliable Medical Error Detection and Correction}},
  year = {2026},
  eprint = {2606.25651},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.25651},
}
Figure