Automate updating the calibration process
Summary
Calibration involves a lot of manual work; update what can be updated
Basic example
Currently the process is:
- select a set of probes
- build a garak config based on that
- select a set of models
- run that config on all those models
- run the
calibrationscript on the results - add the output into
data/calibration - update
data/bag.md - update the
data/calibration.jsonpointer
Motivation
- To save time
- To make timely calibration updates more likely
- To improve consistency of our calibration
Hi — following up on this with a concrete proposal, since calibration trustworthiness has two coupled problems:
1. Stale baseline (the automation gap this issue describes)
data/calibration/ currently ships two snapshots from 2024 (calibration-2024-summer.json, calibration-2024-09update.json). Z-scores for today's models are computed against a two-year-old distribution, and safety-relevant score distributions drift fast. The manual pipeline listed in the issue summary is exactly why timely updates don't happen.
2. Silent degradation on load failure
In garak/analyze/calibration.py, _load_calibration() swallows every failure path (missing file, JSON decode error, symlink checked out as a text file) with return None plus a warning. Evaluation then continues without a usable calibration, and nothing in the report marks that the z-scores were computed without one — a reader can't tell whether a rating is calibrated or not.
Proposal: a versioned, automated calibration pipeline
- A scheduled job (or script) that runs a pinned benchmark model set through a pinned probe subset, then invokes the existing calibration script — automating the exact manual sequence listed in this issue.
- Snapshots land in
data/calibration/as dated, versioned files (the current naming convention already supports this), withgarak_calibration_metarecording the model set, probe subset, and generation date. Calibrationgains a loaded/stale/failed state; reports (and the JSONL output) annotate which calibration snapshot was used, or explicitly state "uncalibrated" when loading failed — fail-loud instead of fail-silent.- Optionally, snapshots older than N months flag a deprecation warning in reports.
Happy to draft a PR for the fail-loud + report annotation part first (small and self-contained), with the automation pipeline as a follow-up. Would that fit the direction you have in mind for #869?