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

Congbo Ma, Hu Wang, Yichun Zhang, Farah E. Shamout
6/24/2026
cs.CL

Official code: congboma/MedErrBench (7 stars, MIT, last commit 2026-01-30).

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://github.com/congboma/MedErrBench.

View on arXivView PDF

Code Implementations(1)

MIT
70Jan 30, 20268 months agoMIT

Similar Papers

Cite this paper

@article{ma2026medguards,
  title  = {MedGuards: Multi-Agent System for Reliable Medical Error Detection and Correction},
  author = {Congbo Ma and Hu Wang and Yichun Zhang and Farah E. Shamout},
  year   = {2026},
  eprint = {2606.25651},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2606.25651v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2606.25651.svg)](https://codeofpaper.com/paper/2606.25651)

Discussion