Electronic Health Records (EHRs) are digital records of patient information, often containing unstructured clinical text. Named Entity Recognition (NER) is essential in EHRs for extracting key medical entities like problems, tests, and treatments to support downstream clinical applications. This paper explores prompt-based medical entity recognition using large language models (LLMs), specifically GPT-4o and DeepSeek-R1, guided by various prompt engineering techniques, including zero-shot, few-shot, and an ensemble approach. Among all strategies, GPT-4o with prompt ensemble achieved the highest classification performance with an F1-score of 0.95 and recall of 0.98, outperforming DeepSeek-R1 on the task. The ensemble method improved reliability by aggregating outputs through embedding-based similarity and majority voting.
View on arXiv@article{islam2025_2505.08704, title={ LLM-based Prompt Ensemble for Reliable Medical Entity Recognition from EHRs }, author={ K M Sajjadul Islam and Ayesha Siddika Nipu and Jiawei Wu and Praveen Madiraju }, journal={arXiv preprint arXiv:2505.08704}, year={ 2025 } }