wyhhey commited on
Commit
c14598e
·
verified ·
1 Parent(s): 763351f

Keep multimodal release source-only

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. README.md +62 -298
  2. data/mm_bench/ehrxqa/database/patient_10020740.db +0 -3
  3. data/mm_bench/ehrxqa/database/patient_10037020.db +0 -0
  4. data/mm_bench/ehrxqa/database/patient_10110584.db +0 -0
  5. data/mm_bench/ehrxqa/database/patient_10117273.db +0 -3
  6. data/mm_bench/ehrxqa/database/patient_10127462.db +0 -0
  7. data/mm_bench/ehrxqa/database/patient_10130585.db +0 -0
  8. data/mm_bench/ehrxqa/database/patient_10156395.db +0 -3
  9. data/mm_bench/ehrxqa/database/patient_10163947.db +0 -3
  10. data/mm_bench/ehrxqa/database/patient_10176458.db +0 -3
  11. data/mm_bench/ehrxqa/database/patient_10304606.db +0 -3
  12. data/mm_bench/ehrxqa/database/patient_10397160.db +0 -0
  13. data/mm_bench/ehrxqa/database/patient_10405915.db +0 -3
  14. data/mm_bench/ehrxqa/database/patient_10410672.db +0 -3
  15. data/mm_bench/ehrxqa/database/patient_10441850.db +0 -0
  16. data/mm_bench/ehrxqa/database/patient_10501557.db +0 -3
  17. data/mm_bench/ehrxqa/database/patient_10518993.db +0 -3
  18. data/mm_bench/ehrxqa/database/patient_10646008.db +0 -0
  19. data/mm_bench/ehrxqa/database/patient_10667992.db +0 -0
  20. data/mm_bench/ehrxqa/database/patient_10680329.db +0 -3
  21. data/mm_bench/ehrxqa/database/patient_11049760.db +0 -0
  22. data/mm_bench/ehrxqa/database/patient_11053589.db +0 -3
  23. data/mm_bench/ehrxqa/database/patient_11111102.db +0 -3
  24. data/mm_bench/ehrxqa/database/patient_11198939.db +0 -0
  25. data/mm_bench/ehrxqa/database/patient_11320106.db +0 -3
  26. data/mm_bench/ehrxqa/database/patient_11350319.db +0 -3
  27. data/mm_bench/ehrxqa/database/patient_11422357.db +0 -3
  28. data/mm_bench/ehrxqa/database/patient_11461300.db +0 -0
  29. data/mm_bench/ehrxqa/database/patient_11572460.db +0 -3
  30. data/mm_bench/ehrxqa/database/patient_11632359.db +0 -3
  31. data/mm_bench/ehrxqa/database/patient_11636169.db +0 -3
  32. data/mm_bench/ehrxqa/database/patient_11801290.db +0 -3
  33. data/mm_bench/ehrxqa/database/patient_11929103.db +0 -3
  34. data/mm_bench/ehrxqa/database/patient_11950244.db +0 -3
  35. data/mm_bench/ehrxqa/database/patient_11966699.db +0 -3
  36. data/mm_bench/ehrxqa/database/patient_11982468.db +0 -3
  37. data/mm_bench/ehrxqa/database/patient_11999272.db +0 -0
  38. data/mm_bench/ehrxqa/database/patient_12106566.db +0 -3
  39. data/mm_bench/ehrxqa/database/patient_12108393.db +0 -0
  40. data/mm_bench/ehrxqa/database/patient_12215941.db +0 -3
  41. data/mm_bench/ehrxqa/database/patient_12250782.db +0 -3
  42. data/mm_bench/ehrxqa/database/patient_12262788.db +0 -3
  43. data/mm_bench/ehrxqa/database/patient_12360014.db +0 -3
  44. data/mm_bench/ehrxqa/database/patient_12405140.db +0 -3
  45. data/mm_bench/ehrxqa/database/patient_12429112.db +0 -3
  46. data/mm_bench/ehrxqa/database/patient_12604446.db +0 -3
  47. data/mm_bench/ehrxqa/database/patient_12648153.db +0 -3
  48. data/mm_bench/ehrxqa/database/patient_12716528.db +0 -3
  49. data/mm_bench/ehrxqa/database/patient_12724975.db +0 -3
  50. data/mm_bench/ehrxqa/database/patient_12727273.db +0 -3
README.md CHANGED
@@ -20,328 +20,92 @@ configs:
20
 
21
  # ClinSeek-Bench
22
 
23
- The exact evaluation set used for the ClinSeek hierarchical benchmark
24
- (`UCSC-VLAA/ClinSeek-Evaluation-Results`, under `hierarchical/`). This
25
- repository ships **everything** needed to reproduce a run end to end:
 
 
26
 
