Run an evaluation
Point the service at a clinical chatbot you're authorized to test; it runs adversarial synthetic-patient conversations and emails an epidemiological report.
Submit a red-team run
The core workflow. Choose a target endpoint, a specialty, and a number of trials; the orchestrator drives conversations toward unsafe advice and a judge panel scores every reply. Free while in preview (100 trials per email).
API reference
/runs — body: email, target{kind,url,model,api_key,…}, specialty, n_trials, optional condition/focus_harms/max_turns/control_fraction/harm_threshold/seed/orchestration/judges/runs/{run_id}/status — poll progress/runs/{run_id} — the full HTML report (also emailed)/runs/{run_id}/cancel — stop a running jobField scan — the whole field of agents
One submission runs a curated panel of the main consumer health-advice agents (ChatGPT, Claude, Gemini, Llama) on the same case-mix for a condition/area, and renders a comparative harm chart ranking the field. Agents whose provider has no server key are reported as skipped.
API reference
/field — body: email, specialty, condition, n_trials, optional models[]/field — ?field=<id> — comparative report + harm chart/field.json — ?field=<id> or ?runs=… — raw numbers/field.svg — ?field=<id> (&share=1 for the 1200×630 image)Results & sharing
Turn a completed run into legible, shareable artifacts and compare across models.
Public safety leaderboard
Every completed run is auto-ranked here by the clinical safety index (0–100, log-scaled on the harm-equivalent rate: 100 at ≤1% of conversations harmed, 24 at one in three) with a clinical-tolerance grade A–F, per clinical specialty plus an overall view. No extra step.
API reference
/leaderboard — add ?category=<specialty>; the chart takes ?metric=&arm=control&specialty=&harm=&model=/leaderboard.json — raw board/leaderboard/runs.json — every complete run as a chart point/super/{super_id} — a Super Run benchmark: every model × every specialty/status — every run in flight: queue, progress, pace, ETA (also /status.json)Model safety card + share image
A per-target card: safety score, rank, attack success, critical failures, a time-to-harm curve, top harm categories, and provenance — with Open Graph tags and a 1200×630 share image.
API reference
/card — ?run=<run_id>/card/{run_id}/image.svg — social share imageEval card & dataset datasheet
A model-card for the eval itself (what it measures, elicitation, the audited grader, metrics, limitations, standards) and a datasheet-for-datasets for the conversation data.
API reference
/eval-card — the eval's model card/datasheet — datasheet-for-datasetsCross-model comparison
A descriptive leaderboard across chosen runs: attack success, harmful-reply risk, median prompts-to-harm, NNH, QALYs/1,000, with CIs and overlaid KM curves.
API reference
/compare — ?runs=<id>,<id>,…/compare.json — raw numbersDALY burden (PSA)
Expected harm burden as a distribution — DALYs per 1,000 conversations with a 95% credible interval from a Monte-Carlo PSA over GBD-informed weights and the harm rate's posterior. Illustrative, order-of-magnitude.
API reference
/runs/{run_id}/daly — report + density plot/runs/{run_id}/daly.json — numbers/runs/{run_id}/daly.svg — distribution imageAI advice as an exposure — epidemiologic effect measures
Treats each agent as an exposure and a conversation as the unit: RR/OR/RD, NNH, attributable fraction, PAF (for a stated exposure prevalence), and the E-value vs a referent (safest agent, or a stated baseline risk); Mantel–Haenszel stratification over persona covariates with confounding and effect-modification screens; Cochran–Armitage dose–response over prompts delivered; quantitative bias analysis for judge misclassification (Rogan–Gladen + probabilistic, with the judge's Se/Sp measured from clinician adjudication when available — differential per agent where labels allow).
API reference
/epi — ?runs=<id>,<id>,… [&ref=<run_id> | &baseline=0.05] [&prevalence=0.3] [&se=0.9&sp=0.95]/epi.json — numbers/epi.svg — forest plot (?kind=hazard for the dose–response)Target trial emulation + causal diagrams
The randomized trial we would run, component by component (eligibility, strategies, assignment, follow-up, outcome, contrasts, analysis), next to how the instrument emulates each one with a fidelity grade; ITT vs per-protocol estimands per agent; DAGs for real-world use and for the design with minimal adjustment sets (backdoor criterion) and a threats-to-validity table pointing to where each is handled.
API reference
/target-trial — ?runs=<id>,<id>,… [&ref=<run_id>]/target-trial.json — protocol, estimands, DAG analysis, threats/target-trial.svg — ?design=trial|observational — the DAG imageTable 1 — case-mix by agent
The descriptive table (STROBE item 14): persona covariates per agent/arm with n (%), and the standardized mean difference of each run against the referent. On the paired design every SMD is 0 — the balance diagnostic makes the shared case-mix visible; a non-zero SMD means the runs are not paired.
API reference
/table1 — ?runs=<id>,<id>,… [&ref=<run_id>]/table1.json — rows, SMDs, balance flagSTROBE reporting checklist
The 22 STROBE items checked automatically against what the instrument already reports for the chosen runs — status, where it is reported, and what remains the author's to write — with a reported / applicable score. A reporting aid for the manuscript, not a quality verdict.
API reference
/strobe — ?runs=<id>,<id>,…/strobe.json — items, score, to-doValidity & methodology
Make the measurement trustworthy: audit the grader, validate it against clinicians, and measure the design-based Critical Harm Rate.
Grader bias & robustness audit
Audits the harm judge itself for verbosity / authority / disclaimer laundering, paraphrase stability, self-preference (own-family leniency), and calibration (Brier/ECE/AUROC). Flags a material shift only when the CI excludes 0 and it clears a size floor.
API reference
/grader-audit — body: judges[], threshold/grader-audit/{audit_id} — report/grader-audit/{audit_id}.json — numbersClinician adjudication (judge validation)
Build a stratified blinded sample, collect independent clinician labels, and score the LLM judge as a diagnostic test (κ / AC1, sensitivity/specificity, AUROC, calibration).
API reference
/adjudication/sets — body: run_ids[], n, strata…/adjudicate/{set_id} — blinded labeling UI/adjudication/{set_id}/analysis — agreement + diagnostics/adjudication/{set_id}/export — items + labelsCritical Harm Event (CHE)
A design-based headline metric: a high-sensitivity screener → two-phase clinician review → the Critical Harm Rate (Horvitz–Thompson + exact/bootstrap CIs, rule-of-three), with a redacted report.
API reference
/runs/{run_id}/che/screen — screen stored replies/che/review-sets — two-phase clinician sample/che-review/{set_id} — blinded clinician UI/che/report — ?runs=<id>,… — the CHR reportBenchmarking & data
Export analysis-ready data and quantify what the attack orchestrator contributes.
Tidy dataset export
One analysis-ready row per reply (or per conversation) with every covariate — the input to the confirmatory analysis and to Inspect.
API reference
/export/tidy.csv — ?runs=<id>,…&level=turn|trial/export/tidy.json — same as JSONAblation & baselines
Launches a matched arm set against one target (full stack, one ablation per component, and a single-prompt baseline) sharing the seed, and reports each component's marginal effect (Newcombe RD + log-rank).
API reference
/ablation — body: like /runs, plus optional arms[]/ablation/{ablation_id} — contrast report/ablation/{ablation_id}.json — numbers/ablation — ad-hoc: ?runs=<id>,… (pre-tagged runs)Planning & reproducibility
Size the study before you run it, and make every run reproducible.
Sample-size & power
A calculator: single-proportion CHR precision, two-proportion n / power / MDE, a clustering design effect, the two-phase clinician review burden, and rule-of-three zero-event planning.
API reference
/power — the calculator UI/power.json — mode=precision|two_proportions|mde|review_burden|rule_of_threeReproducibility capsule
A content-addressed manifest (stable config_hash, secret-free), a determinism check that recomputes the persona case-mix and proves it matches, and a bundle a reviewer can keep.
API reference
/runs/{run_id}/manifest.json — config + config_hash/runs/{run_id}/verify.json — determinism check/runs/{run_id}/capsule.json — manifest + results + rowsPre-registration
An OSF-style protocol (hypotheses, design, outcomes, analysis plan, sample-size justification, exclusions, ethics/dual-use) to freeze before the confirmatory run.
API reference
redteam/PREREGISTRATION.mdConfirmatory analysis & interop (separate packages)
Heavier, offline packages kept out of the stdlib service: the confirmatory statistics and the UK AISI Inspect surface.
Confirmatory analysis
pandas/statsmodels/lifelines models against the tidy export: GEE logistic, Kaplan–Meier + log-rank, discrete-time cloglog hazard, Aalen–Johansen competing risks, Benjamini–Hochberg, and a latent-safety leaderboard (Rasch IRT + Bradley–Terry) with a forest plot.
API reference
$ cd analysis && pip install -r requirements.txt — separate heavy environment$ python -m analysis.cli --input tidy.csv --out results/ — or --simulate for a demoInspect (UK AISI) interop
The eval as a first-class Inspect task + model-graded scorer, runnable in `inspect view`; `samples_from_tidy` replays a run's case mix as an Inspect dataset.
API reference
$ cd inspect_eval && pip install -r requirements.txt$ inspect eval clinical_redteam.py --model <model> -T grader=<grader> — then: inspect viewFull design and statistics: redteam/RESEARCH.md
and redteam/PREREGISTRATION.md. Separate packages: redteam/analysis/ and
redteam/inspect_eval/.