katielink/agentclinic_medqa
收藏AgentClinic: 多模态智能体基准测试
发布信息
- [2024年5月13日] 发布 AgentClinic: 多模态智能体基准测试,用于评估AI在模拟临床环境中的表现。
内容
安装
- 该库依赖较少,可以直接安装
requirements.txt文件中的依赖项。 bash pip install -r requirements.txt
评估
- 所有论文中的模型均可使用(GPT-4/4o/3.5, Mixtral-8x7B, Llama-70B-chat)。
- 需要准备OpenAI或Replicate的API密钥进行评估。
- 也可以使用HuggingFace的包装器,无需API密钥。
评估参数
parser.add_argument(--openai_api_key, type=str, required=True, help=OpenAI API Key) parser.add_argument(--replicate_api_key, type=str, required=False, help=Replicate API Key) parser.add_argument(--inf_type, type=str, choices=[llm, human_doctor, human_patient], default=llm) parser.add_argument(--doctor_bias, type=str, help=Doctor bias type, default=None, choices=["recency", "frequency", "false_consensus", "confirmation", "status_quo", "gender", "race", "sexual_orientation", "cultural", "education", "religion", "socioeconomic"]) parser.add_argument(--patient_bias, type=str, help=Patient bias type, default=None, choices=["recency", "frequency", "false_consensus", "self_diagnosis", "gender", "race", "sexual_orientation", "cultural", "education", "religion", "socioeconomic"]) parser.add_argument(--doctor_llm, type=str, default=gpt4, choices=[gpt4, gpt3.5, llama-2-70b-chat, mixtral-8x7b, gpt4o]) parser.add_argument(--patient_llm, type=str, default=gpt4, choices=[gpt4, gpt3.5, mixtral-8x7b, gpt4o]) parser.add_argument(--measurement_llm, type=str, default=gpt4, choices=[gpt4]) parser.add_argument(--moderator_llm, type=str, default=gpt4, choices=[gpt4]) parser.add_argument(--num_scenarios, type=int, default=1, required=False, help=Number of scenarios to simulate)
代码示例
-
运行示例: bash python3 agentclinic.py --openai_api_key "YOUR_OPENAIAPI_KEY" --inf_type "llm"
-
使用HuggingFace模型示例: bash python3 agentclinic.py --inf_type "llm" --patient_llm "HF_mistralai/Mixtral-8x7B-v0.1" --moderator_llm "HF_mistralai/Mixtral-8x7B-v0.1" --doctor_llm "HF_mistralai/Mixtral-8x7B-v0.1" --measurement_llm "HF_mistralai/Mixtral-8x7B-v0.1"
-
使用gpt-4o示例: bash python3 agentclinic.py --openai_api_key "YOUR_OPENAIAPI_KEY" --doctor_llm "gpt4o" --patient_llm "gpt4o" --inf_type "llm"
-
使用gpt-3.5并设置医生和患者偏见示例: bash python3 agentclinic.py --openai_api_key "YOUR_OPENAIAPI_KEY" --doctor_llm "gpt3.5" --patient_llm "gpt4" --patient_bias "self_diagnosis" --doctor_bias "recency" --inf_type "llm"




