From e5d3634addff27f37611b2499f270c8450ecdc1c Mon Sep 17 00:00:00 2001 From: Etienne Filhol Date: Sun, 29 Nov 2026 21:05:10 +0100 Subject: [PATCH 1/5] feat(catalogue): add MedAgentBench, on Harbor and the Nullius standard --- .../benchmarks/medagentbench/benchmark.json | 78 +++++++ .../benchmarks/medagentbench/driver.py | 198 ++++++++++++++++++ .../benchmarks/medagentbench/fhir.py | 102 +++++++++ .../benchmarks/medagentbench/proofs.json | 83 ++++++++ .../benchmarks/medagentbench/standard.json | 170 +++++++++++++++ .../medagentbench/upstream-settings.json | 149 +++++++++++++ app/static/catalogue/marks.svg | 4 + app/tests/test_catalog.py | 2 +- app/ui_tests/test_builder_where.py | 6 +- app/ui_tests/test_catalogue_routes.py | 2 +- docs/agents/supported/README.md | 28 +-- docs/agents/supported/codex.md | 6 +- docs/agents/supported/digitalmate.md | 6 +- docs/agents/supported/goose.md | 4 +- docs/agents/supported/jiuwenswarm.md | 8 +- docs/agents/supported/mini-swe-agent.md | 4 +- docs/agents/supported/opencode.md | 4 +- docs/agents/supported/swe-agent.md | 4 +- docs/agents/supported/terminus-2.md | 4 +- docs/benchmarks/supported/README.md | 2 + docs/benchmarks/supported/medagentbench.md | 84 ++++++++ 21 files changed, 911 insertions(+), 37 deletions(-) create mode 100644 app/nullius/catalogue/benchmarks/medagentbench/benchmark.json create mode 100644 app/nullius/catalogue/benchmarks/medagentbench/driver.py create mode 100644 app/nullius/catalogue/benchmarks/medagentbench/fhir.py create mode 100644 app/nullius/catalogue/benchmarks/medagentbench/proofs.json create mode 100644 app/nullius/catalogue/benchmarks/medagentbench/standard.json create mode 100644 app/nullius/catalogue/benchmarks/medagentbench/upstream-settings.json create mode 100644 docs/benchmarks/supported/medagentbench.md diff --git a/app/nullius/catalogue/benchmarks/medagentbench/benchmark.json b/app/nullius/catalogue/benchmarks/medagentbench/benchmark.json new file mode 100644 index 000000000..ea47cca4c --- /dev/null +++ b/app/nullius/catalogue/benchmarks/medagentbench/benchmark.json @@ -0,0 +1,78 @@ +{ + "key": "medagentbench", + "title": "MedAgentBench", + "category": "Healthcare", + "domain": "Clinical tasks in an electronic health record: look up patients, record vitals, order tests and drugs.", + "scoring": "Answers and orders", + "harness": [ + "standard", + "harbor" + ], + "origin": "official", + "good_to_know": [ + "10 task categories, 30 tasks each in v2 and 10 each in v1.", + "A message is one GET, POST or FINISH and nothing else: any other text ends the task as failed.", + "An order is graded from its POST message; the server never receives it." + ], + "upstream_limitations": [ + "The published schema gives a drug order's route as an object; the grader accepts only text (IV, oral).", + "A task whose FINISH message contains the word POST fails.", + "The grader is a file on Box, outside the repository." + ], + "limitations": [ + "On Harbor, agents call the server from a terminal, orders are written to it, there is no round limit, and the authors' own agent is not offered. Scores do not compare with Nullius's.", + "On Harbor, the tasks' image is not pinned.", + "On Nullius, a GET to any other address reaches only the FHIR server.", + "A local agent with a shell can reach the machine; use containers for results to publish." + ], + "datasets": [ + { + "key": "v2", + "title": "v2", + "tasks": 300, + "official": "https://github.com/stanfordmlgroup/MedAgentBench", + "source": "Harbor registry", + "registry": "medagentbench@1.0", + "hub": "", + "verifier": "The authors' grader: the answer against the record, and each order's payload.", + "notes": "The authors' default." + }, + { + "key": "v1", + "title": "v1", + "tasks": 100, + "official": "https://github.com/stanfordmlgroup/MedAgentBench", + "source": "GitHub", + "registry": "", + "hub": "", + "verifier": "The authors' grader: the answer against the record, and each order's payload.", + "notes": "The first release." + } + ], + "report": { + "sources": [ + "medagentbench" + ] + }, + "citation": "@article{jiang2025medagentbench,\n title={MedAgentBench: A Virtual EHR Environment to Benchmark Medical LLM Agents},\n author={Jiang, Yixing and Black, Kameron C and Geng, Gloria and Park, Danny and Zou, James and Ng, Andrew Y and Chen, Jonathan H},\n journal={NEJM AI},\n pages={AIdbp2500144},\n year={2025},\n publisher={Massachusetts Medical Society},\n url={https://ai.nejm.org/doi/full/10.1056/AIdbp2500144}\n}", + "citation_source": "https://github.com/stanfordmlgroup/MedAgentBench", + "task_count": 300, + "evidence": [ + { + "label": "Ended by", + "path": "status" + }, + { + "label": "Result", + "path": "result" + }, + { + "label": "Reads", + "path": "gets" + }, + { + "label": "Orders", + "path": "posts" + } + ] +} diff --git a/app/nullius/catalogue/benchmarks/medagentbench/driver.py b/app/nullius/catalogue/benchmarks/medagentbench/driver.py new file mode 100644 index 000000000..386508017 --- /dev/null +++ b/app/nullius/catalogue/benchmarks/medagentbench/driver.py @@ -0,0 +1,198 @@ +"""MedAgentBench's driver for the Nullius standard: the authors' code at the pinned commit, imported. + +units - the data file's ids +setup - the authors' task loop (``MedAgentBench.start_sample``) started on the + unit, with its own ``Session``; the prompt is its first message +turn - the agent's message handed to that loop, through the session's + controller as the upstream's task worker does; its answer is the next + message +answer - the original: the authors' ``HTTPAgent``, from their configuration, in + the same loop +score - the authors' ``eval`` and their ``refsol.py`` (Box, by its digest), on + what ``calculate_overall`` grades: an output with a result +oracle - the reference answers of Harbor's adapter, said through the same loop + +Ours: the thread the loop runs in, the FHIR server's container (``fhir.py``). +""" +import asyncio +import copy +import importlib +import importlib.machinery +import importlib.util +import json +import os +import sys +import threading +import types +from pathlib import Path + +PROTOCOL, sys.stdout = sys.stdout, sys.stderr # the upstream prints: stdout is the protocol's +UP = os.environ["NULLIUS_UPSTREAM"] +sys.path.insert(0, UP) +for name in ("src.client", "src.client.agents"): # without their __init__, which import FastChat and torch + sys.modules[name] = types.ModuleType(name) + sys.modules[name].__path__ = [os.path.join(UP, *name.split("."))] + +import fhir +from nullius.standard.protocols.jsonl import serve +from src.configs import ConfigLoader +from src.server.task import Session +from src.typings import AgentContextLimitException, AgentOutput, AgentOutputStatus, InstanceFactory, SampleStatus, TaskOutput + +TASK = "medagentbench-std" +WAIT = 600 # one answer of the loop: a GET at most +STATE, SERVER = {}, {} + + +def _module(name, path): + spec = importlib.util.spec_from_loader(name, importlib.machinery.SourceFileLoader(name, path)) # a download has no .py + module = importlib.util.module_from_spec(spec) + sys.modules[name] = module + spec.loader.exec_module(module) + return module + + +def config(): + c = ConfigLoader().load_from(os.path.join(UP, "configs/tasks/task_assembly.yaml"))[TASK] + p = dict(c["parameters"], data_file=os.environ["NULLIUS_DATASET"]) + p["func_file"] = os.path.join(UP, p["func_file"]) + if os.environ.get("NULLIUS_OPTION_MAX_ROUND"): + p["max_round"] = int(os.environ["NULLIUS_OPTION_MAX_ROUND"]) + return dict(c, parameters=p) + + +def task(): + """The authors' task, once its FHIR server answers.""" + if "task" not in SERVER: + c = config() + base = c["parameters"]["fhir_api_base"] + _module("src.server.tasks.medagentbench.refsol", os.environ["NULLIUS_FILE_REFSOL"]) + utils = importlib.import_module("src.server.tasks.medagentbench.utils") + SERVER.update(base=base, up=lambda: utils.verify_fhir_server(base)) + SERVER["holder"] = fhir.start(SERVER["up"]) + SERVER["task"] = InstanceFactory(**c).create() + return SERVER["task"] + + +def index(unit): + rows = json.loads(Path(os.environ["NULLIUS_DATASET"]).read_text()) + return next(i for i, r in enumerate(rows) if r["id"] == unit) + + +class Sample: + """One task in the authors' loop, in a thread of its own.""" + + def __init__(self, unit): + self.task, self.index = task(), index(unit) + self.loop = asyncio.new_event_loop() + threading.Thread(target=self._run, daemon=True).start() + asyncio.run_coroutine_threadsafe(self._start(), self.loop).result(WAIT) + self.output = self._pull(None) + + def _run(self): + asyncio.set_event_loop(self.loop) + self.loop.run_forever() + + async def _start(self): + self.session = Session() # its locks belong to this loop + self.running = self.loop.create_task(self._sample()) + + async def _sample(self): + out = await self.task.start_sample(self.index, self.session) + await self.session.controller.env_finish( + TaskOutput(index=self.index, status=out.status, result=out.result, history=self.session.history)) + + def _pull(self, said): + async def pull(): + return await self.session.controller.agent_pull(said) + return asyncio.run_coroutine_threadsafe(pull(), self.loop).result(WAIT) + + @property + def over(self): + return self.output.status != SampleStatus.RUNNING + + def say(self, content=None, **kw): + self.output = self._pull(AgentOutput(content=content, **kw)) + + def close(self): + self.loop.call_soon_threadsafe(self.loop.stop) + + +def units(dataset, setup=None): + return {"units": [r["id"] for r in json.loads(Path(os.environ["NULLIUS_DATASET"]).read_text())]} + + +def setup(unit, dir): + for s in STATE.values(): + s.close() + STATE.clear() + s = STATE[unit] = Sample(unit) + return {"prompt": s.output.history[-1].content} + + +def turn(unit, dir, transcript, **_): + s = STATE[unit] + if not s.over: + s.say(transcript[-1].get("text") or "") + return {"done": True} if s.over else {"message": s.output.history[-1].content} + + +def answer(unit, dir, setup, model, base_url, key, **_): + if setup != "original": + raise ValueError(f"MedAgentBench has no {setup} setup") + globals()["setup"](unit, dir) # a setup's unit is sent no setup + s = STATE[unit] + c = ConfigLoader().load_from(os.path.join(UP, "configs/agents/api_agents.yaml"))["gpt-4o-mini"] + p = copy.deepcopy(c["parameters"]) + p.update(url=base_url.rstrip("/") + "/chat/completions", proxies={"no_proxy": "*"}) + p["headers"]["Authorization"] = "Bearer " + key + p["body"]["model"] = model + for name, kind in (("temperature", float), ("max_tokens", int)): + value = os.environ.get("NULLIUS_OPTION_" + name.upper()) + if value == "default": + p["body"].pop(name) + elif value: + p["body"][name] = kind(value) + agent = InstanceFactory(module="src.client.agents.http_agent.HTTPAgent", parameters=p).create() + while not s.over: + try: + s.say(agent.inference([h.dict() for h in s.output.history])) + except AgentContextLimitException: + s.say(status=AgentOutputStatus.AGENT_CONTEXT_LIMIT) + said = [h.content for h in s.output.history if h.role == "agent"] + return {"answer": said[-1] if said else ""} + + +def score(unit, dir, transcript, answer, **_): + s = STATE[unit] + out = s.output + grade = importlib.import_module("src.server.tasks.medagentbench.eval").eval + passed = False + if s.over and out.result is not None: + if not SERVER["up"](): + raise RuntimeError("VerifierError: the FHIR server does not answer") + passed = grade(s.task.data[s.index], out, SERVER["base"]) is True + if not passed and not SERVER["up"](): + raise RuntimeError("VerifierError: the FHIR server does not answer") + said = [h.content.strip() for h in out.history if h.role == "agent"] + return {"reward": float(passed), "passed": passed, + "detail": {"category": unit.split("_")[0], "status": out.status.value if s.over else "no answer", + "result": out.result, "steps": len(said), "steps_limit": s.task.max_round, + "gets": sum(m.startswith("GET") for m in said), "posts": sum(m.startswith("POST") for m in said)}} + + +def oracle(unit, dir): + s = STATE[unit] + sys.modules.setdefault("refsol_pkg", types.ModuleType("refsol_pkg")).refsol = \ + sys.modules["src.server.tasks.medagentbench.refsol"] + adapter = _module("medagentbench_logic", os.environ["NULLIUS_FILE_REFERENCE"]) + case = s.task.data[s.index] + said = adapter.run_oracle({"task_id": unit, "eval_MRN": case.get("eval_MRN"), "sol": case.get("sol"), + "fhir_api_base": SERVER["base"]}, Path(dir) / ".reference.json") + for m in [h["content"] for h in said["history"] if h["role"] == "agent"] + [f"FINISH({json.dumps(said['result'])})"]: + s.say(m) + return {"answer": m} + + +if __name__ == "__main__": + serve({"units": units, "setup": setup, "turn": turn, "answer": answer, "score": score, "oracle": oracle}, PROTOCOL) diff --git a/app/nullius/catalogue/benchmarks/medagentbench/fhir.py b/app/nullius/catalogue/benchmarks/medagentbench/fhir.py new file mode 100644 index 000000000..83552b757 --- /dev/null +++ b/app/nullius/catalogue/benchmarks/medagentbench/fhir.py @@ -0,0 +1,102 @@ +"""The benchmark's FHIR server, the authors' image as published, one per machine. + +Upstream runs one server for every task, read only: a POST is never sent to it. +Drivers share it: each has a holder process with a shared lock, which ends with +its driver however that ends, and the last one removes the container. + +The server listens on a free port of 127.0.0.1 and is reached as an HTTP proxy, +so tasks keep the published http://localhost:8080/fhir/ and a URL an agent +writes is only ever sent to this server. + +python3 fhir.py hold FD: until stdin closes, then let go.""" +import fcntl +import os +import subprocess +import sys +import time + +IMAGE = "jyxsu6/medagentbench@sha256:3fb83d7ed71c5476f9eb6212bd440a909ef7505922bbc757dc488a8fc0701966" +NAME = f"nullius-medagentbench-fhir-{os.getuid()}" +LOCK = f"/tmp/{NAME}" +READY_SECONDS = 420 +GONE_SECONDS = 1800 # a busy daemon can take minutes to remove the server's written layer + + +def _open(path): + return os.open(path, os.O_RDWR | os.O_CREAT | os.O_NOFOLLOW | os.O_CLOEXEC, 0o600) + + +def _docker(*args, seconds=120): + said = subprocess.run(["docker", *args], capture_output=True, text=True, timeout=seconds, stdin=subprocess.DEVNULL) + if said.returncode: + raise RuntimeError(f"docker {args[0]}: {(said.stderr or said.stdout).strip()[-300:]}") + return said.stdout.strip() + + +def _address(): + """The running server's host:port, else None.""" + try: + if _docker("inspect", "-f", "{{.State.Running}} {{.Config.Image}}", NAME) == f"true {IMAGE}": + return _docker("port", NAME, "8080/tcp").splitlines()[0] + except RuntimeError: + pass + return None + + +def _remove(): + """The container gone, waited for: a run under its name before then is refused.""" + ends = time.monotonic() + GONE_SECONDS + while subprocess.run(["docker", "inspect", NAME], capture_output=True, timeout=120).returncode == 0: + subprocess.run(["docker", "rm", "-f", NAME], capture_output=True, timeout=GONE_SECONDS) + if time.monotonic() > ends: + raise RuntimeError(f"the last FHIR server was not removed in {GONE_SECONDS} s: docker rm -f {NAME}") + time.sleep(2) + + +def start(ready): + """Start the server unless it runs, wait until ``ready()``, and hold it.""" + gate = _open(LOCK + ".gate") + try: + fcntl.flock(gate, fcntl.LOCK_EX) + users = _open(LOCK + ".users") + fcntl.flock(users, fcntl.LOCK_SH) + try: + holder = subprocess.Popen([sys.executable, "-I", os.path.abspath(__file__), "hold", str(users)], + stdin=subprocess.PIPE, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, + start_new_session=True, pass_fds=[users]) + finally: + os.close(users) + address = _address() + if address is None: + _remove() + _docker("run", "-d", "--name", NAME, "-p", "127.0.0.1::8080", IMAGE, seconds=3600) + address = _address() + if address is None: + raise RuntimeError("the FHIR server's container ended as it started") + for name in ("no_proxy", "NO_PROXY"): + os.environ.pop(name, None) + for name in ("http_proxy", "HTTP_PROXY", "https_proxy", "HTTPS_PROXY", "all_proxy", "ALL_PROXY"): + os.environ[name] = "http://" + address + ends = time.monotonic() + READY_SECONDS + while not ready(): + if time.monotonic() > ends: + raise RuntimeError(f"the FHIR server was not ready in {READY_SECONDS} s: docker logs {NAME}") + time.sleep(2) + return holder + finally: + os.close(gate) + + +def hold(users): + sys.stdin.buffer.read() + gate = _open(LOCK + ".gate") + fcntl.flock(gate, fcntl.LOCK_EX) + try: + fcntl.flock(users, fcntl.LOCK_EX | fcntl.LOCK_NB) + except BlockingIOError: + return + _remove() + + +if __name__ == "__main__": + hold(int(sys.argv[2])) diff --git a/app/nullius/catalogue/benchmarks/medagentbench/proofs.json b/app/nullius/catalogue/benchmarks/medagentbench/proofs.json new file mode 100644 index 000000000..2f81a1ff6 --- /dev/null +++ b/app/nullius/catalogue/benchmarks/medagentbench/proofs.json @@ -0,0 +1,83 @@ +{ + "schema": "nullius.proofs/v1", + "kind": "benchmark", + "key": "medagentbench", + "versions": { + "": { + "proven": { + "v2": { + "units": { + "units": 300, + "passed": "300 ids, the same twice, unique" + }, + "leak": { + "units": 300, + "looked_for": 600, + "short": 0, + "passed": "300/300" + }, + "nop": { + "passed": "0/300", + "value": 0.0, + "expect": { + "at_most": 0.0 + }, + "units": 300, + "options": { + "max_round": "8", + "fhir_server": "docker" + } + }, + "oracle": { + "passed": "300/300", + "value": 1.0, + "expect": { + "at_least": 1.0 + }, + "units": 300, + "options": { + "max_round": "8", + "fhir_server": "docker" + } + } + }, + "v1": { + "units": { + "units": 100, + "passed": "100 ids, the same twice, unique" + }, + "leak": { + "units": 100, + "looked_for": 200, + "short": 0, + "passed": "100/100" + }, + "nop": { + "passed": "0/100", + "value": 0.0, + "expect": { + "at_most": 0.0 + }, + "units": 100, + "options": { + "max_round": "8", + "fhir_server": "docker" + } + }, + "oracle": { + "passed": "100/100", + "value": 1.0, + "expect": { + "at_least": 1.0 + }, + "units": 100, + "options": { + "max_round": "8", + "fhir_server": "docker" + } + } + } + } + } + } +} diff --git a/app/nullius/catalogue/benchmarks/medagentbench/standard.json b/app/nullius/catalogue/benchmarks/medagentbench/standard.json new file mode 100644 index 000000000..b913128d3 --- /dev/null +++ b/app/nullius/catalogue/benchmarks/medagentbench/standard.json @@ -0,0 +1,170 @@ +{ + "schema": "nullius.benchmark/v1", + "key": "medagentbench", + "label": "MedAgentBench", + "summary": "Each task is a clinician's request over 100 patients' records on a FHIR server: the authors' own loop takes one GET, POST or FINISH per message, answers it, and their grader scores the answer and the orders.", + "family": "agent", + "needs": [ + "agent.conversation/v1" + ], + "upstream": { + "repository": "https://github.com/stanfordmlgroup/MedAgentBench", + "tested": "99260117137b09f04837a8c18d18a1107efa55ae", + "tested_date": "2026-11-25", + "license": "MIT" + }, + "driver": { + "command": [ + "{install}/.venv/bin/python", + "{here}/driver.py" + ], + "install": { + "python": "3.9", + "pip": [ + "numpy==1.23.5", + "pydantic==1.10.26", + "requests==2.28.2", + "urllib3==1.26.20", + "pyyaml==6.0.2" + ], + "commands": [ + [ + "docker", + "pull", + "-q", + "jyxsu6/medagentbench@sha256:3fb83d7ed71c5476f9eb6212bd440a909ef7505922bbc757dc488a8fc0701966" + ] + ] + } + }, + "datasets": [ + { + "id": "v2", + "label": "v2", + "path": "data/medagentbench/test_data_v2.json", + "sha256": "b6e89b2ef82f1bef27c5778a644a8a66c7b25738bbd6a48d03ab3e5182df6ca8", + "units": 300 + }, + { + "id": "v1", + "label": "v1", + "path": "data/medagentbench/test_data_v1.json", + "sha256": "b539a3dece8cf2fe0518bbfe76e47dec53e3676755c9bb6d87ff261b2aad856a", + "units": 100 + } + ], + "files": { + "refsol": { + "url": "https://stanfordmedicine.app.box.com/index.php?rm=box_download_shared_file&shared_name=fizv0unyjgkb1r3a83rfn5p3dc673uho&file_id=f_1756907296228", + "sha256": "67d19da263ac92c1b7075b3218ace3a4bd19b206a06fc7aebcc897dc39625419" + }, + "reference": { + "url": "https://raw.githubusercontent.com/laude-institute/harbor/cf4bd0043f4e3a91847edf1b799343caf74cf182/adapters/medagentbench/template/medagentbench_logic.py", + "sha256": "36c12ac43da0083703a65d64314232eeda0e5ebed16a166f414a3abdebc6b21d" + } + }, + "units": { + "noun": "task", + "nouns": "tasks" + }, + "controls": { + "nop": { + "source": "nullius", + "from": "Nullius: no agent runs and nothing is said; the authors count a task without a result as failed." + }, + "oracle": { + "source": "adapter", + "from": "Harbor's MedAgentBench adapter at cf4bd004: its reference answers and orders, said through the authors' loop." + } + }, + "score": { + "kind": "pass", + "says": "the authors' eval and refsol.py, per task category: the FINISH list against the record, and each accepted POST's URL and payload; a task that does not reach FINISH fails" + }, + "limits": { + "turn_seconds": 1800, + "turns": 20 + }, + "setups": { + "original": { + "summary": "The authors' HTTPAgent as the run's model: the whole conversation sent to chat completions each round, three tries a call.", + "providers": { + "openai": "", + "openrouter": "", + "custom": "" + }, + "turn_seconds": 1800, + "paper": "the MedAgentBench paper (NEJM AI, AIdbp2500144)", + "reference_agent": "MedAgentBench agent" + } + }, + "options": { + "max_round": { + "label": "Rounds per task", + "summary": "The most messages the agent may send in a task. 8 is the authors' configuration.", + "setups": [ + "original", + "yours" + ], + "pattern": "[1-9]|1[0-9]|20", + "example": "12", + "default": "8", + "limit": true + }, + "temperature": { + "summary": "0 is the authors' value; default sends none, as some reasoning models require.", + "setups": [ + "original" + ], + "pattern": "default|[0-9]+(\\.[0-9]+)?", + "example": "0.5", + "default": "0" + }, + "max_tokens": { + "label": "Output tokens per message", + "summary": "2048 is the authors' value; default sends no limit.", + "setups": [ + "original" + ], + "pattern": "default|[1-9][0-9]{0,6}", + "example": "8192", + "default": "2048" + }, + "fhir_server": { + "label": "FHIR server", + "step": "where", + "summary": "The authors' patient-record server, one container per machine.", + "setups": [ + "original", + "yours" + ], + "values": [ + "docker" + ], + "default": "docker", + "about": { + "docker": "The authors' image at its digest: a 1.8 GB download, removed with the run's last task." + }, + "needs": { + "docker": { + "host": [ + "docker" + ], + "files": [ + "refsol", + "reference" + ] + } + } + } + }, + "host": { + "docker": { + "label": "Docker for the FHIR server", + "summary": "Docker on the machine, usable without sudo.", + "check": [ + "docker" + ] + } + } +} diff --git a/app/nullius/catalogue/benchmarks/medagentbench/upstream-settings.json b/app/nullius/catalogue/benchmarks/medagentbench/upstream-settings.json new file mode 100644 index 000000000..888936357 --- /dev/null +++ b/app/nullius/catalogue/benchmarks/medagentbench/upstream-settings.json @@ -0,0 +1,149 @@ +[ + { + "entry": "src.start_task (configs/tasks)", + "setting": "data_file", + "values": "test_data_v2.json, test_data_v1.json", + "default": "test_data_v2.json", + "nullius": "dataset:v2" + }, + { + "entry": "src.start_task (configs/tasks)", + "setting": "data_file test_data_v1.json", + "values": "test_data_v1.json", + "default": "not the default", + "nullius": "dataset:v1" + }, + { + "entry": "src.start_task (configs/tasks)", + "setting": "func_file", + "values": "funcs_v1.json", + "default": "funcs_v1.json", + "nullius": "fixed:funcs_v1.json - the only one published" + }, + { + "entry": "src.start_task (configs/tasks)", + "setting": "max_round", + "values": "an integer", + "default": "8 (5 in the code)", + "nullius": "option:max_round" + }, + { + "entry": "src.start_task (configs/tasks)", + "setting": "fhir_api_base", + "values": "a URL", + "default": "http://localhost:8080/fhir/", + "nullius": "fixed:http://localhost:8080/fhir/ - the upstream's default, sent to the run's own server" + }, + { + "entry": "src.start_task (configs/tasks)", + "setting": "FHIR server image", + "values": "jyxsu6/medagentbench:latest", + "default": "jyxsu6/medagentbench:latest", + "nullius": "option:fhir_server" + }, + { + "entry": "src.start_task (configs/tasks)", + "setting": "concurrency", + "values": "an integer", + "default": "1 per worker, 20 workers", + "nullius": "not offered - the run's tasks at a time" + }, + { + "entry": "src.assigner (configs/assignments/default.yaml)", + "setting": "agent", + "values": "gpt-4o-mini, gpt-4o, o1-mini, gemini-2.0, llama-3.3, deepseekv3, qwen2.5, gemma2, mistral, claude3.5", + "default": "gpt-4o-mini", + "nullius": "setup:original" + }, + { + "entry": "src.assigner (configs/assignments/default.yaml)", + "setting": "task", + "values": "medagentbench-std", + "default": "medagentbench-std", + "nullius": "fixed:medagentbench-std - the only one published" + }, + { + "entry": "src.assigner (configs/assignments/default.yaml)", + "setting": "concurrency", + "values": "integers", + "default": "20 tasks, 1 to 10 per agent", + "nullius": "not offered - the run's tasks at a time" + }, + { + "entry": "src.assigner (configs/assignments/default.yaml)", + "setting": "--auto-retry", + "values": "flag", + "default": "off", + "nullius": "not offered - the run's retries" + }, + { + "entry": "src.assigner (configs/assignments/default.yaml)", + "setting": "output", + "values": "a folder", + "default": "outputs/MedAgentBenchv1", + "nullius": "not offered - the job's folder" + }, + { + "entry": "HTTPAgent (configs/agents)", + "setting": "url, headers", + "values": "an endpoint and key", + "default": "the provider's", + "nullius": "fixed:the relay's - every model call passes it" + }, + { + "entry": "HTTPAgent (configs/agents)", + "setting": "body.model", + "values": "a model", + "default": "gpt-4o-mini", + "nullius": "setup:original" + }, + { + "entry": "HTTPAgent (configs/agents)", + "setting": "body.temperature", + "values": "a number", + "default": "0", + "nullius": "option:temperature" + }, + { + "entry": "HTTPAgent (configs/agents)", + "setting": "body.max_tokens", + "values": "an integer", + "default": "2048", + "nullius": "option:max_tokens" + }, + { + "entry": "HTTPAgent (configs/agents)", + "setting": "prompter", + "values": "role_content_dict and others", + "default": "role_content_dict, agent_role assistant", + "nullius": "fixed:role_content_dict - the upstream's in every published configuration" + }, + { + "entry": "HTTPAgent (configs/agents)", + "setting": "return_format", + "values": "chat completions, Anthropic on Vertex", + "default": "chat completions", + "nullius": "fixed:chat completions - the relay's protocol" + }, + { + "entry": "HTTPAgent (configs/agents)", + "setting": "proxies", + "values": "a mapping", + "default": "none", + "nullius": "fixed:none - the relay is on this machine" + }, + { + "entry": "HTTPAgent (configs/agents)", + "setting": "tries per call", + "values": "hard-coded", + "default": "3, 120 s each", + "nullius": "fixed:3, 120 s each - hard-coded upstream" + }, + { + "entry": "FastChatAgent (configs/agents/fs_agent.yaml)", + "setting": "vicuna and wizard models", + "values": "a FastChat controller", + "default": "not run by default", + "nullius": "not offered - AgentBench's own agent, no MedAgentBench result uses it" + } +] diff --git a/app/static/catalogue/marks.svg b/app/static/catalogue/marks.svg index dce84e25b..fd00d1fe0 100644 --- a/app/static/catalogue/marks.svg +++ b/app/static/catalogue/marks.svg @@ -35,4 +35,8 @@ + + + + diff --git a/app/tests/test_catalog.py b/app/tests/test_catalog.py index fd792c27f..bf6cad16b 100644 --- a/app/tests/test_catalog.py +++ b/app/tests/test_catalog.py @@ -33,7 +33,7 @@ def test_shipped_catalogue_is_consistent(self): self.assertEqual(titles, sorted(titles, key=catalog.sort_key)) # what has a usable route is listed, whoever made it and whether or not it has run listed = {x.key for x in cat.listed_benchmarks} - self.assertEqual(sorted(listed), ["gaia", "gsm8k", "humaneval", "locomo", "longmemeval", "open-telco", "osworld1", "osworld2", "swe-bench-verified", "tau3-bench", "terminal-bench"]) + self.assertEqual(sorted(listed), ["gaia", "gsm8k", "humaneval", "locomo", "longmemeval", "medagentbench", "open-telco", "osworld1", "osworld2", "swe-bench-verified", "tau3-bench", "terminal-bench"]) self.assertEqual((cat.benchmark("longmemeval").origin, cat.benchmark("longmemeval").label), ("official", "Official")) self.assertEqual(cat.benchmark("tau3-bench").label, "Official") # τ³ files as "t3…", before "te…": a reader looking under T finds it diff --git a/app/ui_tests/test_builder_where.py b/app/ui_tests/test_builder_where.py index 00fbb0355..0c4bc36c2 100644 --- a/app/ui_tests/test_builder_where.py +++ b/app/ui_tests/test_builder_where.py @@ -115,7 +115,11 @@ def test_every_standard_benchmark_draws_its_where_step_and_says_why_docker_is_no tile = re.search(r'