P rompt M ind Team at MEDIQA - CORR 2024: Improving Clinical Text Correction with Error Categorization and LLM Ensembles (2024)

Abstract: This paper describes our approach to the MEDIQA-CORR shared task, which involves error detection and correction in clinical notes curated by medical professionals. This task involves handling three subtasks: detecting the presence of errors, identifying the specific sentence containing the error, and correcting it. Through our work, we aim to assess the capabilities of Large Language Models (LLMs) trained on a vast corpora of internet data that contain both factual and unreliable information. We propose to comprehensively address all subtasks together, and suggest employing a unique prompt-based in-context learning strategy. We will evaluate its efficacy in this specialized task demanding a combination of general reasoning and medical knowledge. In medical systems where prediction errors can have grave consequences, we propose leveraging self-consistency and ensemble methods to enhance error correction and error detection performance.

## introduction with rapid advancements in natural language processing (nlp), we are witnessing a surge of its applications across various domains, including healthcare. incorporating nlp in clinical settings brings about a multitude of advantages. it enhances clinical decision-making through advanced support, making health information more accessible, streamlines documentation, and accelerates research initiatives @xcite . these developments contribute to improved patient care, reduced healthcare costs, and alleviated physician burnout. nlp for healthcare applications pose inherent challenges due to the need for medical expertise. however, advancements in llms trained on internet data including medical information have significantly enhanced their knowledge and reasoning capabilities, enabling them to tackle more complex problems in the healthcare domain involving text processing and generation. few recent applications in healthcare include information extraction, question answering, summarization, and translation, all while comprehending intricate medical knowledge @xcite . despite these advancements, safety and accuracy remain major concerns as training data may contain unreliable and misleading information that could have adverse effects if not handled appropriately. nevertheless, the effective utilization of these llms has the potential to revolutionize healthcare and bring immense benefits to society @xcite . in the healthcare industry, there is a need for automated systems capable of efficiently analyzing and interpreting clinical texts that improves patient's safety, quality of care and costs. processing the clinical texts presents a unique and significant challenge due to the complexities introduced by medical jargon, abbreviations, syntactic variations, and context-specific nuances. the mediqa-corr shared task @xcite , part of the clinicalnlp 2024 workshop, seeks to address this issue of identifying and correcting (common sense) medical errors found in clinical notes. the mediqa-corr shared task involves three subtasks: detecting errors in clinical notes, identifying specific error sentences, and correcting those sentences. our approach involves tackling all three subtasks simultaneously using a single prompt for llms invoking chain-of-thought. by doing this, we seek to assess the complex reasoning capabilities of llms in the clinical domain. first, we analyze the dataset and curate a list of the most common types of errors in clinical notes. we then utilize this information to create task specific instructions for the llm. we leverage contemporary llms using in-context learning (icl) with a few-shot approach. since publicly accessible llms are instruction-tuned models, considering the approach of directing them towards assessing the clinical note based on specific error types maximizes the objective while only utilizing a few training examples. by employing single-prompt icl approaches to solve end-to-end tasks, we pave the way forward for building more complex healthcare applications using simple yet intuitive strategies leveraging the capabilities of advanced llms. in addition to the task prompt, an llm's performance on a particular task is mainly influenced by two factors: training techniques and underlying training data. consistency, which measures how frequently an llm produces the same output given the same instructions, can be viewed as another dimension that can affect the quality of an llm. leveraging self-consistency can significantly improve the accuracy of an llm, particularly for complex reasoning tasks @xcite . in healthcare datasets, where hallucinations in llms can occur more frequently due to training on factually unverified data, this could lead to serious problems. while self-consistency is one approach to obtaining more accurate results, llm ensemble, which has not yet been fully explored, presents a promising opportunity. we validate the results of each llm by using the output of other llms that are trained on different corpora. in our approach, we investigate both self-consistency and ensemble concepts. the remainder of the paper includes related work, the mediqa-corr task and dataset, our approach, results and conclusion. the shared task focuses on leveraging llms for the following three subtasks: ## approach we propose to tackle all subtasks concurrently within a single prompt for the following reasons: • comprehensive evaluation: to enable performance evaluation on a complex task, rather than assessing them on isolated, simpler tasks. this provides a more holistic view of the llms' capabilities. publicly accessible llms are models that are fine-tuned to follow instructions, with the aim of performing user-defined instructions as accurately as possible. the success of the task then depends on the quality of the instructions provided and the model's ability to follow them effectively. our approach focuses on refining the instructions for the llm to facilitate comprehensive learning of all subtasks using icl. we initiate this process by analyzing error types in the dataset followed by curating the prompt and inferencing with different llms. ## ablation study we begin by presenting the results obtained from incorporating error categorization into the final prompt, which demonstrates an improvement in performance on both error detection and text span identification tasks. in order to make the comparison, we utilize gpt-3.5 with prompts including and excluding error categorization. additionally, we assess the performance of gpt-4 to ascertain the extent to which it surpasses gpt-3.5 for the finalized prompt. the results obtained using the combined ms and uw validation sets (during the development phase) are presented in the results indicate that by integrating error categorization which initiates an intermediate chain-ofthought, results in a significant performance boost of nearly 10% and 16% for task-1 and task-2, respectively. additionally, gpt-4 outperforms gpt-3.5, confirming its enhanced reasoning capabilities. these advancements make gpt-4 a preferred choice for final test runs. ## results we present the results of individual models first followed by incorporating self-consistency and ensembles on the test data. the performance of gpt-4 and claude-3 opus using the final prompt on all the majority ratio x/y for gpt-4 results is a measure of how often the model produces the same result for a given input. for example, a majority ratio of 3/4 means that at least three out of the four results should be the same to qualify the predicted error sentence id as correct. in the ensemble approach, a prediction is considered correct if the self-consistent gpt-4 result matches the claude-3 opus result. otherwise, the prediction is considered "no error". to select the best corrected sentence from the ensemble, the rogue score is used to estimate the distance between each corrected sentence and the error sentence. the sentence with the highest rogue score is used for the evaluation because llms tend to generate verbose corrected sentences which decreases the aggregate scores. in our experiments, using a majority ratio of 3/4 for gpt-4 in the ensemble resulted in the best task-1 and task-2 performances. using a majority ratio of 4/4 resulted in the best task-3 aggregate score. our best subtask-3 score is ranked 2nd among all participants in the competition, and our best subtask-2 performance is among the top 3 according to the reported scores @xcite . ## related work in recent years, there has been a surge of research exploring the potential of prompt engineering techniques with large language models (llms) in healthcare. these techniques have shown promising results in various healthcare tasks, often achieving state-of-the-art performances @xcite , @xcite . one notable study, med-prompt, highlighted several research directions demonstrating the power of prompt exploration for llms @xcite . llms exhibited impressive knowledge and reasoning abilities, tackling various tasks effectively. these advancements showcase the potential of llms in healthcare, offering new opportunities for leveraging language models to address healthcare challenges. evaluating common sense reasoning is essential for computer systems, as it impacts language comprehension, communication reliability, and general task performance. semeval-2020 comve aims to address general common sense questions and seeks logical justification for correct responses, assessing reasoning abilities. pretrained language models naturally acquire common sense through training on vast word tokens obtained from the web @xcite . mediqa-corr, specifically tailored to identify and correct errors in clinical notes, offers a valuable resource for evaluating pretrained llms in medical common sense reasoning. inspired by prompt-based explorations, our research also focuses on utilizing pretrained llms to assess reasoning capabilities in medical common sense scenarios. ## conclusion our research demonstrates that incorporating error categorization into the prompt enhances the performance of large language models (llms) in detecting, identifying, and classifying clinical note errors. by initiating an intermediate chain-of-thought, this approach facilitates better reasoning and aids the llm in providing more accurate and explainable results. furthermore, our findings suggest that selfconsistency and ensembles can further enhance the robustness and performance of llms on these tasks. these advancements pave the way for the development of more reliable and interpretable ai systems for clinical documentation analysis, ultimately contributing to improved healthcare outcomes.