Cyan27 commited on
Commit
db0820f
·
verified ·
1 Parent(s): b5cf3f4

sync: add README.md from Cyan27/MedMemoryBench

Browse files
Files changed (1) hide show
  1. README.md +304 -0
README.md ADDED
@@ -0,0 +1,304 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - zh
4
+ - en
5
+ license: cc-by-nc-sa-4.0
6
+ task_categories:
7
+ - question-answering
8
+ - text-generation
9
+ tags:
10
+ - medical
11
+ - memory
12
+ - benchmark
13
+ - multi-turn-dialogue
14
+ - long-term-memory
15
+ - healthcare
16
+ - LLM-agent
17
+ - evaluation
18
+ pretty_name: MedMemoryBench
19
+ size_categories:
20
+ - 100K<n<1M
21
+ configs:
22
+ - config_name: dialogues
23
+ data_files:
24
+ - split: en
25
+ path: data/en/dialogues.parquet
26
+ - split: zh
27
+ path: data/zh/dialogues.parquet
28
+ - config_name: dialogues_with_noise
29
+ data_files:
30
+ - split: en
31
+ path: data/en/dialogues_with_noise.parquet
32
+ - split: zh
33
+ path: data/zh/dialogues_with_noise.parquet
34
+ - config_name: queries
35
+ data_files:
36
+ - split: en
37
+ path: data/en/queries.parquet
38
+ - split: zh
39
+ path: data/zh/queries.parquet
40
+ default_config_name: dialogues
41
+ ---
42
+
43
+ # MedMemoryBench
44
+
45
+ ## Dataset Description
46
+
47
+ **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.
48
+
49
+ ### Key Features
50
+
51
+ - **20 diverse patient personas** covering chronic diseases (diabetes, hypertension, heart failure, COPD, sleep apnea, Parkinson's, Alzheimer's, etc.)
52
+ - **101 medical consultation sessions per persona** with realistic multi-turn dialogues
53
+ - **Noise injection**: family health consultations and unrelated health discussions to test memory robustness
54
+ - **6 query types** for comprehensive memory evaluation:
55
+ - Entity Exact Match
56
+ - Temporal Localization
57
+ - State Update Tracking
58
+ - Inference & Generation
59
+ - Multiple Choice
60
+ - Multi-hop Clinical Deduction
61
+ - **Trap events** that test whether the agent correctly handles medication allergies, contraindications, and critical safety information
62
+ - **Bilingual**: Full Chinese and English versions with aligned content
63
+
64
+ ## Dataset Structure
65
+
66
+ ```
67
+ MedMemoryBench/
68
+ ├── README.md
69
+ ├── data/
70
+ │ ├── zh/ # Chinese version
71
+ │ │ ├── personas.parquet # 20 patient persona profiles
72
+ │ │ ├── events.parquet # 2,074 medical events timeline
73
+ │ │ ├── trap_events.parquet # 120 critical safety events
74
+ │ │ ├── dialogues.parquet # 31,976 dialogue turns (medical only)
75
+ │ │ ├── dialogues_with_noise.parquet # 84,068 turns (medical + noise)
76
+ │ │ ├── queries.parquet # 1,939 evaluation queries
77
+ │ │ ├── noise_sessions.parquet # 52,092 noise dialogue turns
78
+ │ │ └── clinical_reports.parquet # 20 five-phase clinical reports
79
+ │ └── en/ # English version
80
+ │ ├── personas.parquet # 20 patient persona profiles
81
+ │ ├── events.parquet # 2,074 medical events timeline
82
+ │ ├── trap_events.parquet # 120 critical safety events
83
+ │ ├── dialogues.parquet # 31,976 dialogue turns (medical only)
84
+ │ ├── dialogues_with_noise.parquet # 84,068 turns (medical + noise)
85
+ │ ├── queries.parquet # 1,939 evaluation queries
86
+ │ └── clinical_reports.parquet # 20 five-phase clinical reports
87
+ ```
88
+
89
+ > **Note:** `noise_sessions.parquet` is only available for the Chinese (zh) split as the standalone noise session data was generated exclusively in Chinese.
90
+
91
+ ## Data Fields
92
+
93
+ ### Dialogues (`dialogues.parquet`)
94
+
95
+ | Field | Type | Description |
96
+ |-------|------|-------------|
97
+ | `persona_id` | int | Patient persona identifier (1-20) |
98
+ | `session_id` | int | Consultation session number |
99
+ | `turn` | int | Turn number within the session |
100
+ | `role` | str | Speaker role: "user" (patient) or "assistant" (doctor) |
101
+ | `content` | str | Message content |
102
+ | `agent_type` | str | Agent type: "user_agent" or "doctor_agent" |
103
+ | `event_id` | int | Associated event ID from the event timeline |
104
+ | `event_info` | str (JSON) | Event details (event text, type, date) |
105
+ | `knowledge_points` | str (JSON) | Knowledge points extracted from this session |
106
+ | `kp_count` | int | Number of knowledge points in this session |
107
+ | `turn_count` | int | Total turns in this session |
108
+
109
+ ### Dialogues with Noise (`dialogues_with_noise.parquet`)
110
+
111
+ | Field | Type | Description |
112
+ |-------|------|-------------|
113
+ | `persona_id` | int | Patient persona identifier (1-20) |
114
+ | `session_id` | int | Session number |
115
+ | `session_type` | str | Session type: "medical", "noise_family", or "noise_health" |
116
+ | `event_id` | float | Associated event ID (null for noise sessions) |
117
+ | `event_info` | str (JSON) | Event details (null for noise sessions) |
118
+ | `knowledge_points` | str (JSON) | Knowledge points extracted from this session |
119
+ | `kp_count` | int | Number of knowledge points |
120
+ | `turn_count` | int | Total turns in this session |
121
+ | `noise_type` | str | Noise category: "family_health_consultation" or "health_knowledge" (null for medical) |
122
+ | `turn` | int | Turn number within the session |
123
+ | `role` | str | Speaker role: "user" (patient) or "assistant" (doctor) |
124
+ | `content` | str | Message content |
125
+
126
+ > **Note:** `dialogues.parquet` contains only medical sessions. `dialogues_with_noise.parquet` includes all sessions (medical + noise) to test memory robustness.
127
+
128
+ ### Queries (`queries.parquet`)
129
+
130
+ | Field | Type | Description |
131
+ |-------|------|-------------|
132
+ | `persona_id` | int | Patient persona identifier |
133
+ | `query_id` | str | Unique query identifier |
134
+ | `session_id` | int | Session context for the query |
135
+ | `query_type` | str | One of 6 evaluation categories |
136
+ | `question` | str | The evaluation question |
137
+ | `answers` | str (JSON) | Array of answer objects with `content`, `is_correct`, and `explanation` fields |
138
+ | `source_key_points` | str (JSON) | Source knowledge points referenced by this query |
139
+ | `metadata` | str (JSON) | Query metadata including `entity_type`, `entity_value`, `answer_format`, `difficulty` |
140
+
141
+ ### Personas (`personas.parquet`)
142
+
143
+ | Field | Type | Description |
144
+ |-------|------|-------------|
145
+ | `persona_id` | int | Unique identifier |
146
+ | `type_name` | str | Disease type and subtype |
147
+ | `gender` | str | Gender |
148
+ | `category` | str | Disease category (chronic/acute) |
149
+ | `core_feature` | str | Core clinical characteristics |
150
+ | `health_goals` | str (JSON) | Treatment goals |
151
+ | `age_range` | str | Age range |
152
+ | `occupation_detail` | str | Occupation details |
153
+ | `background_story` | str | Narrative background |
154
+ | `sleep_pattern` | str | Sleep pattern description |
155
+ | `diet_habits` | str | Dietary habits |
156
+ | `exercise_frequency` | str | Exercise frequency |
157
+ | `stress_level` | str | Stress level |
158
+ | `medical_history` | str (JSON) | Medical history |
159
+ | `disease_progression` | str (JSON) | Disease progression phases |
160
+
161
+ ### Events (`events.parquet`)
162
+
163
+ | Field | Type | Description |
164
+ |-------|------|-------------|
165
+ | `persona_id` | int | Patient persona identifier |
166
+ | `event_id` | int | Event sequence number |
167
+ | `event` | str | Event description |
168
+ | `type` | str | Event type (health/lifestyle/medication/work) |
169
+ | `event_date` | str | Event date (YYYY-MM-DD) |
170
+ | `triggered_by` | str (JSON) | IDs of causally preceding events |
171
+
172
+ ### Trap Events (`trap_events.parquet`)
173
+
174
+ | Field | Type | Description |
175
+ |-------|------|-------------|
176
+ | `persona_id` | int | Patient persona identifier |
177
+ | `event` | str | Critical safety event description |
178
+ | `type` | str | Type (allergy/medication_history/disease_history/preference) |
179
+ | `event_date` | str | Event date |
180
+ | `triggered_by` | str (JSON) | Causal predecessors |
181
+
182
+ ### Noise Sessions (`noise_sessions.parquet`)
183
+
184
+ | Field | Type | Description |
185
+ |-------|------|-------------|
186
+ | `persona_id` | int | Patient persona identifier |
187
+ | `noise_session_id` | float | Noise session identifier |
188
+ | `noise_type` | str | Noise type: "family_health_consultation" or "health_knowledge" |
189
+ | `turn` | int | Turn number within the session |
190
+ | `role` | str | Speaker role |
191
+ | `content` | str | Message content |
192
+ | `agent_type` | str | Agent type |
193
+
194
+ > **Note:** `noise_sessions.parquet` is only available for the Chinese (zh) split.
195
+
196
+ ### Clinical Reports (`clinical_reports.parquet`)
197
+
198
+ | Field | Type | Description |
199
+ |-------|------|-------------|
200
+ | `persona_id` | int | Patient persona identifier |
201
+ | `phase_1` | str | Clinical report for phase 1 |
202
+ | `phase_2` | str | Clinical report for phase 2 |
203
+ | `phase_3` | str | Clinical report for phase 3 |
204
+ | `phase_4` | str | Clinical report for phase 4 |
205
+ | `phase_5` | str | Clinical report for phase 5 |
206
+
207
+ ## Usage
208
+
209
+ ```python
210
+ from datasets import load_dataset
211
+
212
+ # Load dialogues (default config) - English split
213
+ dialogues_en = load_dataset("Cyan27/MedMemoryBench", name="dialogues", split="en")
214
+ print(f"English dialogue turns: {len(dialogues_en)}")
215
+
216
+ # Load dialogues - Chinese split
217
+ dialogues_zh = load_dataset("Cyan27/MedMemoryBench", name="dialogues", split="zh")
218
+ print(f"Chinese dialogue turns: {len(dialogues_zh)}")
219
+
220
+ # Load dialogues with noise (medical + noise sessions mixed)
221
+ noisy_en = load_dataset("Cyan27/MedMemoryBench", name="dialogues_with_noise", split="en")
222
+
223
+ # Load evaluation queries
224
+ queries_en = load_dataset("Cyan27/MedMemoryBench", name="queries", split="en")
225
+ print(f"English queries: {len(queries_en)}")
226
+
227
+ # Load patient personas
228
+ personas_en = load_dataset("Cyan27/MedMemoryBench", name="personas", split="en")
229
+
230
+ # Load events timeline
231
+ events_en = load_dataset("Cyan27/MedMemoryBench", name="events", split="en")
232
+
233
+ # Load trap events (critical safety events)
234
+ trap_events_en = load_dataset("Cyan27/MedMemoryBench", name="trap_events", split="en")
235
+
236
+ # Load noise sessions (Chinese only)
237
+ noise_sessions = load_dataset("Cyan27/MedMemoryBench", name="noise_sessions", split="zh")
238
+
239
+ # Load clinical reports
240
+ reports_en = load_dataset("Cyan27/MedMemoryBench", name="clinical_reports", split="en")
241
+ ```
242
+
243
+ ## Evaluation Protocol
244
+
245
+ The benchmark evaluates memory systems through a two-phase protocol:
246
+
247
+ 1. **Memorization Phase**: The agent reads all dialogue sessions for a persona sequentially, building its memory store.
248
+ 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.
249
+
250
+ ### Query Type Distribution (per persona)
251
+
252
+ | Query Type | Count | Description |
253
+ |------------|-------|-------------|
254
+ | Entity Exact Match | 20 | Recall specific medical facts |
255
+ | Temporal Localization | 20 | Identify when events occurred |
256
+ | State Update | 10 | Track how conditions evolved |
257
+ | Inference & Generation | 20 | Derive conclusions from memory |
258
+ | Multiple Choice | ~19 | Select correct option from choices |
259
+ | Multi-hop Clinical Deduction | ~8 | Chain multiple facts for reasoning |
260
+
261
+ ## Dataset Creation
262
+
263
+ ### Generation Pipeline
264
+
265
+ 1. **Persona Design**: 20 diverse patient profiles covering major chronic disease categories, each with detailed demographics, lifestyle, and medical history.
266
+ 2. **Event Graph Construction**: Causal event chains spanning 12 months, modeling realistic disease progression.
267
+ 3. **Dialogue Simulation**: Multi-turn patient-doctor conversations generated by specialized LLM agents (patient agent + doctor agent), grounded in the event timeline.
268
+ 4. **Noise Injection**: Family health consultations and unrelated health discussions inserted between medical sessions to test memory selectivity.
269
+ 5. **Query Generation**: Evaluation questions targeting specific memory capabilities, with expert-reviewed ground truth answers.
270
+ 6. **Quality Assurance**: Human expert review and deduplication of queries.
271
+
272
+ ### Source Data
273
+
274
+ 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).
275
+
276
+ ## Considerations
277
+
278
+ ### Ethical Considerations
279
+
280
+ - This dataset contains **synthetic medical dialogues** and does not include real patient data.
281
+ - All patient personas are fictional constructions designed for evaluation purposes.
282
+ - The dataset should NOT be used for actual clinical decision-making or medical advice.
283
+ - Generated medical content follows established clinical guidelines but may not reflect all real-world complexities.
284
+
285
+ ### Limitations
286
+
287
+ - Dialogues are generated by LLMs and may not capture the full variability of real patient-doctor interactions.
288
+ - Disease progression follows simplified models; real clinical trajectories are more heterogeneous.
289
+ - The benchmark focuses on factual memory and does not evaluate empathy, communication style, or clinical judgment quality.
290
+
291
+ ### Licensing
292
+
293
+ 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.
294
+
295
+ ## Citation
296
+
297
+ ```bibtex
298
+ @inproceedings{medmemorybench2026,
299
+ title={MedMemoryBench: A Bilingual Benchmark for Evaluating Long-Term Memory in Medical LLM Agents},
300
+ author={},
301
+ booktitle={NeurIPS 2026 Datasets and Benchmarks Track},
302
+ year={2026}
303
+ }
304
+ ```