Background

Access to real clinical text containing authentic protected health information (PHI) is extremely limited. However, these data are essential for developing and evaluating medical lan- guage models. At first glance, large language models seemed to be a natural solution: with a simple prompt, they can generate discharge notes that look super realistic. However, we repeatedly encountered a frustrating trade-off in initial testing. Prompts that preserve the natural structure and flow of a medical note often produce medically illogical content. While prompts designed to enforce strict medical correctness tend to break the document’s realism, the outputing text can feel to be rigid or unstructured. This balance between linguistic realism and medical reasoning makes it difficult to generate synthetic medical notes that are both believable and clinically coherent.

What it does & How we built it

To address this problem, we introduce Gemedi, a dis- charge medical note generation framework built around a dual- discriminator feedback loop. Rather than relying on a single or a overly complex prompt, Gemedi separates evaluation into two complementary roles. One discriminator focuses on structural realism and common formatting or field-level errors, which is trained using deliberately flawed synthetic data with annotated reasoning mistakes. The second discriminator evaluates deeper medical consistency and semantic logic using the Google Gemini API. The generator itself is fine-tuned on high-quality synthetic notes and then iteratively refines its outputs by incorporating feedback from both critics through prompt updates. This separation allows each component to focus on what it does best, which allows the generator to improve realism and medical reasoning simultaneously. Our results show that Gemedi produces synthetic discharge notes that maintain high linguistic fidelity while achieving compa- rable or superior medical reasoning performance compared to baselines, suggesting a practical path towards high-quality synthetic clinical text generation.

Final Project Link

https://github.com/yumcui/Gemedi/blob/main/Final_Project_1470_Gemedi.pdf

Built With

Share this project:

Updates