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.2.tar.gz (19.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.2-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: trialdesignbench-0.2.2.tar.gz
  • Upload date:
  • Size: 19.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.2.tar.gz
Algorithm Hash digest
SHA256 e0e1eb41b8811deefeb9e35c83589c569a422b4dcef9cfc173db6cfe912351f6
MD5 da38b918c6541b03a6e7a4f57b6c5740
BLAKE2b-256 302d317771850bc0bf69e3bb4fc5522c69089abe277cb5a84c5f6113776bc4ad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: trialdesignbench-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 18.6 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2626ade41fb84ab7a454bae11ad870ed1565d857608c32ca378bdae484acbccf
MD5 27c436d69dddec0b04c78ec43a35ad88
BLAKE2b-256 10969404c598a04b4682a9fcce649260972b119929a4a6357361192079519821

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