Skip to main content

Evaluate whether AI agents can create efficient, reproducible, and safe clinical trial design

Project description

trialdesignbench

PyPI version Python versions CI tests Mypy check Ruff check Documentation License

TrialDesignBench provides tooling for evaluating whether AI agents can reproduce clinical trial designs from Statistical Analysis Plans and protocols.

This baseline implements workflow step 1:

  1. Create a local benchmark workspace.
  2. Convert a SAP/protocol PDF to Mathpix Markdown, with optional LaTeX ZIP output.
  3. Build the standard TrialDesignBench reproduction prompt.
  4. Run the prompt against a locally installed Codex SDK/runtime and save the run artifacts.

Installation

uv add trialdesignbench

For development:

git clone https://github.com/BBSW-org/TrialDesignBench.git
cd TrialDesignBench
uv sync

The experimental Codex Python SDK is declared as a Git source dependency for uv environments until it is published on PyPI. From a clone of this repository, uv sync installs both openai-codex and its pinned local runtime. For PyPI-only installs before openai-codex is published on PyPI, add the SDK source explicitly in the consuming project:

uv add "openai-codex @ git+https://github.com/openai/codex.git#subdirectory=sdk/python"

Quick Start

uv run tdb init tdb-workspace
uv run tdb configure --workspace tdb-workspace
uv run tdb run path/to/sap.pdf --workspace tdb-workspace --case-id tdb-001

Use --no-codex to exercise only the Mathpix ingestion portion:

uv run tdb run path/to/sap.pdf --workspace tdb-workspace --no-codex

The workspace .env file stores MATHPIX_APP_ID, MATHPIX_APP_KEY, CODEX_MODEL, and optionally CODEX_BIN. The default Codex model is gpt-5.5, and the default reasoning effort is high. The generated workspace .gitignore excludes credentials and output artifacts by default.

Converted Mathpix artifacts are reused by default on retry. Add --force to submit the PDF again, or --http-timeout to increase the per-request Mathpix HTTP timeout for large uploads.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trialdesignbench-0.2.1.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trialdesignbench-0.2.1-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file trialdesignbench-0.2.1.tar.gz.

File metadata

  • Download URL: trialdesignbench-0.2.1.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for trialdesignbench-0.2.1.tar.gz
Algorithm Hash digest
SHA256 0c32327f919e50052e5179bcc9fdebc43eebbe3b84c40ca689bb0f69b5c861e7
MD5 cd892ecbc0ec6da6c8623dfcfdb54404
BLAKE2b-256 52278ee5e48db6ba01a963b93ac6586269c4b1c6ae88f87b255fe5bfd1dd9eec

See more details on using hashes here.

File details

Details for the file trialdesignbench-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: trialdesignbench-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for trialdesignbench-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c92be7d9ec3ab67ac80fcbb149d2f639a985dff844dcc7bd079a9a4e1d47a6c6
MD5 c7b97f4e4b79f147b0c874256cb70bc3
BLAKE2b-256 61b62fe18669900ce8f0fa8bba8e3dcb491126843873ea68a7fd3da2553b6324

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page