From 11e08436a0cb200db5f5e79c3d0cc8686873c5b0 Mon Sep 17 00:00:00 2001 From: Etienne Filhol Date: Wed, 2 Dec 2026 03:09:45 +0100 Subject: [PATCH 1/2] feat(catalogue): add GPQA --- .../catalogue/benchmarks/gpqa/benchmark.json | 90 +++++ .../catalogue/benchmarks/gpqa/driver.py | 233 ++++++++++++ .../catalogue/benchmarks/gpqa/proofs.json | 113 ++++++ .../catalogue/benchmarks/gpqa/standard.json | 164 +++++++++ .../benchmarks/gpqa/upstream-settings.json | 338 ++++++++++++++++++ app/static/catalogue/marks.svg | 4 + app/tests/test_catalog.py | 2 +- app/ui_tests/test_catalogue_routes.py | 2 +- docs/agents/supported/README.md | 28 +- docs/agents/supported/claude-code.md | 4 +- 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/gpqa.md | 78 ++++ 20 files changed, 1060 insertions(+), 38 deletions(-) create mode 100644 app/nullius/catalogue/benchmarks/gpqa/benchmark.json create mode 100644 app/nullius/catalogue/benchmarks/gpqa/driver.py create mode 100644 app/nullius/catalogue/benchmarks/gpqa/proofs.json create mode 100644 app/nullius/catalogue/benchmarks/gpqa/standard.json create mode 100644 app/nullius/catalogue/benchmarks/gpqa/upstream-settings.json create mode 100644 docs/benchmarks/supported/gpqa.md diff --git a/app/nullius/catalogue/benchmarks/gpqa/benchmark.json b/app/nullius/catalogue/benchmarks/gpqa/benchmark.json new file mode 100644 index 000000000..a34c3ab1f --- /dev/null +++ b/app/nullius/catalogue/benchmarks/gpqa/benchmark.json @@ -0,0 +1,90 @@ +{ + "key": "gpqa", + "title": "GPQA", + "category": "Science", + "domain": "Graduate-level multiple-choice questions in biology, physics and chemistry, written by domain experts.", + "scoring": "Answer accuracy", + "harness": [ + "standard", + "harbor" + ], + "origin": "official", + "good_to_know": [ + "Leaderboards report Diamond. The authors recommend Main as the primary set. Extended holds every question, and each smaller set is part of the larger one.", + "An answer counts only with its letter in parentheses, as in 'The correct answer is (B)': a bare letter is a miss, and the first such phrase in the reply is the one read. Random guessing scores 25%.", + "Do not post its questions or answers in plain text online. The authors ask this of everyone and ship the data under a password, so the task list shows no question text.", + "Like the paper runs on OpenRouter only: OpenAI has retired the paper's GPT-4 and GPT-3.5-turbo-16k.", + "On Harbor the tasks are numbered 0 to 197, the choices are shuffled another way and the agent writes its letter to a file, so its trials do not pair by name with Nullius's." + ], + "upstream_limitations": [ + "The authors' script never asks the 70th question of a file and counts it wrong: Original tops out at 197 of 198 on Diamond. An agent is asked every question.", + "The script sends a temperature and a limit of 1,000 output tokens. A model that refuses either cannot run, and a reasoning model can spend the 1,000 tokens before it answers.", + "The few-shot prompts show five examples with their answers: two are Diamond and Main questions, three are Extended questions.", + "One Extended question is over 12,000 tokens long, more than GPT-4's window of 8,191.", + "The open-book baselines need the Bing Search API, which Microsoft retired, and the paper's Llama-2-70B-chat rows have no code in the repository: neither can run." + ], + "limitations": [ + "The answer-only baselines, which train a classifier on the choices, are not offered." + ], + "datasets": [ + { + "key": "gpqa-diamond", + "title": "GPQA Diamond", + "tasks": 198, + "official": "https://github.com/idavidrein/gpqa", + "source": "Harbor hub", + "registry": "gpqa-diamond/gpqa-diamond", + "hub": "gpqa-diamond/gpqa-diamond", + "verifier": "On Nullius, the authors' parse_sampled_answer reads the letter in the last message. On Harbor, the task's test reads the letter the agent wrote to /app/answer.txt.", + "notes": "The authors' highest-quality set: both experts agree and at most one of three non-experts is right. CC BY 4.0." + }, + { + "key": "gpqa-main", + "title": "GPQA Main", + "tasks": 448, + "official": "https://github.com/idavidrein/gpqa", + "source": "GitHub", + "registry": "", + "hub": "", + "verifier": "The authors' parse_sampled_answer reads the letter in the last message; it must be the correct choice's.", + "notes": "The authors' primary set: at least one of two experts agrees and at most two of three non-experts are right. CC BY 4.0." + }, + { + "key": "gpqa-extended", + "title": "GPQA Extended", + "tasks": 546, + "official": "https://github.com/idavidrein/gpqa", + "source": "GitHub", + "registry": "", + "hub": "", + "verifier": "The authors' parse_sampled_answer reads the letter in the last message; it must be the correct choice's.", + "notes": "Every published question. CC BY 4.0." + } + ], + "report": { + "sources": [ + "gpqa-diamond" + ] + }, + "task_count": 546, + "citation": "@inproceedings{rein2024gpqa,\n title={{GPQA}: A Graduate-Level Google-Proof Q\\&A Benchmark},\n author={David Rein and Betty Li Hou and Asa Cooper Stickland and Jackson Petty and Richard Yuanzhe Pang and Julien Dirani and Julian Michael and Samuel R. Bowman},\n booktitle={First Conference on Language Modeling},\n year={2024},\n url={https://openreview.net/forum?id=Ti67584b98}\n}", + "citation_source": "https://github.com/idavidrein/gpqa", + "evidence": [ + { + "label": "Not asked", + "path": "not_asked" + }, + { + "label": "Extracted answer", + "path": "extracted" + }, + { + "label": "Expected answer", + "path": "expected" + }, + { + "label": "Reply", + "path": "answer" + } + ] +} diff --git a/app/nullius/catalogue/benchmarks/gpqa/driver.py b/app/nullius/catalogue/benchmarks/gpqa/driver.py new file mode 100644 index 000000000..6450f857c --- /dev/null +++ b/app/nullius/catalogue/benchmarks/gpqa/driver.py @@ -0,0 +1,233 @@ +"""GPQA's driver for the Nullius standard (JSON lines on stdin and stdout). + +The upstream is the authors' repository ($NULLIUS_UPSTREAM): baselines/utils.py +holds its loader, which shuffles each question's four choices with a seed, and +its prompts; baselines/run_baseline.py its answerer, AnswerPredictor, and the +parser that reads a reply's letter. Every op calls them as published: + +units - one per question, named by the data's own Record ID +describe - each question's domain, subdomain and writer's difficulty estimate, + never its words: the authors ask that no example be shown in plain + text online, and a listing is kept in plain text and shown on a page +setup - the upstream's zero-shot prompt, its default prompt type, built by + its create_prompts; the workspace stays empty +score - the upstream's parse_sampled_answer on the last message; the letter + it reads must be the correct choice's place after the shuffle + (AnswerPredictor.LETTER_TO_INDEX against the example's + correct_index, the comparison its main() makes) +oracle - the correct choice's letter, written as the prompt asks for it +answer - the original and model setups: the upstream's AnswerPredictor asks + the question as its main() does for one question - create_prompts + for the chosen prompt type, then sample_answer, or for + self_consistency sample_consistent_answer - its OpenAI client + started again for the unit's relay. Each question runs in a folder of + its own, where the upstream finds its prompts/ and keeps its caches, + removed afterwards: every attempt asks the model anew. The place of + the file main() goes past without asking, and counts wrong (its + 'question_id == 69', read from its source), is not asked here either: + score gives that question 0, as main() counts it +preflight - a setup's first request, from the upstream's own client: the same + steps on a made-up question, the request caught before it is sent + +The questions ship in the upstream's dataset.zip ($NULLIUS_DATASET), under the +password its README gives. The driver reads the README for it, opens the +dataset's CSV in memory and hands that to the upstream's load_examples: the +opened CSV is never written to disk, and no reference reaches the workspace. +One load_examples call per driver gives every op its examples, so the prompt, +the scored letter and the oracle agree on the order of the choices (the seed +option; 0 is the upstream's default). +""" +import contextlib +import inspect +import io +import json +import os +import re +import shutil +import sys +import tempfile +import zipfile + +UPSTREAM = os.environ["NULLIUS_UPSTREAM"] +WORK = os.getcwd() # the job's driver folder +FILES = {"gpqa-diamond": "dataset/gpqa_diamond.csv", "gpqa-main": "dataset/gpqa_main.csv", + "gpqa-extended": "dataset/gpqa_extended.csv"} # each dataset's CSV in the zip +PASSWORD = re.compile(r"password:\s*`([^`]+)`") # as the upstream's README writes it +CATEGORIES = {"domain": "High-level domain", "subdomain": "Subdomain", "difficulty": "Writer's Difficulty Estimate"} +AGENT_PROMPT = "zero_shot" # run_baseline.py's default prompt_type +SEED = int(os.environ.get("NULLIUS_OPTION_SEED", "0")) +PROMPT_TYPE = os.environ.get("NULLIUS_OPTION_PROMPT_TYPE", AGENT_PROMPT) +NOWHERE = "http://relay.invalid/v1" # the upstream's client, until a unit's relay is named + + +def quiet(): + return contextlib.redirect_stdout(sys.stderr) # stdout carries the replies + + +# The upstream's modules read these as they are imported: utils.py starts an OpenAI client, which +# refuses to start without a key, and open_book.py reads Bing's. None is a credential: the client +# is given an address that leads nowhere until answer() names a unit's relay, and the open-book +# baselines are not run. +os.environ.update(OPENAI_API_KEY="none", OPENAI_BASE_URL=NOWHERE, BING_SEARCH_V7_SUBSCRIPTION_KEY="none") +sys.path.insert(0, os.path.join(UPSTREAM, "baselines")) +with quiet(): + import pandas # noqa: E402 the upstream's own reader of its CSV + import utils # noqa: E402 baselines/utils.py, as published + from run_baseline import AnswerPredictor # noqa: E402 baselines/run_baseline.py, as published + +LETTERS = {place: letter for letter, place in AnswerPredictor.LETTER_TO_INDEX.items()} +# main()'s loop goes past one place of the file it reads ('hack to deal with long answers'): no call, logged as not +# correct, and still in the count its accuracy divides by. Read from its source: a version without it skips nothing. +GUARD = re.search(r"if question_id == (\d+):", inspect.getsource(AnswerPredictor.main)) +EXAMPLES, ROWS = {}, {} + + +def load(): + """Every question of the dataset by its Record ID: the upstream's Example for it.""" + if EXAMPLES: + return EXAMPLES + dataset = os.environ.get("NULLIUS_DATASET_ID", "") + if dataset not in FILES: + raise ValueError(f"GPQA has no dataset {dataset}") + with open(os.path.join(UPSTREAM, "README.md"), encoding="utf-8") as f: + password = PASSWORD.search(f.read()) + if not password: + raise RuntimeError("the upstream's README gives no password for dataset.zip") + with zipfile.ZipFile(os.environ["NULLIUS_DATASET"]) as z: + raw = z.read(FILES[dataset], pwd=password.group(1).encode()) + examples = utils.load_examples(io.BytesIO(raw), seed=SEED) # its loader: read_csv, then each row's choices shuffled, in the file's order + rows = pandas.read_csv(io.BytesIO(raw)).to_dict("records") # the same read again, for what an Example leaves out + ids = [str(r["Record ID"]) for r in rows] + if len(ids) != len(examples) or len(set(ids)) != len(ids) or any(e.question != r["Question"] for e, r in zip(examples, rows)): + raise ValueError(f"{FILES[dataset]}: its rows do not give each example one Record ID") + ROWS.update(zip(ids, rows)) + EXAMPLES.update(zip(ids, examples)) + return EXAMPLES + + +def units(dataset, setup=None): + return {"units": list(load())} + + +def describe(dataset=None, **_): + load() + out = {} + for unit, row in ROWS.items(): + said = {name: row.get(column) for name, column in CATEGORIES.items()} + said = {name: value.strip() for name, value in said.items() if isinstance(value, str) and value.strip()} + if "difficulty" in said: # without its gloss in parentheses: 'Hard graduate level (could be ...)' + said["difficulty"] = said["difficulty"].split(" (")[0] + out[unit] = {"title": "", "text": "", "categories": said} + return {"units": out} + + +def setup(unit, dir, **_): + """The upstream's zero-shot prompt: its create_prompts, on that question alone.""" + return {"prompt": utils.create_prompts([load()[unit]], AGENT_PROMPT, None, None)[0][0]} + + +@contextlib.contextmanager +def upstream_folder(): + """A folder of its own for one question's run of the upstream, which reads prompts/ from where it + runs and writes its response caches there: a cache left by another question would answer for this one.""" + folder = tempfile.mkdtemp(prefix="gpqa-", dir=WORK) + try: + os.symlink(os.path.join(UPSTREAM, "prompts"), os.path.join(folder, "prompts")) + os.chdir(folder) + yield + finally: + os.chdir(WORK) + shutil.rmtree(folder, ignore_errors=True) + + +def skipped(unit): + """Whether the upstream's main() goes past the question without asking it: its place in the file.""" + return bool(GUARD) and list(load()).index(unit) == int(GUARD.group(1)) + + +def connect(base_url, key): + """The upstream's own client, started as utils.py starts it, from the variables it reads.""" + os.environ.update(OPENAI_BASE_URL=base_url, OPENAI_API_KEY=key) + utils.client = utils.OpenAI() + + +def ask(example, model): + """What the upstream's main() does with one question: its prompt for the prompt type, then its answer to it.""" + with upstream_folder(), quiet(): + predictor = AnswerPredictor(data_filename=FILES[os.environ["NULLIUS_DATASET_ID"]], model_name=model, + prompt_type=PROMPT_TYPE, seed=SEED) + prompt = utils.create_prompts([example], PROMPT_TYPE, None, model)[0][0] + if PROMPT_TYPE == "self_consistency": # main()'s own branch: its samples' most common letter, and no reply + letter = predictor.sample_consistent_answer(prompt) + return f"({letter}), the most common letter of the samples" if letter else "No sample gave a letter" + return predictor.sample_answer(prompt)[1] + + +def answer(unit, dir, setup, model, base_url, key, **_): + """The upstream's answerer on one question. model is a name its code accepts (gpt-4 for the + model setup); the relay sends the run's model in its place.""" + if setup not in ("original", "model"): + raise ValueError(f"GPQA has no {setup} setup") + example = load()[unit] + if skipped(unit): # main() asks nothing + return {"answer": "", "model": model} + connect(base_url, key) # now at this unit's relay + return {"answer": ask(example, model), "model": model} + + +def preflight(participant, model, roles, setup=None, **_): + """A setup's first request as the upstream's own client would send it: main()'s steps on a made-up question, + the request caught before it leaves. An agent's requests are its own: not captured.""" + import httpx + from unittest.mock import patch + + class Captured(BaseException): # not an Exception: the upstream's retries catch those + def __init__(self, request): + self.request = {"role": "agent", "path": request.url.raw_path.decode(), "body": json.loads(request.content)} + + def send(client, request, **kw): + raise Captured(request) + + if participant != "setup" or "agent" not in roles: + return {"requests": []} + connect(NOWHERE, "none") + try: + with patch.object(httpx.Client, "send", send): + ask(utils.Example("Compatibility check: which choice reads OK?", "OK", "No", "Never", "None", 0), model) + except Captured as captured: + return {"requests": [captured.request]} + raise RuntimeError("the upstream's answerer made no request") + + +def score(unit, dir, transcript, answer, setup=None, **_): + example = load()[unit] + if setup and skipped(unit): # a setup's: not asked, and counted wrong as main() counts it + said = f"run_baseline.py main() never asks question {int(GUARD.group(1)) + 1} of a file ('{GUARD.group(0)}') and counts it wrong" + return {"reward": 0.0, "passed": False, "detail": {"not_asked": said, "expected": LETTERS[example.correct_index]}} + letter = AnswerPredictor.parse_sampled_answer(answer or "") + ok = letter is not None and AnswerPredictor.LETTER_TO_INDEX[letter] == example.correct_index + return {"reward": 1.0 if ok else 0.0, "passed": ok, + "detail": {"extracted": letter, "expected": LETTERS[example.correct_index], "answer": (answer or "")[-4000:]}} + + +def oracle(unit, dir, **_): + return {"answer": f"The correct answer is ({LETTERS[load()[unit].correct_index]})"} + + +HANDLERS = {"units": units, "describe": describe, "setup": setup, "answer": answer, "score": score, "oracle": oracle, + "preflight": preflight} + + +def main(): + for line in sys.stdin: + try: + req = json.loads(line) + with quiet(): + out = HANDLERS[req.pop("op")](**req) + except Exception as e: + out = {"error": f"{type(e).__name__}: {e}"} + print(json.dumps(out), flush=True) + + +if __name__ == "__main__": + main() diff --git a/app/nullius/catalogue/benchmarks/gpqa/proofs.json b/app/nullius/catalogue/benchmarks/gpqa/proofs.json new file mode 100644 index 000000000..e7675dc7b --- /dev/null +++ b/app/nullius/catalogue/benchmarks/gpqa/proofs.json @@ -0,0 +1,113 @@ +{ + "schema": "nullius.proofs/v1", + "kind": "benchmark", + "key": "gpqa", + "versions": { + "": { + "proven": { + "gpqa-diamond": { + "units": { + "units": 198, + "passed": "198 ids, the same twice, unique" + }, + "leak": { + "units": 198, + "looked_for": 198, + "short": 0, + "passed": "198/198" + }, + "nop": { + "passed": "0/198", + "value": 0.0, + "expect": { + "at_most": 0.0 + }, + "units": 198, + "options": { + "seed": "0" + } + }, + "oracle": { + "passed": "198/198", + "value": 1.0, + "expect": { + "at_least": 1.0 + }, + "units": 198, + "options": { + "seed": "0" + } + } + }, + "gpqa-main": { + "units": { + "units": 448, + "passed": "448 ids, the same twice, unique" + }, + "leak": { + "units": 448, + "looked_for": 448, + "short": 0, + "passed": "448/448" + }, + "nop": { + "passed": "0/448", + "value": 0.0, + "expect": { + "at_most": 0.0 + }, + "units": 448, + "options": { + "seed": "0" + } + }, + "oracle": { + "passed": "448/448", + "value": 1.0, + "expect": { + "at_least": 1.0 + }, + "units": 448, + "options": { + "seed": "0" + } + } + }, + "gpqa-extended": { + "units": { + "units": 546, + "passed": "546 ids, the same twice, unique" + }, + "leak": { + "units": 546, + "looked_for": 546, + "short": 0, + "passed": "546/546" + }, + "nop": { + "passed": "0/546", + "value": 0.0, + "expect": { + "at_most": 0.0 + }, + "units": 546, + "options": { + "seed": "0" + } + }, + "oracle": { + "passed": "546/546", + "value": 1.0, + "expect": { + "at_least": 1.0 + }, + "units": 546, + "options": { + "seed": "0" + } + } + } + } + } + } +} diff --git a/app/nullius/catalogue/benchmarks/gpqa/standard.json b/app/nullius/catalogue/benchmarks/gpqa/standard.json new file mode 100644 index 000000000..63a19b83e --- /dev/null +++ b/app/nullius/catalogue/benchmarks/gpqa/standard.json @@ -0,0 +1,164 @@ +{ + "schema": "nullius.benchmark/v1", + "key": "gpqa", + "label": "GPQA", + "summary": "Each question is a graduate-level multiple-choice science question, asked with the authors' zero-shot prompt; their parser reads the letter in the last message, which must be the correct choice's.", + "family": "agent", + "needs": [ + "agent.task/v1" + ], + "upstream": { + "repository": "https://github.com/idavidrein/gpqa", + "tested": "56686c06f5e19865c153de0fdb11be3890014df7", + "tested_date": "2024-09-30", + "license": "MIT" + }, + "driver": { + "describe": true, + "preflight": true, + "command": [ + "{install}/.venv/bin/python", + "{here}/driver.py" + ], + "install": { + "python": "3.9", + "pip": [ + "fire==0.5.0", + "pandas==1.5.2", + "numpy==1.26.2", + "tqdm==4.66.1", + "openai==1.3.5", + "anthropic==0.7.3", + "python-dotenv==1.0.0", + "bs4==0.0.1", + "beautifulsoup4==4.12.2", + "requests==2.31.0", + "httpx==0.25.2", + "pydantic==2.5.2" + ] + } + }, + "datasets": [ + { + "id": "gpqa-diamond", + "label": "GPQA Diamond", + "summary": "Both experts agree and at most one of three non-experts is right. The set leaderboards report.", + "path": "dataset.zip", + "sha256": "461ae7329f15a3e35f8184d2dac24b990f34fdf12f366ca4062d8e6638cd08dc", + "units": 198 + }, + { + "id": "gpqa-main", + "label": "GPQA Main", + "summary": "At least one of two experts agrees and at most two of three non-experts are right. The authors' primary set.", + "path": "dataset.zip", + "sha256": "461ae7329f15a3e35f8184d2dac24b990f34fdf12f366ca4062d8e6638cd08dc", + "units": 448 + }, + { + "id": "gpqa-extended", + "label": "GPQA Extended", + "summary": "Every published question.", + "path": "dataset.zip", + "sha256": "461ae7329f15a3e35f8184d2dac24b990f34fdf12f366ca4062d8e6638cd08dc", + "units": 546 + } + ], + "units": { + "noun": "question", + "nouns": "questions", + "categories": { + "domain": { + "label": "Domain" + }, + "subdomain": { + "label": "Subdomain" + }, + "difficulty": { + "label": "Writer's difficulty estimate" + } + }, + "redistribute": false + }, + "controls": { + "nop": { + "source": "nullius", + "from": "Nullius: no agent runs; the answer is empty." + }, + "oracle": { + "source": "nullius", + "from": "Nullius, from the authors' answers: the letter the correct choice gets in their loader's shuffle, written as the prompt asks for it ('The correct answer is ()')." + } + }, + "score": { + "kind": "pass", + "says": "the authors' parse_sampled_answer (baselines/run_baseline.py) reads a letter in parentheses from the last message, and it is the correct choice's letter in the order their loader shuffled the choices into" + }, + "limits": { + "turn_seconds": 3600 + }, + "setups": { + "original": { + "summary": "The authors' AnswerPredictor (baselines/run_baseline.py) asks each question as its main() does: its prompt for the chosen method, its system message, temperature 0 and 1,000 output tokens on chat completions, five retries of a failed call. As in main(), the 70th question of the file is not asked and counts as wrong.\n\nIts own parse_sampled_answer reads the letter from the reply.\n\nIts code accepts only the model names it lists: the paper's GPT-4 and GPT-3.5-turbo-16k run under their own names, any other model under GPT-4's.", + "models": [ + "gpt-4", + "gpt-3.5-turbo-16k-0613" + ], + "default": "gpt-4", + "served_as": { + "gpt-3.5-turbo-16k-0613": "gpt-3.5-turbo-16k" + }, + "providers": { + "openrouter": "openai/" + }, + "paper": "Tables 5 and 6: each prompting method's accuracy on the extended, main and diamond sets" + }, + "model": { + "summary": "The same pipeline with any model in the answerer's place: the authors' code is told gpt-4, a name it accepts, and the relay sends the model chosen. Its scores compare with other runs of this setup, not with the paper.", + "runs_as": "gpt-4" + } + }, + "options": { + "prompt_type": { + "label": "Prompt", + "summary": "The authors' prompting method for their own answerer. Zero-shot is their script's default.", + "values": [ + "zero_shot", + "5_shot", + "zero_shot_chain_of_thought", + "chain_of_thought", + "self_consistency" + ], + "default": "zero_shot", + "names": { + "zero_shot": "Zero-shot", + "5_shot": "Few-shot", + "zero_shot_chain_of_thought": "Zero-shot chain of thought", + "chain_of_thought": "Few-shot chain of thought", + "self_consistency": "Self-consistency" + }, + "about": { + "zero_shot": "The question, its four choices and the answer format. One call.", + "5_shot": "Five example questions with their answers, then the question. One call.", + "zero_shot_chain_of_thought": "A first call reasons step by step; a second reads the answer from that reasoning. Two calls.", + "chain_of_thought": "The five examples with their writers' explanations, then the question. One call.", + "self_consistency": "The few-shot chain-of-thought prompt 20 times at temperature 0.7; the most common letter is the answer. 20 calls. Not in the paper's tables." + }, + "setups": [ + "original", + "model" + ] + }, + "seed": { + "label": "Choice order seed", + "summary": "Seed of the shuffle that orders each question's four choices. 0 is the authors' default.", + "pattern": "(?:0|[1-9][0-9]{0,8})", + "default": "0", + "setups": [ + "original", + "model", + "yours" + ] + } + } +} diff --git a/app/nullius/catalogue/benchmarks/gpqa/upstream-settings.json b/app/nullius/catalogue/benchmarks/gpqa/upstream-settings.json new file mode 100644 index 000000000..b11c76fe9 --- /dev/null +++ b/app/nullius/catalogue/benchmarks/gpqa/upstream-settings.json @@ -0,0 +1,338 @@ +[ + { + "entry": "baselines/run_baseline.py main", + "setting": "data_filename: dataset/gpqa_diamond.csv", + "values": "198 questions", + "default": "", + "nullius": "dataset:gpqa-diamond" + }, + { + "entry": "baselines/run_baseline.py main", + "setting": "data_filename: dataset/gpqa_main.csv", + "values": "448 questions; the README's example", + "default": "", + "nullius": "dataset:gpqa-main" + }, + { + "entry": "baselines/run_baseline.py main", + "setting": "data_filename: dataset/gpqa_extended.csv", + "values": "546 questions", + "default": "", + "nullius": "dataset:gpqa-extended" + }, + { + "entry": "dataset.zip", + "setting": "dataset/gpqa_experts.csv", + "values": "60 question writers and validators", + "default": "", + "nullius": "not offered - a table of the experts, not questions" + }, + { + "entry": "dataset.zip", + "setting": "password", + "values": "given in the README", + "default": "", + "nullius": "fixed:the README's - read from the pinned README when the zip is opened, never copied here; the CSV is read in memory and never written to disk" + }, + { + "entry": "Hugging Face Idavidrein/gpqa", + "setting": "gated copy", + "values": "gpqa_diamond.csv, gpqa_main.csv, gpqa_extended.csv, gpqa_experts.csv", + "default": "", + "nullius": "not offered - needs a token and the gate's yes; the pinned repository's zip ships the four files of the same names and needs neither" + }, + { + "entry": "baselines/run_baseline.py main", + "setting": "model_name: gpt-4", + "values": "in CHAT_MODELS; the README's example", + "default": "", + "nullius": "setup:original" + }, + { + "entry": "baselines/run_baseline.py main", + "setting": "model_name: gpt-3.5-turbo-16k-0613", + "values": "in CHAT_MODELS", + "default": "", + "nullius": "setup:original" + }, + { + "entry": "baselines/run_baseline.py main", + "setting": "model_name: any other model", + "values": "refused by get_api_type: 'Model name ... not supported'", + "default": "", + "nullius": "setup:model" + }, + { + "entry": "baselines/run_baseline.py main", + "setting": "model_name: gpt-4-1106-preview", + "values": "in CHAT_MODELS", + "default": "", + "nullius": "not offered - no provider serves it: OpenAI retired it and OpenRouter does not list it" + }, + { + "entry": "baselines/run_baseline.py main", + "setting": "model_name: text-ada-001, text-babbage-001, text-curie-001, text-davinci-002, text-davinci-003", + "values": "completion models", + "default": "", + "nullius": "not offered - retired by OpenAI, and asked through openai.Completion.create, which the pinned openai 1.3.5 no longer has" + }, + { + "entry": "baselines/run_baseline.py main", + "setting": "model_name: claude-2", + "values": "in ANTHROPIC_MODELS", + "default": "", + "nullius": "not offered - retired by Anthropic, and asked through its text completions, which the relay does not serve" + }, + { + "entry": "paper", + "setting": "Llama-2-70B-chat rows", + "values": "zero-shot, few-shot, zero-shot and few-shot chain of thought", + "default": "", + "nullius": "not offered - the repository has no code that runs it, only its result files" + }, + { + "entry": "baselines/run_baseline.py main", + "setting": "prompt_type", + "values": "zero_shot, 5_shot, zero_shot_chain_of_thought, chain_of_thought, self_consistency", + "default": "zero_shot", + "nullius": "option:prompt_type" + }, + { + "entry": "baselines/run_baseline.py main", + "setting": "prompt_type: few_shot", + "values": "", + "default": "", + "nullius": "not offered - deprecated: the script raises 'Few-shot deprecated - use `5_shot` instead'" + }, + { + "entry": "baselines/run_baseline.py main", + "setting": "prompt_type: self_consistency (SELF_CONSISTENCY_SAMPLES = 20)", + "values": "the chain_of_thought prompt, 20 samples at temperature 0.7, the most common letter", + "default": "", + "nullius": "option:prompt_type" + }, + { + "entry": "baselines/run_baseline.py main", + "setting": "prompt_type: retrieval, retrieval_content", + "values": "open book: baselines/open_book.py", + "default": "", + "nullius": "not offered - every search calls Bing's Search API, which Microsoft retired on 2025-08-11" + }, + { + "entry": "driver (ours)", + "setting": "prompt for an agent", + "values": "the upstream's zero_shot prompt", + "default": "", + "nullius": "fixed:zero_shot - the script's default prompt_type; the few-shot prompts carry questions of the datasets with their answers" + }, + { + "entry": "baselines/run_baseline.py main", + "setting": "few_shot_n", + "values": "", + "default": "None", + "nullius": "fixed:None - the upstream's default; only its deprecated few_shot read it" + }, + { + "entry": "baselines/run_baseline.py main", + "setting": "call_type", + "values": "sample, logprobs", + "default": "sample", + "nullius": "fixed:sample - the upstream's default; logprobs raises NotImplementedError" + }, + { + "entry": "baselines/run_baseline.py main", + "setting": "max_examples", + "values": "the first N rows", + "default": "None", + "nullius": "fixed:None - a run's own limit and task sets choose the questions" + }, + { + "entry": "baselines/run_baseline.py main", + "setting": "verbose", + "values": "prints each question and answer; the README's command passes --verbose", + "default": "False", + "nullius": "fixed:False - it only prints: nothing asked or scored reads it" + }, + { + "entry": "baselines/run_baseline.py main", + "setting": "seed", + "values": "an integer: the shuffle of each question's four choices", + "default": "0", + "nullius": "option:seed" + }, + { + "entry": "baselines/run_baseline.py main", + "setting": "overwrite_cache", + "values": "ask again a prompt already answered", + "default": "False", + "nullius": "fixed:False - the upstream's default; each question runs in a folder of its own, which holds no earlier reply" + }, + { + "entry": "baselines/run_baseline.py main", + "setting": "response caches (cache_.pkl, cache_prompt_generation_.pkl)", + "values": "written where the script runs", + "default": "", + "nullius": "fixed:not kept - written in the question's own folder and removed with it: a kept cache would answer a later attempt, or another question's zero-shot chain of thought, without asking the model" + }, + { + "entry": "baselines/run_baseline.py main", + "setting": "logs/__