[Paper Review] MedAlign: A Clinician-Generated Dataset for Instruction Following with Electronic Medical Records
MedAlign is a clinician-generated benchmark of 983 EHR-based instructions, used to evaluate 6 LLMs and study context-length effects and automatic evaluation metrics.
The ability of large language models (LLMs) to follow natural language instructions with human-level fluency suggests many opportunities in healthcare to reduce administrative burden and improve quality of care. However, evaluating LLMs on realistic text generation tasks for healthcare remains challenging. Existing question answering datasets for electronic health record (EHR) data fail to capture the complexity of information needs and documentation burdens experienced by clinicians. To address these challenges, we introduce MedAlign, a benchmark dataset of 983 natural language instructions for EHR data. MedAlign is curated by 15 clinicians (7 specialities), includes clinician-written reference responses for 303 instructions, and provides 276 longitudinal EHRs for grounding instruction-response pairs. We used MedAlign to evaluate 6 general domain LLMs, having clinicians rank the accuracy and quality of each LLM response. We found high error rates, ranging from 35% (GPT-4) to 68% (MPT-7B-Instruct), and an 8.3% drop in accuracy moving from 32k to 2k context lengths for GPT-4. Finally, we report correlations between clinician rankings and automated natural language generation metrics as a way to rank LLMs without human review. We make MedAlign available under a research data use agreement to enable LLM evaluations on tasks aligned with clinician needs and preferences.
Motivation & Objective
- Motivate the need for realistic EHR instruction-following benchmarks representing clinician tasks and burden.
- Create MedAlign: a diverse, clinician-generated set of EHR-based instructions spanning multiple specialties.
- Provide paired EHRs and clinician-written gold responses to enable LLM evaluation in realistic tasks.
- Investigate automated metrics as proxies for clinician judgments to enable scalable evaluation.
Proposed method
- Collect instructions from 15 clinicians across 7 specialties to form 983 instructions.
- Pair instructions with EHRs via a retrieval-based BM25 matching approach to obtain relevant instruction–EHR pairs.
- Have clinicians write gold responses to 303 instructions grounded in EHRs and evaluate 6 LLMs.
- Evaluate LLM outputs with clinician judgments on correctness and quality, blinded to model identity.
- Analyze correlations between automated NLG metrics (e.g., COMET, BERTScore) and human rankings.

Experimental results
Research questions
- RQ1Can clinician-generated EHR instructions be effectively paired with longitudinal EHR data to form a realistic instruction-following benchmark?
- RQ2How do state-of-the-art LLMs perform on long, EHR-grounded instructions relative to clinical judgments?
- RQ3Do automated NLG metrics correlate with clinician rankings in the EHR instruction-following setting?
Key findings
- GPT-4 variants achieved higher correctness than open models, e.g., 65.0% (GPT-4 32k + MR) and 60.1% (GPT-4 32k) versus 35.0% (Vicuña-13B), 33.3% (Vicuña-7B), and 31.7% (MPT-7B-Instruct).
- GPT-4 with 32k context and multi-step refinement yielded the highest head-to-head win-rate against other models (0.676).
- Context length significantly impacted correctness, with 8.3% more correct responses when increasing GPT-4 context from 2k to 32k tokens.
- Automated metric COMET showed the strongest correlation with clinician rankings (0.37, near inter-rater reliability 0.44).
- Average inter-rater reliability among clinicians evaluating model outputs was 0.44 (Kendall’s Tau).
- Automated metrics like BERTScore (0.34) and METEOR (0.32) showed moderate correlation with human rankings; many metrics yielded weaker associations.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.