Importance of Prompt Optimisation for Error Detection in Medical Notes Using Language Models

Craig Myles, Patrick Schrempf, David Harris-Birtill
2/25/2026
cs.CLcs.AI

Official code: CraigMyles/clinical-note-error-detection (2 stars, MIT, last commit 2026-03-02).

Abstract

Errors in medical text can cause delays or even result in incorrect treatment for patients. Recently, language models have shown promise in their ability to automatically detect errors in medical text, an ability that has the opportunity to significantly benefit healthcare systems. In this paper, we explore the importance of prompt optimisation for small and large language models when applied to the task of error detection. We perform rigorous experiments and analysis across frontier language models and open-source language models. We show that automatic prompt optimisation with Genetic-Pareto (GEPA) improves error detection over the baseline accuracy performance from 0.669 to 0.785 with GPT-5 and 0.578 to 0.690 with Qwen3-32B, approaching the performance of medical doctors and achieving state-of-the-art performance on the MEDEC benchmark dataset. Code available on GitHub: https://github.com/CraigMyles/clinical-note-error-detection

View on arXivView PDF

Code Implementations(1)

MIT

Importance of Prompt Optimisation for Error Detection in Medical Notes Using Language Models

21Shell, PythonFeb 4, 20267 months agoMIT

Similar Papers

Cite this paper

@article{myles2026importance,
  title  = {Importance of Prompt Optimisation for Error Detection in Medical Notes Using Language Models},
  author = {Craig Myles and Patrick Schrempf and David Harris-Birtill},
  year   = {2026},
  eprint = {2602.22483},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2602.22483v1}
}

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/2602.22483.svg)](https://codeofpaper.com/paper/2602.22483)

Discussion