Research & Analysisπuniversal
EasyMED
EasyMED: A Multi-Agent Virtual Standardized Patient Framework for Medical Education
Quick Start
Install this Skill
npx skills add FreedomIntelligence/EasyMED# EasyMED
<p align="center">
<b>EasyMED: A Multi-Agent Virtual Standardized Patient Framework for Medical Education</b>
</p>
<p align="center">
<img src="https://img.shields.io/badge/Python-3.10+-blue">
<img src="https://img.shields.io/badge/License-MIT-green">
<img src="https://img.shields.io/badge/Status-Research-orange">
</p>
EasyMED is a **multi-agent virtual standardized patient (VSP) framework** designed to support clinical skills training in medical education.
The system separates **clinical intent recognition, patient simulation, and educational evaluation** into coordinated agents, enabling stable multi-turn dialogue, controlled information disclosure, and structured learning feedback.
This repository contains the implementation used in the paper:
> **Human or LLM as Standardized Patients? A Comparative Study in Medical Education**
---
# Overview
Standardized Patients (SPs) are widely used in medical education to train students in **clinical communication, history taking, and diagnostic reasoning**. However, traditional SP programs rely on human actors and are therefore **costly, labor-intensive, and difficult to scale**.
EasyMED addresses these challenges by introducing a **large-language-model-based virtual standardized patient system** that enables scalable and realistic doctorβpatient interactions.
Compared with traditional monolithic LLM simulations, EasyMED decomposes the interaction pipeline into specialized agents that explicitly model different components of the clinical consultation process.
The framework supports:
- stable multi-turn clinical dialogue
- case-grounded patient simulation
- controlled information disclosure
- automated evaluation of clinical inquiry performance
---
# Key Features
## Multi-Agent Architecture
EasyMED consists of three coordinated agents:
| Agent | Function |
|------|---------|
| **Auxiliary Agent** | Recognizes the clinical intent of the student's question |
| **Patient Agent** | Generates case-grounded patient responses |
| **Evaluation Agent** | Analyzes the full interaction and produces structured feedback |
This factorized architecture improves interaction stability and enables precise control over patient behavior.
---
## SPBench Benchmark
We also introduce **SPBench**, a benchmark dataset designed for evaluating virtual standardized patients.
SPBench evaluates systems along **eight clinically motivated criteria**:
- Query Comprehension (QC)
- Case Consistency (CC)
- Controlled Disclosure (CD)
- Response Completeness (RC)
- Logical Coherence (LC)
- Language Naturalness (LN)
- Conversational Consistency (CS)
- Patient Demeanor (PD)
---
# System Workflow
EasyMED operates in two phases.
## Phase 1 β Consultation
1. The student asks a clinical question.
2. The **Auxiliary Agent** identifies the clinical intent.
3. The **Patient Agent** retrieves relevant case information.
4. The **Patient Agent** generates a natural patient response.
This design ensures that patient responses remain consistent with the underlying case while revealing information only when appropriate.
---
## Phase 2 β Evaluation
After the dialogue ends:
1. The **Evaluation Agent** reviews the full interaction history.
2. It compares the student's inquiries against expert clinical checklists.
3. Structured feedback is generated to support learning.
This evaluation helps students identify **missing clinical inquiries and reasoning gaps**.
---
# Repository Structure
```
EasyMED/
β
βββ agents/
β βββ auxiliary_agent.py
β βββ patient_agent.py
β βββ evaluation_agent.py
β
βββ prompts/
β βββ patient_prompt.txt
β βββ intent_prompt.txt
β βββ evaluation_prompt.txt
β
βββ datasets/
β βββ spbench/
β
βββ scripts/
β βββ run_dialogue.py
β
βββ outputs/
β
βββ README.md
```
---
# Installation
## Requirements
- Python **3.10+**
- OpenAI / Gemini API
- CUDA GPU (optional)
Install dependencies:
```bash
pip install -r requirements.txt
```
---
# Quick Start
Run a simulated clinical consultation:
```bash
python scripts/run_dialogue.py \
--case_id 001 \
--model gemini-2.5-pro
```
The script will:
1. Load a patient case
2. Simulate doctorβpatient interaction
3. Save dialogue and evaluation results
---
# Example Dialogue
```
Doctor: When did the pain start?
Patient: It started about three days ago, doctor.
At first it was mild, but it has gradually become worse.
Doctor: Does anything make the pain worse?
Patient: Yes, it tends to hurt more when I sit or lie down.
```
After the consultation, the system automatically produces **structured feedback** on the studentβs clinical inquiry performance.
---
# Dataset
## SPBench
SPBench contains:
- **58 clinical cases**
- **3,208 doctorβpatient dialogue pairs**
- **14 medical specialties**
Each case includes:
```
patient_profile.json
dialogue_history.json
clinical_checklist.json
```
The dataset is designed for **interaction-level evaluation of virtual standardized patients**.
---
# Experim
... (truncated)Repository
8stars
0forks
Details
Related Skills
More research & analysis skills you might like
pr-improver
Research & AnalysisRuns an autonomous review-and-fix improvement loop over the current branch's changes until a PR review comes back clean, scoped mechanically to the directories the branch touched. Reviews are performed by an installed PR-review skill (default: pr-review-toolkit's review-pr). Use to fix review findings on a branch before opening or updating a pull request ('clean up this branch', 'fix this PR until review passes', 'run review-and-fix on my changes'). NOT for a one-time review β run the PR-review skill directly.
π€claudeπuniversal
7.5k
643
View
code-improver
Research & AnalysisRuns an autonomous review-and-fix improvement loop over any code target β a skill, plugin, module, or directory β using a reviewer the user names: any installed skill or agent. Keeps a cross-round findings ledger, escalates when fixes stop converging, and guards scope mechanically. Use when asked to 'improve this code until review passes', 'run an improvement loop with <reviewer>', or to iterate review-and-fix with a specific reviewer. For skills prefer the skill-improver entry; for a branch prefer pr-improver.
π€claudeπuniversal
7.5k
643
View
skill-improver
Research & AnalysisRuns an autonomous review-and-fix improvement loop over a Claude Code skill until a review comes back clean, with a cross-round findings ledger, escalation when fixes stop converging, and a mechanical scope guard. Reviews are performed by the plugin-dev skill-reviewer agent. Use to fix skill quality issues, iteratively refine a skill, or resume a loop after an escalation ('fix my skill', 'improve this skill until it passes review', 'skill improvement loop'). NOT for a one-time review β use the plugin-dev skill-reviewer agent directly.
π€claudeπuniversal
7.5k
643
View
audit-augmentation
Research & AnalysisAugments Trailmark code graphs with external audit findings from SARIF static analysis results, weAudit annotation files, and version-gated Trailmark 0.4.x binary-analysis graph exports. Maps findings to graph nodes by file and line overlap, creates severity-based subgraphs, and enables cross-referencing findings with pre-analysis data (blast radius, taint, etc.). Use when projecting SARIF results onto a code graph, overlaying weAudit annotations, importing binary graph findings, cross-referencing Semgrep, CodeQL, or binary-analysis findings with call graph data, or visualizing audit findings in the context of code structure.
πuniversal
7.5k
643
View