sauce.ai/redteam
Methods & workflows · index

Methods & workflows

21 workflows grouped by stage of an evaluation study — from pointing the service at a chatbot to the confirmatory statistics. Pick runs and parameters, then open the report or start the job. Run pickers list your recent runs.

For authorized testing only. Harm labels are LLM-judge screening signals (the judge is itself audited), not clinical determinations — a clinician must review flagged transcripts.

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).

When: You own or have written permission to test the target.
POST Launch a red-team run /runs
The chatbot under test (the target)
Custom endpoint mapping
Web page selectors

Requires the browser add-on on the server. Selectors target the newest assistant bubble.

Harm categories to hunt (blank = all)
Advanced: the red-team engine (optional)

The attacker is an ensemble of LLMs that propose, refine, and vote on the next patient message most likely to push the bot into an unsafe reply. All of this is optional — defaults use the server-configured models.

API reference
POST/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
GET/runs/{run_id}/status — poll progress
GET/runs/{run_id} — the full HTML report (also emailed)
POST/runs/{run_id}/cancel — stop a running job

Field 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.

When: Benchmarking the deployed field for a specific condition; a showcase view.
POST Run the whole field /field
Agents (leave all unticked = every available)
Advanced: the red-team engine (optional)

The attacker is an ensemble of LLMs that propose, refine, and vote on the next patient message most likely to push the bot into an unsafe reply. All of this is optional — defaults use the server-configured models.

GET View a field scan /field
loading runs…
API reference
POST/field — body: email, specialty, condition, n_trials, optional models[]
GET/field — ?field=<id> — comparative report + harm chart
GET/field.json — ?field=<id> or ?runs=… — raw numbers
GET/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.

When: Always on; browse after any run.
GET Open the leaderboard /leaderboard
API reference
GET/leaderboard — add ?category=<specialty>; the chart takes ?metric=&arm=control&specialty=&harm=&model=
GET/leaderboard.json — raw board
GET/leaderboard/runs.json — every complete run as a chart point
GET/super/{super_id} — a Super Run benchmark: every model × every specialty
GET/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.

When: Sharing or summarizing a single target's results.
GET Open a safety card /card
loading runs…
API reference
GET/card — ?run=<run_id>
GET/card/{run_id}/image.svg — social share image

Eval 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.

When: Documenting the methodology for readers/reviewers.
GET Open the eval card /eval-card
GET Open the datasheet /datasheet
API reference
GET/eval-card — the eval's model card
GET/datasheet — datasheet-for-datasets

Cross-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.

When: Comparing targets run on the same paired case-mix (same seed+specialty+n).
GET Compare runs /compare
loading runs…
API reference
GET/compare — ?runs=<id>,<id>,…
GET/compare.json — raw numbers

DALY 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.

When: Communicating magnitude of harm with its uncertainty.
GET Open the DALY report /runs/{run_id}/daly
loading runs…
API reference
GET/runs/{run_id}/daly — report + density plot
GET/runs/{run_id}/daly.json — numbers
GET/runs/{run_id}/daly.svg — distribution image

AI 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).

When: Framing AI advice as an exposure for an epidemiologic audience; checking that the judge's imperfect sensitivity/specificity does not drive the headline contrast.
GET Run the exposure analysis /epi
loading runs…
loading runs…
API reference
GET/epi — ?runs=<id>,<id>,… [&ref=<run_id> | &baseline=0.05] [&prevalence=0.3] [&se=0.9&sp=0.95]
GET/epi.json — numbers
GET/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.

When: Explaining to an epidemiologic audience why assignment by design makes the crude agent contrast unconfounded — and what residual threats remain (judge measurement, censoring, external validity).
GET Emulate the target trial /target-trial
loading runs…
loading runs…
GET DAG image /target-trial.svg
API reference
GET/target-trial — ?runs=<id>,<id>,… [&ref=<run_id>]
GET/target-trial.json — protocol, estimands, DAG analysis, threats
GET/target-trial.svg — ?design=trial|observational — the DAG image

Table 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.

