MedMemoryBench / README.md
CynthiaHo's picture
Duplicate from Cyan27/MedMemoryBench
547364c
|
Raw
History Blame Contribute Delete
13.3 kB
---
language:
- zh
- en
license: cc-by-nc-sa-4.0
task_categories:
- question-answering
- text-generation
tags:
- medical
- memory
- benchmark
- multi-turn-dialogue
- long-term-memory
- healthcare
- LLM-agent
- evaluation
pretty_name: MedMemoryBench
size_categories:
- 100K<n<1M
configs:
- config_name: dialogues
data_files:
- split: en
path: data/en/dialogues.parquet
- split: zh
path: data/zh/dialogues.parquet
- config_name: dialogues_with_noise
data_files:
- split: en
path: data/en/dialogues_with_noise.parquet
- split: zh
path: data/zh/dialogues_with_noise.parquet
- config_name: queries
data_files:
- split: en
path: data/en/queries.parquet
- split: zh
path: data/zh/queries.parquet
default_config_name: dialogues
---
# MedMemoryBench
## Dataset Description
**MedMemoryBench** is a bilingual (Chinese/English) benchmark for evaluating long-term memory capabilities of LLM-based agents in realistic healthcare scenarios. It simulates longitudinal patient-doctor interactions spanning 12 months of chronic disease management, where an AI agent must accumulate, retain, and recall clinical information across extended multi-session dialogues.
### Key Features
- **20 diverse patient personas** covering chronic diseases (diabetes, hypertension, heart failure, COPD, sleep apnea, Parkinson's, Alzheimer's, etc.)
- **101 medical consultation sessions per persona** with realistic multi-turn dialogues
- **Noise injection**: family health consultations and unrelated health discussions to test memory robustness
- **6 query types** for comprehensive memory evaluation:
- Entity Exact Match
- Temporal Localization
- State Update Tracking
- Inference & Generation
- Multiple Choice
- Multi-hop Clinical Deduction
- **Trap events** that test whether the agent correctly handles medication allergies, contraindications, and critical safety information
- **Bilingual**: Full Chinese and English versions with aligned content
## Dataset Structure
```
MedMemoryBench/
├── README.md
├── data/
│ ├── zh/ # Chinese version
│ │ ├── personas.parquet # 20 patient persona profiles
│ │ ├── events.parquet # 2,074 medical events timeline
│ │ ├── trap_events.parquet # 120 critical safety events
│ │ ├── dialogues.parquet # 31,976 dialogue turns (medical only)
│ │ ├── dialogues_with_noise.parquet # 84,068 turns (medical + noise)
│ │ ├── queries.parquet # 1,939 evaluation queries
│ │ ├── noise_sessions.parquet # 52,092 noise dialogue turns
│ │ └── clinical_reports.parquet # 20 five-phase clinical reports
│ └── en/ # English version
│ ├── personas.parquet # 20 patient persona profiles
│ ├── events.parquet # 2,074 medical events timeline
│ ├── trap_events.parquet # 120 critical safety events
│ ├── dialogues.parquet # 31,976 dialogue turns (medical only)
│ ├── dialogues_with_noise.parquet # 84,068 turns (medical + noise)
│ ├── queries.parquet # 1,939 evaluation queries
│ └── clinical_reports.parquet # 20 five-phase clinical reports
```
> **Note:** `noise_sessions.parquet` is only available for the Chinese (zh) split as the standalone noise session data was generated exclusively in Chinese.
## Data Fields
### Dialogues (`dialogues.parquet`)
| Field | Type | Description |
|-------|------|-------------|
| `persona_id` | int | Patient persona identifier (1-20) |
| `session_id` | int | Consultation session number |
| `turn` | int | Turn number within the session |
| `role` | str | Speaker role: "user" (patient) or "assistant" (doctor) |
| `content` | str | Message content |
| `agent_type` | str | Agent type: "user_agent" or "doctor_agent" |
| `event_id` | int | Associated event ID from the event timeline |
| `event_info` | str (JSON) | Event details (event text, type, date) |
| `knowledge_points` | str (JSON) | Knowledge points extracted from this session |
| `kp_count` | int | Number of knowledge points in this session |
| `turn_count` | int | Total turns in this session |
### Dialogues with Noise (`dialogues_with_noise.parquet`)
| Field | Type | Description |
|-------|------|-------------|
| `persona_id` | int | Patient persona identifier (1-20) |
| `session_id` | int | Session number |
| `session_type` | str | Session type: "medical", "noise_family", or "noise_health" |
| `event_id` | float | Associated event ID (null for noise sessions) |
| `event_info` | str (JSON) | Event details (null for noise sessions) |
| `knowledge_points` | str (JSON) | Knowledge points extracted from this session |
| `kp_count` | int | Number of knowledge points |
| `turn_count` | int | Total turns in this session |
| `noise_type` | str | Noise category: "family_health_consultation" or "health_knowledge" (null for medical) |
| `turn` | int | Turn number within the session |
| `role` | str | Speaker role: "user" (patient) or "assistant" (doctor) |
| `content` | str | Message content |
> **Note:** `dialogues.parquet` contains only medical sessions. `dialogues_with_noise.parquet` includes all sessions (medical + noise) to test memory robustness.
### Queries (`queries.parquet`)
| Field | Type | Description |
|-------|------|-------------|
| `persona_id` | int | Patient persona identifier |
| `query_id` | str | Unique query identifier |
| `session_id` | int | Session context for the query |
| `query_type` | str | One of 6 evaluation categories |
| `question` | str | The evaluation question |
| `answers` | str (JSON) | Array of answer objects with `content`, `is_correct`, and `explanation` fields |
| `source_key_points` | str (JSON) | Source knowledge points referenced by this query |
| `metadata` | str (JSON) | Query metadata including `entity_type`, `entity_value`, `answer_format`, `difficulty` |
### Personas (`personas.parquet`)
| Field | Type | Description |
|-------|------|-------------|
| `persona_id` | int | Unique identifier |
| `type_name` | str | Disease type and subtype |
| `gender` | str | Gender |
| `category` | str | Disease category (chronic/acute) |
| `core_feature` | str | Core clinical characteristics |
| `health_goals` | str (JSON) | Treatment goals |
| `age_range` | str | Age range |
| `occupation_detail` | str | Occupation details |
| `background_story` | str | Narrative background |
| `sleep_pattern` | str | Sleep pattern description |
| `diet_habits` | str | Dietary habits |
| `exercise_frequency` | str | Exercise frequency |
| `stress_level` | str | Stress level |
| `medical_history` | str (JSON) | Medical history |
| `disease_progression` | str (JSON) | Disease progression phases |
### Events (`events.parquet`)
| Field | Type | Description |
|-------|------|-------------|
| `persona_id` | int | Patient persona identifier |
| `event_id` | int | Event sequence number |
| `event` | str | Event description |
| `type` | str | Event type (health/lifestyle/medication/work) |
| `event_date` | str | Event date (YYYY-MM-DD) |
| `triggered_by` | str (JSON) | IDs of causally preceding events |
### Trap Events (`trap_events.parquet`)
| Field | Type | Description |
|-------|------|-------------|
| `persona_id` | int | Patient persona identifier |
| `event` | str | Critical safety event description |
| `type` | str | Type (allergy/medication_history/disease_history/preference) |
| `event_date` | str | Event date |
| `triggered_by` | str (JSON) | Causal predecessors |
### Noise Sessions (`noise_sessions.parquet`)
| Field | Type | Description |
|-------|------|-------------|
| `persona_id` | int | Patient persona identifier |
| `noise_session_id` | float | Noise session identifier |
| `noise_type` | str | Noise type: "family_health_consultation" or "health_knowledge" |
| `turn` | int | Turn number within the session |
| `role` | str | Speaker role |
| `content` | str | Message content |
| `agent_type` | str | Agent type |
> **Note:** `noise_sessions.parquet` is only available for the Chinese (zh) split.
### Clinical Reports (`clinical_reports.parquet`)
| Field | Type | Description |
|-------|------|-------------|
| `persona_id` | int | Patient persona identifier |
| `phase_1` | str | Clinical report for phase 1 |
| `phase_2` | str | Clinical report for phase 2 |
| `phase_3` | str | Clinical report for phase 3 |
| `phase_4` | str | Clinical report for phase 4 |
| `phase_5` | str | Clinical report for phase 5 |
## Usage
```python
from datasets import load_dataset
# Load dialogues (default config) - English split
dialogues_en = load_dataset("Cyan27/MedMemoryBench", name="dialogues", split="en")
print(f"English dialogue turns: {len(dialogues_en)}")
# Load dialogues - Chinese split
dialogues_zh = load_dataset("Cyan27/MedMemoryBench", name="dialogues", split="zh")
print(f"Chinese dialogue turns: {len(dialogues_zh)}")
# Load dialogues with noise (medical + noise sessions mixed)
noisy_en = load_dataset("Cyan27/MedMemoryBench", name="dialogues_with_noise", split="en")
# Load evaluation queries
queries_en = load_dataset("Cyan27/MedMemoryBench", name="queries", split="en")
print(f"English queries: {len(queries_en)}")
# Load patient personas
personas_en = load_dataset("Cyan27/MedMemoryBench", name="personas", split="en")
# Load events timeline
events_en = load_dataset("Cyan27/MedMemoryBench", name="events", split="en")
# Load trap events (critical safety events)
trap_events_en = load_dataset("Cyan27/MedMemoryBench", name="trap_events", split="en")
# Load noise sessions (Chinese only)
noise_sessions = load_dataset("Cyan27/MedMemoryBench", name="noise_sessions", split="zh")
# Load clinical reports
reports_en = load_dataset("Cyan27/MedMemoryBench", name="clinical_reports", split="en")
```
## Evaluation Protocol
The benchmark evaluates memory systems through a two-phase protocol:
1. **Memorization Phase**: The agent reads all dialogue sessions for a persona sequentially, building its memory store.
2. **Query Phase**: The agent answers evaluation queries that require recalling specific facts, tracking state changes, performing temporal reasoning, or making multi-hop clinical deductions.
### Query Type Distribution (per persona)
| Query Type | Count | Description |
|------------|-------|-------------|
| Entity Exact Match | 20 | Recall specific medical facts |
| Temporal Localization | 20 | Identify when events occurred |
| State Update | 10 | Track how conditions evolved |
| Inference & Generation | 20 | Derive conclusions from memory |
| Multiple Choice | ~19 | Select correct option from choices |
| Multi-hop Clinical Deduction | ~8 | Chain multiple facts for reasoning |
## Dataset Creation
### Generation Pipeline
1. **Persona Design**: 20 diverse patient profiles covering major chronic disease categories, each with detailed demographics, lifestyle, and medical history.
2. **Event Graph Construction**: Causal event chains spanning 12 months, modeling realistic disease progression.
3. **Dialogue Simulation**: Multi-turn patient-doctor conversations generated by specialized LLM agents (patient agent + doctor agent), grounded in the event timeline.
4. **Noise Injection**: Family health consultations and unrelated health discussions inserted between medical sessions to test memory selectivity.
5. **Query Generation**: Evaluation questions targeting specific memory capabilities, with expert-reviewed ground truth answers.
6. **Quality Assurance**: Human expert review and deduplication of queries.
### Source Data
All data is synthetically generated using large language models with medical domain expertise, guided by clinical guidelines (e.g., Chinese Diabetes Prevention Guidelines 2024, ADA Standards of Care, GOLD COPD Strategy, ESC Heart Failure Guidelines).
## Considerations
### Ethical Considerations
- This dataset contains **synthetic medical dialogues** and does not include real patient data.
- All patient personas are fictional constructions designed for evaluation purposes.
- The dataset should NOT be used for actual clinical decision-making or medical advice.
- Generated medical content follows established clinical guidelines but may not reflect all real-world complexities.
### Limitations
- Dialogues are generated by LLMs and may not capture the full variability of real patient-doctor interactions.
- Disease progression follows simplified models; real clinical trajectories are more heterogeneous.
- The benchmark focuses on factual memory and does not evaluate empathy, communication style, or clinical judgment quality.
### Licensing
This dataset is released under [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/). It may be used for research purposes only. Commercial use is prohibited.
## Citation
```bibtex
@inproceedings{medmemorybench2026,
title={MedMemoryBench: A Bilingual Benchmark for Evaluating Long-Term Memory in Medical LLM Agents},
author={},
booktitle={NeurIPS 2026 Datasets and Benchmarks Track},
year={2026}
}
```