The Medical Agent Clinical Decision-making Dataset (MACD) is a comprehensive dataset and evaluation framework for assessing the clinical decision-making capabilities of Large Language Models (LLMs) in medical diagnosis scenarios.
MACD/
├── agents/ # Agent implementations and prompt templates
├── collaboration_scripts/ # Scripts for analyzing collaborative results
├── configs/ # Configuration files for experiments
├── dataset/ # Dataset files and utilities
├── evaluators/ # Evaluation modules for different pathologies
├── icd/ # ICD code mappings
├── missing_ids/ # Debug utilities for missing patient IDs
├── models/ # Model interfaces and implementations
├── results/ # Experiment results storage
├── scripts/ # Automated experiment execution scripts
├── tests/ # Unit tests for various components
├── tools/ # Supporting tools and utilities
└── utils/ # General utility functions
# Clone the repository
git clone https://github.com/qjdzj/MACD-Multi-Agent-Clinical-Diagnosis-with-Self-Learned-Knowledge-for-LLM.git
cd MACD
# Install dependencies
conda create -n macd python=3.10
pip install -r requirements.txt
You can obtain the complete dataset from the data/ directory, the actual data used for testing from test_set/ directory, and the data used for human physicians evaluation can be obtained from MACD-human/
Different agent prompts can be imported from the agents/ directory:
The main inference script is infer.py, which supports various configurations through command-line arguments:
python infer.py \
model="Llama3Instruct8B" \
pathology="pneumonia" \
[other_options]
Key options include:
model: Specifies the LLM to use (Llama3Instruct8B, Llama3Instruct70B, Deepseek-Llama70B-distill)pathology: Target disease for diagnosis (appendicitis, cholecystitis, diverticulitis, pancreatitis, pneumonia, pulmonary embolism, pericarditis)criteria: Enable diagnostic criteriaguideline: Enable clinical guidelinesfewshot: Enable few-shot learning examplesThe project provides automated experiment execution through bash scripts located in the ./scripts/ directory. These scripts call the main inference script infer.py with different configurations.
To run experiments, simply execute the desired bash script:
# Run baseline experiments
bash scripts/baseline.sh
# Run chain-of-thought experiments
bash scripts/cot.sh
# Run few-shot experiments
bash scripts/fewshot.sh
# Run experiments with professional guidelines
bash scripts/guideline_professional.sh
# Run experiments with Mayo Clinic guidelines
bash scripts/guideline_mayo.sh
# Run human cases experiments
bash scripts/human_cases.sh
# Run inconsistency analysis with past diagnosis
bash scripts/inconsistent_with_past.sh
Results can be evaluated using the evaluate.py script:
bash evaluate.sh
The collaboration_scripts/ directory contains analysis tools for evaluating MACD-human collaboration workflow experiments.
You can run the model from the script in the self-knowledge_scripts/ directory to obtain the corresponding self learned knowledge and fully experience the entire process of MACD. However, this will be a long process
This project is built upon and extends the work from the MIMIC Clinical Decision Making Framework by Hager, P. et al. We gratefully acknowledge the significant contributions of the original authors whose foundational work in clinical evaluation of large language models has enabled our research extensions.
If you use this code or dataset in your research, please cite our paper:
@article{li2025macd,
title={MACD: Multi-Agent Clinical Diagnosis with Self-Learned Knowledge for LLM},
author={Li, Wenliang and Yan, Rui and Zhang, Xu and Chen, Li and Zhu, Hongji and Zhao, Jing and Li, Junjun and Li, Mengru and Cao, Wei and Jiang, Zihang and others},
journal={arXiv preprint arXiv:2509.20067},
year={2025}
}
4 commits
Python
98.9%
Shell
1.1%
The Medical Agent Clinical Decision-making Dataset (MACD) is a comprehensive dataset and evaluation framework for assessing the clinical decision-making capabilities of Large Language Models (LLMs) in medical diagnosis scenarios.
MACD/
├── agents/ # Agent implementations and prompt templates
├── collaboration_scripts/ # Scripts for analyzing collaborative results
├── configs/ # Configuration files for experiments
├── dataset/ # Dataset files and utilities
├── evaluators/ # Evaluation modules for different pathologies
├── icd/ # ICD code mappings
├── missing_ids/ # Debug utilities for missing patient IDs
├── models/ # Model interfaces and implementations
├── results/ # Experiment results storage
├── scripts/ # Automated experiment execution scripts
├── tests/ # Unit tests for various components
├── tools/ # Supporting tools and utilities
└── utils/ # General utility functions
# Clone the repository
git clone https://github.com/qjdzj/MACD-Multi-Agent-Clinical-Diagnosis-with-Self-Learned-Knowledge-for-LLM.git
cd MACD
# Install dependencies
conda create -n macd python=3.10
pip install -r requirements.txt
You can obtain the complete dataset from the data/ directory, the actual data used for testing from test_set/ directory, and the data used for human physicians evaluation can be obtained from MACD-human/
Different agent prompts can be imported from the agents/ directory:
The main inference script is infer.py, which supports various configurations through command-line arguments:
python infer.py \
model="Llama3Instruct8B" \
pathology="pneumonia" \
[other_options]
Key options include:
model: Specifies the LLM to use (Llama3Instruct8B, Llama3Instruct70B, Deepseek-Llama70B-distill)pathology: Target disease for diagnosis (appendicitis, cholecystitis, diverticulitis, pancreatitis, pneumonia, pulmonary embolism, pericarditis)criteria: Enable diagnostic criteriaguideline: Enable clinical guidelinesfewshot: Enable few-shot learning examplesThe project provides automated experiment execution through bash scripts located in the ./scripts/ directory. These scripts call the main inference script infer.py with different configurations.
To run experiments, simply execute the desired bash script:
# Run baseline experiments
bash scripts/baseline.sh
# Run chain-of-thought experiments
bash scripts/cot.sh
# Run few-shot experiments
bash scripts/fewshot.sh
# Run experiments with professional guidelines
bash scripts/guideline_professional.sh
# Run experiments with Mayo Clinic guidelines
bash scripts/guideline_mayo.sh
# Run human cases experiments
bash scripts/human_cases.sh
# Run inconsistency analysis with past diagnosis
bash scripts/inconsistent_with_past.sh
Results can be evaluated using the evaluate.py script:
bash evaluate.sh
The collaboration_scripts/ directory contains analysis tools for evaluating MACD-human collaboration workflow experiments.
You can run the model from the script in the self-knowledge_scripts/ directory to obtain the corresponding self learned knowledge and fully experience the entire process of MACD. However, this will be a long process
This project is built upon and extends the work from the MIMIC Clinical Decision Making Framework by Hager, P. et al. We gratefully acknowledge the significant contributions of the original authors whose foundational work in clinical evaluation of large language models has enabled our research extensions.
If you use this code or dataset in your research, please cite our paper:
@article{li2025macd,
title={MACD: Multi-Agent Clinical Diagnosis with Self-Learned Knowledge for LLM},
author={Li, Wenliang and Yan, Rui and Zhang, Xu and Chen, Li and Zhu, Hongji and Zhao, Jing and Li, Junjun and Li, Mengru and Cao, Wei and Jiang, Zihang and others},
journal={arXiv preprint arXiv:2509.20067},
year={2025}
}
4 commits
Python
98.9%
Shell
1.1%