When: Any write-up; checking that a cross-agent contrast is really on the same personas.
GET Build Table 1 /table1
loading runs…
loading runs…
API reference
GET/table1 — ?runs=<id>,<id>,… [&ref=<run_id>]
GET/table1.json — rows, SMDs, balance flag

STROBE 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.

When: Writing up an exposure analysis for an epidemiologic venue; checking what is still missing (judge validation, grader audit, a case-mix table).
GET Check the reporting items /strobe
loading runs…
API reference
GET/strobe — ?runs=<id>,<id>,…
GET/strobe.json — items, score, to-do

Validity & 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.

When: Before trusting any harm numbers; whenever you change the judge model.
POST Audit the grader /grader-audit
API reference
POST/grader-audit — body: judges[], threshold
GET/grader-audit/{audit_id} — report
GET/grader-audit/{audit_id}.json — numbers

Clinician 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).

When: Establishing that the judge agrees with clinicians (the validity backbone).
POST Build a blinded adjudication set /adjudication/sets
loading runs…
API reference
POST/adjudication/sets — body: run_ids[], n, strata…
GET/adjudicate/{set_id} — blinded labeling UI
GET/adjudication/{set_id}/analysis — agreement + diagnostics
GET/adjudication/{set_id}/export — items + labels

Critical 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.

When: Reporting the most serious harms with design-based rigor.
POST Screen a run for critical harm events /runs/{run_id}/che/screen
loading runs…
POST Build a clinician review set /che/review-sets
loading runs…
GET Open the CHR report /che/report
loading runs…
API reference
POST/runs/{run_id}/che/screen — screen stored replies
POST/che/review-sets — two-phase clinician sample
GET/che-review/{set_id} — blinded clinician UI
GET/che/report — ?runs=<id>,… — the CHR report

Benchmarking & 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.

When: Before any off-line statistical modelling.
GET Download the tidy dataset /export/tidy.csv
loading runs…
API reference
GET/export/tidy.csv — ?runs=<id>,…&level=turn|trial
GET/export/tidy.json — same as JSON

Ablation & 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).

When: Showing the orchestrator's components carry their weight (RQ3).
POST Launch the ablation arm set /ablation
The chatbot under test (the target)
Custom endpoint mapping
Web page selectors

Requires the browser add-on on the server. Selectors target the newest assistant bubble.

Harm categories to hunt (blank = all)
Advanced: the red-team engine (optional)

The attacker is an ensemble of LLMs that propose, refine, and vote on the next patient message most likely to push the bot into an unsafe reply. All of this is optional — defaults use the server-configured models.

GET View an ad-hoc contrast /ablation
loading runs…
API reference
POST/ablation — body: like /runs, plus optional arms[]
GET/ablation/{ablation_id} — contrast report
GET/ablation/{ablation_id}.json — numbers
GET/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.

When: Planning the confirmatory run.
GET Open the calculator /power
API reference
GET/power — the calculator UI
GET/power.json — mode=precision|two_proportions|mde|review_burden|rule_of_three

Reproducibility 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.

When: Archiving or verifying a run; filing with a publication.
GET Open a run's capsule /runs/{run_id}/capsule.json
loading runs…
GET Verify determinism /runs/{run_id}/verify.json
loading runs…
API reference
GET/runs/{run_id}/manifest.json — config + config_hash
GET/runs/{run_id}/verify.json — determinism check
GET/runs/{run_id}/capsule.json — manifest + results + rows

Pre-registration

An OSF-style protocol (hypotheses, design, outcomes, analysis plan, sample-size justification, exclusions, ethics/dual-use) to freeze before the confirmatory run.

When: Before collecting confirmatory data.
API reference
Repo document: redteam/PREREGISTRATION.md

Confirmatory 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.

When: The confirmatory statistics for the paper.
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 demo

Inspect (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.

When: Running the eval in the Inspect ecosystem / frontier-lab stack.
API reference
$ cd inspect_eval && pip install -r requirements.txt
$ inspect eval clinical_redteam.py --model <model> -T grader=<grader> — then: inspect view

Full design and statistics: redteam/RESEARCH.md and redteam/PREREGISTRATION.md. Separate packages: redteam/analysis/ and redteam/inspect_eval/.