UMass-BioNLP at MEDIQA-M3G 2024: DermPrompt - A Systematic Exploration of Prompt Engineering with GPT-4V for Dermatological Diagnosis

Parth Vashisht, Abhilasha Lodha, Mukta Maddipatla, Zonghai Yao, Avijit Mitra, Zhichao Yang, Sunjae Kwon, Junda Wang, Hong Yu

Abstract

In clinical dermatology, diagnosis requires a complex synthesis of visual patterns, patient history, and clinical intuition. With a global shortage of dermatological expertise, Large Multimodal Models (LMMs) offer a potential solution. This paper introduces DermPrompt, a systematic exploration of prompt engineering and multi-agent frameworks using GPT-4V. By implementing a two-stage "Retriever and Re-ranker" pipeline and a novel Multi-Agent Conversation (MAC) framework, we demonstrate significant improvements in diagnostic accuracy and professional style alignment over standard prompting techniques.

Introduction

Dermatology is uniquely challenging for AI because it necessitates multimodal reasoning—integrating visual data with textual patient histories. Unlike previous efforts that relied on high-quality dermoscopic images, real-world clinical data often involves low-quality photos and informal patient queries. DermPrompt addresses these challenges by structuring the diagnostic process into a modular pipeline that mimics human clinical reasoning.

Problem Statement

The researchers identified two primary hurdles in AI-driven dermatology:

  1. The Retrieval Gap: Effectively narrowing down thousands of potential skin conditions to a manageable candidate list using imperfect, real-world data.
  2. The Reasoning Gap: Moving beyond simple image classification to provide nuanced, expert-level diagnoses and treatment plans that align with professional medical logic.

Methodology

The DermPrompt pipeline consists of three primary modules designed to handle retrieval, refinement, and communication.

The DermPrompt pipeline architecture, featuring Retriever, Re-ranker, and Aligner modules.

1. Retrieval Module

GPT-4V serves as a knowledge base to generate potential diagnoses. The team evaluated both Context-Independent (image-only) and Context-Dependent (image + patient history) strategies. Surprisingly, "Naive Chain-of-Thought (CoT)" outperformed "Expert Grounded CoT" during retrieval, suggesting that overly restrictive guidelines early in the process can lead to the premature elimination of correct diagnoses.

2. Re-Ranker Module

This stage refines the candidate list using three experimental setups:

  • Naive CoT: Standard step-by-step reasoning.
  • Expert Guidelines Grounded CoT: Prompts structured around clinical dermatology guidelines (e.g., size, shape, color, distribution).
  • Multi-Agent Conversation (MAC): A novel framework where AI agents—including a Coordinator, an Admin, and several Diagnostic Specialists—debate specific diseases and critique each other's evidence to reach a consensus.
The Multi-Agent Conversation (MAC) framework illustrating the interaction between specialized diagnostic agents and administrative roles.

3. Aligner Module

To ensure outputs mirror professional medical advice, the team utilized Automatic Prompt Optimization (APO) to refine the tone and style based on real doctor-patient interactions.

Datasets

The study utilized the MEDIQA-ClinicalNLP 2024 shared task B dataset. This dataset reflects real-world constraints, including variations in image quality and informal patient histories, providing a rigorous benchmark for clinical application.

Results and Key Insights

  • Retrieval Performance: Using GPT-4V with Naive CoT and patient context, the system achieved a retrieval accuracy of 85.1% for the ground-truth condition.
  • The Power of Critique: The MAC framework demonstrated that "debate" is a superior reasoning tool. By forcing agents to identify flaws in competing diagnoses, the system self-corrects. On a subset of complex cases, the MAC framework achieved a Top-1 accuracy of 73.3%, a nearly 20-percentage-point improvement over the best single-agent strategy.
  • Contextual Importance: Models relying solely on images performed significantly worse than those integrated with patient history, confirming that visual cues alone are often insufficient to distinguish between look-alike conditions.
  • Style Alignment: APO optimization nearly tripled the DeltaBleu score (from 0.94 to 2.74), significantly improving the professional tone of the final diagnostic output.

Conclusion and Future Work

DermPrompt demonstrates that structured multi-agent debates and context-aware retrieval can significantly enhance the diagnostic capabilities of LMMs in dermatology. However, challenges remain regarding privacy (HIPAA compliance with third-party APIs), the financial cost of multiple API calls, and the context window limits of current models. Future research will focus on optimizing the MAC framework for efficiency and exploring local, privacy-centric models for clinical deployment.

Summary updated

BibTeX
@inproceedings{vashisht2024umass,
  author = {Parth Vashisht and Abhilasha Lodha and Mukta Maddipatla and Zonghai Yao and Avijit Mitra and Zhichao Yang and Sunjae Kwon and Junda Wang and Hong Yu},
  title = {{UMass-BioNLP at MEDIQA-M3G 2024: DermPrompt - A Systematic Exploration of Prompt Engineering with GPT-4V for Dermatological Diagnosis}},
  booktitle = {ClinicalNLP @ NAACL},
  year = {2024},
  doi = {10.18653/v1/2024.clinicalnlp-1.50},
}
Figure