项目 / stanfordmlgroup/MedAgentBench
stanfordmlgroup/MedAgentBench
行业候选
语言 Python标签 agentbenchmarkmedical数据更新 2026-11-22 06:48:52 · 仓库 2026-11-21
一段话介绍
MedAgentBench 是一套面向研究的基准实现,用来在虚拟电子病历(EHR)环境中评测医学相关的大模型智能体,论文发表于 [NEJM AI](https://ai.nejm.org/doi/full/10.1056/AIdbp2500144),代码基于 AgentBench 构建。README 写明本仓库用于研究目的,可能不适合大规模生产部署。本页按研究评测与仿真环境介绍,不涉及诊疗效果。入门可克隆仓库、用 conda 创建 Python 3.9 环境并安装依赖,再用 Docker 拉取并启动附带的 FHIR 服务器镜像,在本机 8080 端口查看控制台;随后按文档配置智能体、启动任务服务与分配器,结果写在指定的 `overall.json` 中。说明见[仓库 README](https://github.com/stanfordmlgroup/MedAgentBench)。
本站整理,非 GitHub 官方 description。
官方 description(GitHub API 原样)MedAgentBench: A Realistic Virtual EHR Environment to Benchmark Medical LLM Agents
官方快照(gh_history.db,2026-11-25):总榜 未进 Top50 · 日榜 未进 Top50 · 周榜未满 7 天基线(官方不生成) · 月榜暂无官方口径;下方四卡为站内趋势聚合(周卡按上榜次数,非官方 7 日增量窗)。
大模型应用工程化与评测
适配系统:AI 应用平台、模型评测平台 · 得分 1.2
提供模型接入、编排与效果评测能力,可作为行业 AI 应用的工程底座与质量闸门。
更多信息
以下三段按该项目自己的 GitHub README 章节摘录(可合理截断并标明);README 没有对应章节的留空,不编造。
我的用法
使用 MedAgentBench 评估 gpt-4o-mini 时,需安装 Docker 并启动其镜像搭建本地 FHIR 服务器(占用 8080 端口),下载 refsol.py。
特点或设计要点
快速开始默认以 `gpt-4o-mini` 为例,也可按配置换成其他智能体;文档提到还可结合 Vertex AI 上的 Gemini、Claude 等模型。启动任务服务前需保证 5000 至 5015 端口可用,脚本会拉起多个 task worker 并连到 5000 端口的控制器。参考实现文件 `refsol.py` 需按 README 从指定网盘另行下载。许可为 MIT。
星标走势还差一天的数据,明天就能看到曲线
每天 10:30 记一次星标,连续两天后自动生成曲线
GitHub 项目主页介绍
来自 GitHub 仓库 README / 主页介绍正文,原样摘录,共 3,653 字节。
# MedAgentBench: A Realistic Virtual EHR Environment to Benchmark Medical LLM Agents
<p>
<a href='https://ai.nejm.org/doi/full/10.1056/AIdbp2500144' target="_blank"><img src='https://img.shields.io/badge/NEJM_AI-Published-AA0000'></a>
</p>
This repository contains implementation of [MedAgentBench](https://ai.nejm.org/doi/full/10.1056/AIdbp2500144), and it is built on top of AgentBench. Please note that this code repo is intended for research purpose, and might not be suitable for large-scale production.
## Dataset Summary
## Quick Start
This section will guide you on how to quickly evaluate gpt-4o-mini as an agent on MedAgentBench.
### Step 1. Prerequisites
Clone this repo and install the dependencies.
```bash
cd MedAgentBench
conda create -n medagentbench python=3.9
conda activate medagentbench
pip install -r requirements.txt
```
Ensure that [Docker](https://www.docker.com/) is properly installed.
```bash
docker ps
```
Download the Docker image and set up the FHIR server
```bash
docker pull jyxsu6/medagentbench:latest
docker tag jyxsu6/medagentbench:latest medagentbench
docker run -p 8080:8080 medagentbench
```
After the console shows something like "Started Application in XXX seconds", you can verify the setup by going to `http://localhost:8080/` and a FHIR server console should be shown.
Download the refsol.py as `src/server/tasks/medagentbench/refsol.py` from [here](https://stanfordmedicine.box.com/s/fizv0unyjgkb1r3a83rfn5p3dc673uho)
### Step 2. Configure the Agent
Fill in your OpenAI API key at the correct location in `configs/agents/openai-chat.yaml`. You can get your OpenAI API key at [OpenAI platform](https://platform.openai.com/).
If you want to use models such as Gemini, Claude on Vertex AI, run `gcloud auth print-access-token` on your terminal to get your access token.
You can try using `python -m src.client.agent_test` to check if your agent is configured correctly.
By default, `gpt-4o-mini` will be started. You can replace it with other agents by modifying the parameters:
```bash
python -m src.client.agent_test --config configs/agents/api_agents.yaml --agent gpt-4o-mini
```
### Step 3. Start the task server
Starting the task worker involves specific tasks. Manual starting might be cumbersome; hence, we provide an automated
script.
The assumption for this step is that ports from 5000 to 5015 are available. For Mac OS system, you may want to follow [here](https://stackoverflow.com/questions/69955686/why-cant-i-run-the-project-on-port-5000) to free port 5000 to use.
```bash
python -m src.start_task -a
```
This will launch 20 task_workers and automatically connect them
to the controller on port 5000. **After executing this command, please allow approximately 1 minute for the task setup to complete.** If the terminal shows ".... 200 OK", you can open another terminal and follow step 4.
### Step 4. Start the assigner
This step is to actually start the tasks.
If everything is correctly configured so far, you can now initiate the task tests.
```bash
python -m src.assigner
```
### Step 5. Retrieve the results
The results can be found at `outputs/MedAgentBenchv1/gpt-4o-mini/medagentbench-std/overall.json`.
# Citation
If you find our work useful in your research please consider citing:
```
@article{jiang2025medagentbench,
title={MedAgentBench: A Virtual EHR Environment to Benchmark Medical LLM Agents},
author={Jiang, Yixing and Black, Kameron C and Geng, Gloria and Park, Danny and Zou, James and Ng, Andrew Y and Chen, Jonathan H},
journal={NEJM AI},
pages={AIdbp2500144},
year={2025},
publisher={Massachusetts Medical Society}
}
```