MedPerturb
收藏MedPerturb 数据集概述
数据集基本信息
- 项目名称: MedPerturb
- 项目网站: https://abinithago.github.io/MedPerturb/
- Hugging Face Hub地址: https://huggingface.co/datasets/abinitha/MedPerturb
- 许可证: Creative Commons Attribution 4.0 International (CC BY 4.0)
数据集内容
- 主要数据文件:
data.csv: 数据集主文件clinician_demographics.csv: 临床医生人口统计数据
- 案例研究:
case_study1.ipynb: 论文中的案例研究1(示例分析)case_study2.ipynb: 论文中的案例研究2(示例分析)
主要功能
- 临床文本扰动: 支持通过大型语言模型(LLMs)对临床文本进行性别、风格或观点扰动
- 模型评估: 评估LLMs在分诊问题(MANAGE、VISIT、RESOURCE)上的表现
- 支持的模型: GPT-4、Llama-3-8B、Llama-3-70B、Palmyra-Med
使用方法
-
扰动临床文本: bash python code/perturb_data.py --text "临床文本示例" --dataset oncqa --perturbation viewpoint --variant multiturn --output results.json
- 支持扰动类型:
gender、stylistic、viewpoint
- 支持扰动类型:
-
评估模型: bash python code/evaluate_models.py --model gpt-4 --patient_info "患者信息示例" --output eval_results.json
项目结构
MedPerturb/ ├── code/ │ ├── perturb_data.py # 临床文本扰动脚本 │ ├── evaluate_models.py # 模型评估脚本 │ ├── utils.py # 实用函数 ├── case_studies/ │ └── case_study1.ipynb # 案例研究1 │ └── case_study2.ipynb # 案例研究2 ├── .env # 环境变量文件 ├── data.csv # 数据集 ├── clinician_demographics.csv # 临床医生人口统计数据 ├── README.md # 项目文档 ├── requirements.txt # Python依赖项
环境要求
-
环境变量:
HuggingFace token
HF_TOKEN=your_huggingface_token_here
OpenAI API token
OPENAI_API_KEY=your_openai_token_here

- 1The MedPerturb Dataset: What Non-Content Perturbations Reveal About Human and Clinical LLM Decision Making麻省理工学院 · 2025年



