WangLab at MEDIQA-CORR 2024: Optimized LLM-based Programs for Medical Error Detection and Correction
Augustin Toma, Ronald Xie, Steven Palayew, Patrick R. Lawler, Bo Wang
TL;DR
This work tackles the crucial problem of detecting and correcting medical errors in clinical notes through the MEDIQA-CORR 2024 shared task. It introduces two DSPy-based LLM programs: a retrieval-driven MS approach that leverages external QA data and a modular UW pipeline that sequentially detects, localizes, and corrects errors, with prompt optimization guiding each module. The approach achieves top performance across all three subtasks, reporting high Task 1 and Task 2 accuracies and a leading Task 3 aggregate score, while examining the impact of model choice and compilation. Limitations include focus on a subset of errors and generalizability challenges, motivating future work on broader error types, domain-specific fine-tuning, and richer evaluation frameworks to improve robustness in clinical settings.
Abstract
Medical errors in clinical text pose significant risks to patient safety. The MEDIQA-CORR 2024 shared task focuses on detecting and correcting these errors across three subtasks: identifying the presence of an error, extracting the erroneous sentence, and generating a corrected sentence. In this paper, we present our approach that achieved top performance in all three subtasks. For the MS dataset, which contains subtle errors, we developed a retrieval-based system leveraging external medical question-answering datasets. For the UW dataset, reflecting more realistic clinical notes, we created a pipeline of modules to detect, localize, and correct errors. Both approaches utilized the DSPy framework for optimizing prompts and few-shot examples in large language model (LLM) based programs. Our results demonstrate the effectiveness of LLM based programs for medical error correction. However, our approach has limitations in addressing the full diversity of potential errors in medical documentation. We discuss the implications of our work and highlight future research directions to advance the robustness and applicability of medical error detection and correction systems.