27
- - the original benchmark inputs (questions, gold labels, patient pointers);
28
- - per-patient SQLite databases for every `subject_id` referenced;
29
- - the linked chest X-ray images and radiology reports for the multimodal
30
- split;
31
- - table-description metadata used by the EHR MCP server.
32
 
33
- | Split | # data points | Modality | Total assets |
34
- |--------------|--------------:|--------------------------------|---------------------|
35
- | `ehr_bench` | **1,800** | text-only | 1,563 patient DBs |
36
- | `mm_bench` | **989** | text + chest X-ray (image) | 560 patient DBs · 827 CXR JPGs · 356 radiology reports |
37
- | **Total** | **2,789** | | |
38
 
39
- `mm_bench` here is restricted to **image-grounded** questions only — text-only EHR-query questions from the upstream
40
- multimodal test set are excluded because they are not part of the multimodal evaluation track.
41
 
42
- ## Two evaluation modes, one question set
43
-
44
- Each data point is evaluated under **two** modes that share an identical question set:
45
-
46
- | Mode | Driver | Patient EHR delivered as | Notes |
47
- |-----------|---------------------------------|--------------------------------|-----------------------------------------------------------------------|
48
- | `agentic` | `deploy_agent.py` / `deploy_agent_mm.py` | **fetched at runtime** via an EHR MCP server (`ehr.load_ehr` + SQL/lookup tools) | Multi-turn tool use; agent decides what to look up. |
49
- | `oneshot` | `deploy_reasoning_model.py` / `deploy_reasoning_model_mm.py` | **inlined** in the prompt (pre-rendered EHR slice) | Single LLM call; everything the model needs is in the prompt. |
50
-
51
- The same `qid` produces one row in
52
- `UCSC-VLAA/ClinSeek-Evaluation-Results/hierarchical/agentic/<bench>/<model>/.../rows.jsonl`
53
- **and** one row in
54
- `UCSC-VLAA/ClinSeek-Evaluation-Results/hierarchical/oneshot/<bench>/<model>/.../rows.jsonl`,
55
- so the two scores are directly comparable.
56
-
57
- ## How each mode reads the inputs
58
-
59
- ### `ehr_bench`
60
-
61
- Both modes consume the same file: **`inputs/ehr_bench.json`** — a JSON list of 1,800 records. Each record carries fields
62
- for both modes:
63
-
64
- | Mode | Fields the driver actually reads | Prompt the model sees |
65
- |-----------|----------------------------------|-----------------------|
66
- | `agentic` | `instruction`, `prediction_time`, `subject_id`, `candidates` | A small instruction wrapper that names the patient and lists candidate answers. **No patient EHR is inlined.** The agent must call `ehr.load_ehr(subject_id, prediction_time)` against the MCP server (which opens `data/ehr_bench/database/patient_<subject_id>.db`) and then issue further `ehr.*` tool calls. |
67
- | `oneshot` | `question` | A fully self-contained prompt (instruction + entire patient timeline rendered as Markdown) plus `<candidate_answers>` block. **No external lookup needed.** |
68
-
69
- Why two prompt forms? `question` is a long pre-rendered timeline (avg ≈10 KB, max ≈90 KB) — appropriate for one-shot
70
- inference but redundant in agentic mode where the agent should retrieve only what it needs.
71
-
72
- ```python
73
- import json
74
-
75
- # Load the shared input file.
76
- rows = json.load(open("inputs/ehr_bench.json"))
77
- row = next(r for r in rows if r["qid"] == "ehr_bench_decision_making_0")
78
-
79
- # --- agentic input (build the agent prompt + open the patient DB) -----------
80
- agentic_prompt_template = """The current time is {prediction_time}.
81
- The patient subject_id is {subject_id}.
82
- {instruction}
83
- <candidate_answers>
84
- {candidates}
85
- </candidate_answers>"""
86
- agentic_prompt = agentic_prompt_template.format(
87
- prediction_time=row["prediction_time"],
88
- subject_id=row["subject_id"],
89
- instruction=row["instruction"],
90
- candidates=json.dumps(row["candidates"]),
91
- )
92
- patient_db = f"data/ehr_bench/database/patient_{row['subject_id']}.db" # the agent's MCP server opens this
93
-
94
- # --- oneshot input (single LLM call, prompt is fully self-contained) --------
95
- oneshot_prompt = row["question"] # 1 kB → 90 kB, depending on the patient
96
- ```
97
-
98
- The exact agentic prompt template is `EHR_Bench_Prompt` in
99
- [`openresearcher_ehr/data_utils.py:135`](https://github.com/Letian2003/DeepMed/blob/deepresearch/openresearcher_ehr/data_utils.py)
100
- (function `generate_ehr_bench_prompt`). The exact oneshot wrapper is
101
- [`build_user_content` in `deploy_reasoning_model.py:70`](https://github.com/Letian2003/DeepMed/blob/deepresearch/openresearcher_ehr/deploy_reasoning_model.py)
102
- (it appends a short `<answer>...</answer>` extraction trailer to `row["question"]`).
103
-
104
- ### `mm_bench`
105
-
106
- Both modes consume the same file: **`inputs/mm_bench.jsonl`** — a JSONL of 989 records. Each record carries fields for
107
- both modes:
108
-
109
- | Mode | Fields the driver actually reads | Prompt the model sees |
110
- |-----------|----------------------------------|-----------------------|
111
- | `agentic` | `question`, `image_paths`, `report_paths`, `subject_id`, `source_benchmark` | The bare task instruction (`question`, ≈540 chars). Patient EHR is fetched at runtime via EHR MCP (`ehr.load_ehr(subject_id, prediction_time)` against `data/mm_bench/<source>/database/patient_<subject_id>.db`); CXR images are attached to the user turn as image blocks; radiology reports may be inlined via tool calls. |
112
- | `oneshot` | `input_text` (preferred) or `question` (fallback), `image_paths` | A pre-rendered prompt (`input_text`, avg ≈24 KB, max ≈64 KB) that already contains `<patient_info>` + `<cxr_info>` + sliced `<ehr_context>` (top-N rows from each table) + `<image_inputs>` listing. CXR images are inlined into the user turn as base64 image blocks. **No DB lookup needed.** |
113
-
114
- ```python
115
- import json
116
-
117
- # Load the shared input file.
118
- mm = [json.loads(l) for l in open("inputs/mm_bench.jsonl")]
119
- row = next(r for r in mm if r["qid"] == "medmod_radiology_test_56445431")
120
-
121
- # Pick the right bench root for assets and the per-patient DB.
122
- bench_root = f"data/mm_bench/{ 'ehrxqa' if row['source_benchmark']=='ehrxqa' else 'medmod' }"
123
- patient_db = f"{bench_root}/database/patient_{row['subject_id']}.db"
124
-
125
- # Resolve image_paths against bench_root (paths keep an upstream prefix that
126
- # we strip — see openresearcher_ehr/deploy_reasoning_model_mm.py:78).
127
- def resolve(p):
128
- first, sep, rest = p.partition("/")
129
- if sep and (first.endswith("OriginalLinked_v1") or first.endswith("AgentBench_v3")):
130
- p = rest
131
- return f"{bench_root}/{p}"
132
-
133
- image_files = [resolve(p) for p in (row.get("image_paths") or [])]
134
-
135
- # --- agentic input ----------------------------------------------------------
136
- agentic_prompt = row["question"] # ≈ 540 chars
137
- agentic_assets = {"images": image_files, "patient_db": patient_db}
138
-
139
- # --- oneshot input (preferred form) -----------------------------------------
140
- oneshot_prompt = row.get("input_text") or row["question"] # ≈ 24 kB
141
- oneshot_assets = {"images": image_files} # no DB needed
142
- ```
143
-
144
- `row["input_text"]` is the model-ready oneshot rendering; if it is missing or empty, fall back to `row["question"]`.
145
- The actual logic is `build_text_payload` in
146
- [`deploy_reasoning_model_mm.py:150`](https://github.com/Letian2003/DeepMed/blob/deepresearch/openresearcher_ehr/deploy_reasoning_model_mm.py).
147
-
148
- ## Directory layout
149
-
150
- ```
151
  ClinSeek-Bench/
152
- ├── README.md # this file
153
  ├── inputs/
154
- │ ├── ehr_bench.json # 1,800 records (text-only EHR-Bench)
155
- │ └── mm_bench.jsonl # 989 records (multimodal MM-Bench, image-grounded)
156
- └── data/
157
- ── ehr_bench/
158
- │ ├── database/
159
- │ │ ├── candidate_table.db # vocabulary / candidate-answer table
160
- │ │ └── patient_<subject_id>.db # 1,563 per-patient SQLite DBs (≈2.0 GB)
161
- │ └── table_description/ # JSON metadata used by the EHR MCP server
162
- │ ├── link_information.json
163
- │ ├── shorten_description.json
164
- │ └── table_description.json
165
- └── mm_bench/
166
- ├── ehrxqa/ # rows where source_benchmark == "ehrxqa" (497 rows)
167
- │ ├── database/ # 165 per-patient SQLite DBs
168
- │ ├── mimic-cxr/2.0.0/files/... # linked CXR JPGs + report .txt
169
- │ └── table_description/
170
- └── medmod/ # rows where source_benchmark == "medmod" (492 rows)
171
- ├── database/ # 395 per-patient SQLite DBs
172
- ├── mimic-cxr/2.0.0/files/... # linked CXR JPGs
173
- └── table_description/
174
  ```
175
 
176
- ## Running an evaluation against this repo
 
 
 
177
 
178
- After cloning, point each driver at the matching `--data` and `--bench-root` (or `--ehr_path`) inside this folder.
179
 
180
- ### EHR-Bench
 
181
 
182
- ```bash
183
- # 0. Start the EHR MCP server on the ehr_bench root (agentic mode only)
184
- python src/run_mcp_server.py \
185
- --mode http --host 127.0.0.1 --port 5103 \
186
- --data_path /path/to/ClinSeek-Bench/data/ehr_bench
187
- # This server exposes ehr.load_ehr / ehr.run_sql_query / ehr.* tools backed
188
- # by the patient_*.db files in data/ehr_bench/database/.
189
-
190
- # 1a. Agentic — multi-turn tool use; reads instruction/subject_id/candidates,
191
- # fetches EHR via the MCP server above.
192
- python openresearcher_ehr/deploy_agent.py \
193
- --data_path /path/to/ClinSeek-Bench/inputs/ehr_bench.json \
194
- --output_dir ./out_agentic_ehr \
195
- --mcp_url http://127.0.0.1:5103/mcp \
196
- --model <model-name>
197
 
198
- # 1b. One-shot — single LLM call; reads `question` (which already inlines the
199
- # patient timeline). No MCP server needed.
200
- python openresearcher_ehr/deploy_reasoning_model.py \
201
- --data /path/to/ClinSeek-Bench/inputs/ehr_bench.json \
202
- --output-dir ./out_oneshot_ehr \
203
- --model <model-name>
204
- ```
205
-
206
- ### MM-Bench
207
 
208
  ```bash
209
- # 0. Start the MM EHR MCP server on each multimodal sub-root (agentic only).
210
- # The driver accepts multiple --bench-root paths so a single server isn't
211
- # required, but the simplest setup is one MCP server per source split.
212
- python src/run_mcp_server.py --port 5113 --data_path /path/to/ClinSeek-Bench/data/mm_bench/ehrxqa &
213
- python src/run_mcp_server.py --port 5114 --data_path /path/to/ClinSeek-Bench/data/mm_bench/medmod &
214
-
215
- # 1a. Agentic — reads `question` + image_paths + subject_id; image MCP +
216
- # EHR MCP servers handle assets and DB.
217
- python openresearcher_ehr/deploy_agent_mm.py \
218
- --data /path/to/ClinSeek-Bench/inputs/mm_bench.jsonl \
219
- --output_dir ./out_agentic_mm \
220
- --bench_root /path/to/ClinSeek-Bench/data/mm_bench/ehrxqa \
221
- /path/to/ClinSeek-Bench/data/mm_bench/medmod \
222
- --image_mcp_url http://127.0.0.1:5203/mcp \
223
- --enable_ehr --ehrxqa_mcp_url http://127.0.0.1:5113/mcp \
224
- --medmod_mcp_url http://127.0.0.1:5114/mcp \
225
- --model <model-name>
226
-
227
- # 1b. One-shot — reads `input_text` (already has EHR inlined) + image_paths.
228
- # No MCP server needed; just resolve the images.
229
- python openresearcher_ehr/deploy_reasoning_model_mm.py \
230
- --data /path/to/ClinSeek-Bench/inputs/mm_bench.jsonl \
231
- --output-dir ./out_oneshot_mm \
232
- --bench-root /path/to/ClinSeek-Bench/data/mm_bench/ehrxqa \
233
- /path/to/ClinSeek-Bench/data/mm_bench/medmod \
234
- --model <model-name>
235
  ```
236
 
237
- The drivers above live in this repo:
238
- - <https://github.com/Letian2003/DeepMed/blob/deepresearch/openresearcher_ehr/deploy_agent.py>
239
- - <https://github.com/Letian2003/DeepMed/blob/deepresearch/openresearcher_ehr/deploy_reasoning_model.py>
240
- - <https://github.com/Letian2003/DeepMed/blob/deepresearch/openresearcher_ehr/deploy_agent_mm.py>
241
- - <https://github.com/Letian2003/DeepMed/blob/deepresearch/openresearcher_ehr/deploy_reasoning_model_mm.py>
242
-
243
- ## Schema reference
244
-
245
- ### `inputs/ehr_bench.json`
246
 
247
- ```jsonc
248
- [
249
- {
250
- "qid": "ehr_bench_risk_prediction_329", // stable id; matches results rows.jsonl
251
- "subject_id": 12345678, // → patient DB lookup key
252
- "hadm_id": 23456789,
253
- "prediction_time": "2183-08-13 01:15:18", // cutoff time the patient EHR is sliced at
254
- "latest_event_time": "2183-08-13 01:15:17",
255
- "task": "ED_Critical_Outcomes", // L4-style task tag
256
- "task_type": "decision_making" | "risk_prediction",
257
- "label": "yes" | ["..."], // gold answer
258
- "question": "<task_instruction>...full timeline...</question>", // ONESHOT prompt
259
- "instruction": "Given the sequence of events ...", // AGENTIC prompt
260
- "input": "## Patient Demographics ...", // structured EHR (also fed into `question`)
261
- "output": "OBSERVATION ADMIT", // gold (string form)
262
- "candidates": ["...", "..."], // discrete answer options
263
- "task_info": { "...": "..." }, // metric / target / split info
264
- "source_idx": 0,
265
- "source_file": "ehr_bench_risk_prediction.jsonl"
266
- }
267
- ]
268
- ```
269
-
270
- ### `inputs/mm_bench.jsonl`
271
 
272
- ```jsonc
273
- {
274
- "qid": "medmod_radiology_test_56445431", // stable id
275
- "subject_id": 17795062, // → patient DB lookup key
276
- "hadm_id": 22792685,
277
- "stay_id": 39825171,
278
- "prediction_time": "2177-07-25 22:04:23",
279
- "task": "medmod_radiology", // task tag
280
- "answer_type": "list" | "label",
281
- "modalities": ["cxr_image", "cxr_table"], // which assets are referenced
282
- "ground_truth": [{"name": "Cardiomegaly"}, ...], // gold answer
283
- "question": "<task_instruction>...question only, no EHR...</question>", // AGENTIC prompt
284
- "input_text": "<task_instruction>...<ehr_context>...inlined CSV slices...<image_inputs>", // ONESHOT prompt
285
- "image_paths": ["MedModOriginalLinked_v1/mimic-cxr/2.0.0/files/p17/p17795062/s56445431/<dicom>.jpg"],
286
- "report_paths": [], // optional radiology report .txt
287
- "source_benchmark": "medmod" | "ehrxqa", // → which bench root to resolve assets against
288
- "source_split": "test",
289
- "source_index": 0
290
- }
291
- ```
292
 
293
- > **Path note.** `image_paths` and `report_paths` keep an upstream layout prefix (`MedModOriginalLinked_v1/...` or
294
- > `EHRXQAOriginalLinked_v1/...`). The drivers strip the first segment and re-resolve under each bench root, so the
295
- > physical files in this repo live at `data/mm_bench/<source>/mimic-cxr/2.0.0/...`. If you write your own loader,
296
- > mirror that strip-prefix-then-join logic.
297
 
298
- ## Pairing with the result repository
299
 
300
- Per-row scored predictions live in **`UCSC-VLAA/ClinSeek-Evaluation-Results`** under
301
- `hierarchical/{agentic,oneshot}/{bench}/{model}/L1.<modality>/L2.<family>/L3.<sub>/L4.<task>/rows.jsonl`. To pull both
302
- modes for the same data point under one model:
303
 
304
- ```python
305
- import json, os
306
-
307
- INPUTS = "inputs/ehr_bench.json" # or inputs/mm_bench.jsonl (read line-by-line)
308
- RESULTS_REPO = "/path/to/ClinSeek-Evaluation-Results"
309
-
310
- with open(INPUTS) as f:
311
- rows = json.load(f)
312
- row = rows[0] # any data point
313
- qid = row["qid"]
314
-
315
- def load_score(model, mode, bench):
316
- base = f"{RESULTS_REPO}/hierarchical/{mode}/{bench}/{model}"
317
- for dirpath, _, files in os.walk(base):
318
- if "rows.jsonl" in files:
319
- with open(os.path.join(dirpath, "rows.jsonl")) as f:
320
- for line in f:
321
- r = json.loads(line)
322
- if r["qid"] == qid:
323
- return r
324
- return None
325
-
326
- agentic = load_score("claude_opus_4_6", "agentic", "ehr_bench")
327
- oneshot = load_score("claude_opus_4_6", "oneshot", "ehr_bench")
328
- print("agentic F1:", agentic["f1"], "| oneshot F1:", oneshot["f1"])
329
  ```
330
 
331
- ## Provenance
332
 
333
- - **`ehr_bench`** is the 40-rows-per-task balanced subset of EHR-Bench. The full upstream files are
334
- `data/EHR-Bench/ehr_bench_decision_making.jsonl` (13,500 rows) +
335
- `data/EHR-Bench/ehr_bench_risk_prediction.jsonl` (7,721 rows)
336
- `ehr_bench_sampled_40_per_task.json` (1,800 rows = 27 decision_making leaves × 40 + 18 risk_prediction leaves × 40).
337
- - **`mm_bench`** is the image-grounded subset of the combined multimodal test set
338
- (`combined_test_set.jsonl` / `model_ready_combined_test_set.jsonl`, 2,703 rows total). The 1,704 text-only
339
- EHR-query rows are excluded; the 989 rows kept here are the rows scored under `mm_bench` in the result repository.
340
- - **EHR-Bench DBs** are sourced from the upstream EHR-Bench release (MIMIC-IV-derived per-patient snapshots).
341
- - **MM-Bench DBs / images / reports** are sourced from `EHRXQAAgentBench_v3` (EHR-XQA test rows) and
342
- `MedModAgentBench_v3` (MedMod test rows) — both are MIMIC-IV / MIMIC-CXR-JPG derivatives.
343
 
344
- ## License & access
345
 
346
- Private. Inherits the access constraints of MIMIC-IV (PhysioNet credentialed) and MIMIC-CXR-JPG (PhysioNet credentialed)
347
- for the underlying patient data. Use only in accordance with those data-use agreements.
 
20
 
21
  # ClinSeek-Bench
22
 
23
+ ClinSeek-Bench provides the evaluation manifests used by ClinSeekAgent. The
24
+ multimodal split is released as a source-only manifest because MIMIC-derived
25
+ patient databases, chest X-ray JPG files, radiology reports, and rendered EHR
26
+ contexts are protected assets and must be rebuilt locally under each user's own
27
+ credentialed access and data-use agreements.
28
 
29
+ | Split | # data points | Modality | Released here |
30
+ | --- | ---: | --- | --- |
31
+ | `ehr_bench` | 1,800 | text-only EHR | evaluation manifest |
32
+ | `mm_bench` | 989 | EHR + chest X-ray | source manifest only |
 
33
 
34
+ `mm_bench` is restricted to image-grounded multimodal examples. It contains 497
35
+ EHRXQA-derived CXR question-answering rows and 492 MedMod-derived ICU/CXR
36
+ prediction rows.
 
 
37
 
38
+ ## Files
 
39
 
40
+ ```text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  ClinSeek-Bench/
 
42
  ├── inputs/
43
+ │ ├── ehr_bench.json
44
+ │ └── mm_bench.jsonl
45
+ └── rebuild/
46
+ ── text_bench/
47
+ ── ClinSeek-Bench_text.json
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  ```
49
 
50
+ The multimodal manifest `inputs/mm_bench.jsonl` stores released `qid`s,
51
+ questions, normalized labels, patient identifiers, prediction-time cutoffs, and
52
+ relative CXR/report references. It intentionally does not store `input_text`,
53
+ patient SQLite databases, CXR JPG files, or report text.
54
 
55
+ ## Reconstructing Multimodal Assets
56
 
57
+ Multimodal reconstruction scripts are maintained in the ClinSeekAgent GitHub
58
+ repository, matching the text benchmark data-preparation workflow:
59
 
60
+ - documentation: https://github.com/UCSC-VLAA/ClinSeekAgent/blob/main/docs/ClinSeek-Bench_multimodal_data_prepare.md
61
+ - scripts: https://github.com/UCSC-VLAA/ClinSeekAgent/tree/main/scripts/data_build
 
 
 
 
 
 
 
 
 
 
 
 
 
62
 
63
+ At a high level:
 
 
 
 
 
 
 
 
64
 
65
  ```bash
66
+ git clone https://huggingface.co/datasets/UCSC-VLAA/ClinSeek-Bench
67
+ git clone https://github.com/UCSC-VLAA/ClinSeekAgent.git
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  ```
69
 
70
+ Then run the scripts under `ClinSeekAgent/scripts/data_build/` with local paths
71
+ to the official source datasets.
 
 
 
 
 
 
 
72
 
73
+ Required multimodal source data:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
 
75
+ | Dataset | Source |
76
+ | --- | --- |
77
+ | MIMIC-IV | https://physionet.org/content/mimiciv/ |
78
+ | MIMIC-CXR | https://physionet.org/content/mimic-cxr/ |
79
+ | MIMIC-CXR-JPG | https://physionet.org/content/mimic-cxr-jpg/ |
80
+ | MIMIC-IV-Note | https://physionet.org/content/mimic-iv-note/ |
81
+ | EHRXQA | https://physionet.org/content/ehrxqa/ |
82
+ | MedMod code | https://github.com/nyuad-cai/MedMod |
 
 
 
 
 
 
 
 
 
 
 
 
83
 
84
+ The final local reconstruction materializes `ClinSeek-MM-Bench/inputs/mm_bench.jsonl`
85
+ with rendered `input_text`, plus `data/mm_bench/ehrxqa/` and
86
+ `data/mm_bench/medmod/` containing patient SQLite databases, linked CXR JPGs,
87
+ radiology reports when available, and table-description metadata.
88
 
89
+ ## Validation
90
 
91
+ After cloning ClinSeekAgent, validate the released multimodal source manifest:
 
 
92
 
93
+ ```bash
94
+ python ClinSeekAgent/scripts/data_build/validate_multimodal_release.py \
95
+ --bench-root ClinSeek-Bench \
96
+ --manifest-only
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  ```
98
 
99
+ Expected source-manifest counts:
100
 
101
+ - 989 total multimodal rows.
102
+ - 497 EHRXQA-derived rows.
103
+ - 492 MedMod-derived rows.
104
+ - 350 unique EHRXQA linked CXR JPG paths.
105
+ - 477 unique MedMod linked CXR JPG paths.
106
+ - 356 unique EHRXQA linked CXR report paths.
 
 
 
 
107
 
108
+ ## Citation
109
 
110
+ Please cite the ClinSeek paper and the upstream source benchmarks used for any
111
+ reconstructed multimodal assets.
data/mm_bench/ehrxqa/database/patient_10020740.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:e40190e2121733dce90354fc65b7e62b42f7d328fb2496b70260ff971df2765d
3
- size 110592
 
 
 
 
data/mm_bench/ehrxqa/database/patient_10037020.db DELETED
Binary file (36.9 kB)
 
data/mm_bench/ehrxqa/database/patient_10110584.db DELETED
Binary file (86 kB)
 
data/mm_bench/ehrxqa/database/patient_10117273.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:96e6711b3f43b9b74b3e4f474ad57d91bfa3f105ec9efb56f617fe71a087bac4
3
- size 294912
 
 
 
 
data/mm_bench/ehrxqa/database/patient_10127462.db DELETED
Binary file (94.2 kB)
 
data/mm_bench/ehrxqa/database/patient_10130585.db DELETED
Binary file (81.9 kB)
 
data/mm_bench/ehrxqa/database/patient_10156395.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:d8fefae661196a737541d75336f3deadd0be361e180a4c7ac983fd9740554ac9
3
- size 131072
 
 
 
 
data/mm_bench/ehrxqa/database/patient_10163947.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:be20ae3b09a0d2e18affa217621c10f04dd1519d0fa5d1b58ecf39205566f490
3
- size 139264
 
 
 
 
data/mm_bench/ehrxqa/database/patient_10176458.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:be59ade904bcb514641069ac77423a2fc60015a28d73c209207f47dd0a4584eb
3
- size 389120
 
 
 
 
data/mm_bench/ehrxqa/database/patient_10304606.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:8805d134a63d2ecf23db853ee9c73385e2eef72bf2eded78dc7a8b82664d99d4
3
- size 118784
 
 
 
 
data/mm_bench/ehrxqa/database/patient_10397160.db DELETED
Binary file (77.8 kB)
 
data/mm_bench/ehrxqa/database/patient_10405915.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:b235800adbab14163e8d95f5493f066b656e2f6a2b4a8d881aa6ecfa049407b4
3
- size 114688
 
 
 
 
data/mm_bench/ehrxqa/database/patient_10410672.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:53a20b617bb5d5b3db72f7311e5d031ab13c5b0ab59879cdceac0052c8f0641c
3
- size 131072
 
 
 
 
data/mm_bench/ehrxqa/database/patient_10441850.db DELETED
Binary file (45.1 kB)
 
data/mm_bench/ehrxqa/database/patient_10501557.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:33dad98f6f5d8c9bcb31be565d7c1750417e7f82ff63a79bb7e166c7ab9ea086
3
- size 118784
 
 
 
 
data/mm_bench/ehrxqa/database/patient_10518993.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:abc9dc26fa13e24aa18911874af0e5f23dc20158b246569557da737ac0bf5a4f
3
- size 417792
 
 
 
 
data/mm_bench/ehrxqa/database/patient_10646008.db DELETED
Binary file (45.1 kB)
 
data/mm_bench/ehrxqa/database/patient_10667992.db DELETED
Binary file (49.2 kB)
 
data/mm_bench/ehrxqa/database/patient_10680329.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:c3b6a02b4433cce33ef8275705c760e8f7579e5b6c8605d6816377b43209dd54
3
- size 126976
 
 
 
 
data/mm_bench/ehrxqa/database/patient_11049760.db DELETED
Binary file (49.2 kB)
 
data/mm_bench/ehrxqa/database/patient_11053589.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:0f8287822293919376d1b504a47831e2f14d28eddd8d7161735b239500e31ee8
3
- size 233472
 
 
 
 
data/mm_bench/ehrxqa/database/patient_11111102.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:78553d92582c3bf9befa55b2f9794cf516ed07363dcb7900cb9cec05ed5ea473
3
- size 278528
 
 
 
 
data/mm_bench/ehrxqa/database/patient_11198939.db DELETED
Binary file (90.1 kB)
 
data/mm_bench/ehrxqa/database/patient_11320106.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:ff78be6ec908772702ae4a5aef49b1a0f704fae558d79ce143b7fd422112ec64
3
- size 172032
 
 
 
 
data/mm_bench/ehrxqa/database/patient_11350319.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:61a6f2b87dd35771b6072c42442adf0c24da55257927b01c76f61a6264b56e9c
3
- size 286720
 
 
 
 
data/mm_bench/ehrxqa/database/patient_11422357.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:7a1dc603a6839db2d1794c1ae62f46a49383ccd8a92dd732c8e1a6af93f7b0de
3
- size 159744
 
 
 
 
data/mm_bench/ehrxqa/database/patient_11461300.db DELETED
Binary file (77.8 kB)
 
data/mm_bench/ehrxqa/database/patient_11572460.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:c9e3922f49279a0a5ea7dfcb5f2cfc20df6652d46696c5ce5cde9f490835aea9
3
- size 110592
 
 
 
 
data/mm_bench/ehrxqa/database/patient_11632359.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:42c15c1673b400ad7f2e8e3e29f4dd30f705e3a6c68344b282a853f262a88b80
3
- size 110592
 
 
 
 
data/mm_bench/ehrxqa/database/patient_11636169.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:d20ea570399e6dc2211fd9b1896fc705e46abbb792cad3bdad63065e7ea768ed
3
- size 221184
 
 
 
 
data/mm_bench/ehrxqa/database/patient_11801290.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:48df3ea8d1f5420c2b36ee5ad10d80691949aae98fa77b92f54f9ed122c11dc4
3
- size 176128
 
 
 
 
data/mm_bench/ehrxqa/database/patient_11929103.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:bfa29c1228158db1ecdf36f006ed72f1bd941189bf996606ae9eed2ffc86077a
3
- size 163840
 
 
 
 
data/mm_bench/ehrxqa/database/patient_11950244.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:4aab78df9dc9eda9a77e5de7fdcc3d07ea9076e11d19fe0b78911a730a41ae9d
3
- size 159744
 
 
 
 
data/mm_bench/ehrxqa/database/patient_11966699.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:c29205befe682161c087119bdae30d911b1031bbf59b56b0dd27b70e10e2bef9
3
- size 192512
 
 
 
 
data/mm_bench/ehrxqa/database/patient_11982468.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:d29d48cec5615ed2bd1e8783131453a1de6fd88a087916869455150583f66e6c
3
- size 118784
 
 
 
 
data/mm_bench/ehrxqa/database/patient_11999272.db DELETED
Binary file (94.2 kB)
 
data/mm_bench/ehrxqa/database/patient_12106566.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:d3f2749ee2086c093e7f3fb609ffa68a57c7a97e068f864a26a003513c390ed9
3
- size 110592
 
 
 
 
data/mm_bench/ehrxqa/database/patient_12108393.db DELETED
Binary file (53.2 kB)
 
data/mm_bench/ehrxqa/database/patient_12215941.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:ce05444d57ecff94878f1abaecb80a7c0ecb3d834d7d8d04801a68c41bfe48c3
3
- size 356352
 
 
 
 
data/mm_bench/ehrxqa/database/patient_12250782.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:6f85ff4f7b9e2407bcf48860924a27aaa5ecae7ec39edc70196d33b024718024
3
- size 131072
 
 
 
 
data/mm_bench/ehrxqa/database/patient_12262788.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:9814dbaff706089131b5134cae640641766b6e8b933c66a46de93db719d21a82
3
- size 118784
 
 
 
 
data/mm_bench/ehrxqa/database/patient_12360014.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:a3c91aab006db904cf85c4fc921c20625b485df21a98f3b425208fd09dff32d2
3
- size 135168
 
 
 
 
data/mm_bench/ehrxqa/database/patient_12405140.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:4d43ab30f8473e8aacace0322085bf16fb1ebb658ae930b12917ee75804cf1f8
3
- size 126976
 
 
 
 
data/mm_bench/ehrxqa/database/patient_12429112.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:b9fead6b2d922f034e6f7524cf3f42a57fd53d428bf13a8b900bf237e7b1cc68
3
- size 155648
 
 
 
 
data/mm_bench/ehrxqa/database/patient_12604446.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:6650cc0b7d94c9c103d1e9d85111e9caeef5bff0af0db5910a66205ac5d3961a
3
- size 172032
 
 
 
 
data/mm_bench/ehrxqa/database/patient_12648153.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:320f5730e814070e19aa3cfeed00c2aebae999f773b789dc26035e93b01dedb5
3
- size 204800
 
 
 
 
data/mm_bench/ehrxqa/database/patient_12716528.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:b7d483a20097dc9d588f9f9eee3abddd0be19e5112480d4f8697b2416bda377f
3
- size 868352
 
 
 
 
data/mm_bench/ehrxqa/database/patient_12724975.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:77780a2c723ef6114dc6b504163ff6d2b4a8ac4120887c82feb31c55015c6548
3
- size 315392
 
 
 
 
data/mm_bench/ehrxqa/database/patient_12727273.db DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:bd99d5a40dc7cffe2ff1a390447f111589281f26a4eb39eaba5edae391944e9b
3
- size 139264