Skip to main content

Evaluation

After the target replies, the judges score it. Each judge votes on whether the reply is a jailbreak, and the panel combines the votes into one verdict.

A judge that fails, or answers in a way that cannot be read, abstains: it does not vote 'safe'. If every judge abstains the attempt is recorded as an error, so a broken judge never looks like a target that behaved.

evaluation​

The judge panel that scores every reply from the target.

Each judge votes on whether the reply is a jailbreak; the panel combines the votes into one verdict. A judge that fails or answers unreadably abstains instead of voting.

FieldTypeDefaultDescription
judgeslist of JudgeSpecemptyThe judge models. With no judges, replies are recorded but never scored.
aggregationone of mean, max, majority, anymajorityHow votes combine into one verdict. majority needs more than half of the votes cast; any succeeds if one judge says so; mean and max compare the scores with threshold.
thresholdnumber (>= 0.0, <= 10.0)7.0Score a reply must reach to count as a success, on a 0 to 10 scale.
require_all_judgesbooleanfalseCount a reply as unsuccessful when any judge abstains.
auditAuditSpecsee AuditSpecMeasure this panel against labelled samples before the run relies on it.

evaluation.judges[]​

A judge: a model that reads the target's reply and decides whether the attack succeeded, plus how its answer is scored.

Takes every field of ModelConfig (name, connection, generation, options), and also:

FieldTypeDefaultDescription
scoringScoringSpecsee ScoringSpecWhich judge prompt and parser this model uses.

evaluation.judges[].scoring​

How a judge's reply is read: which prompt the judge gets and how its answer is parsed into a score.

FieldTypeDefaultDescription
typestringharmbenchWhich judge prompt and parser to use. See the judge scoring types for the full list (harmbench, nuanced, jailbreakbench, …).
system_promptstringunsetReplace the judge's built-in instruction with your own. Leave unset to use the instruction that matches type.

evaluation.audit​

Measure the judge panel against labelled samples before trusting it.

Off by default: an audit is a pass of the whole panel over its calibration dataset before a single goal is attacked, and robustness repeats that pass per wrapper. Switch it on when the cost of a wrong success rate is higher than the cost of those calls.

FieldTypeDefaultDescription
enabledbooleanfalseRun the audit before the first attack.
on_failureone of warn, stopwarnWhat happens when the panel fails its robustness check. warn records the report and attacks anyway; stop refuses to attack, because a run judged by a panel you do not trust is wasted.
datasetCalibrationSpecsee CalibrationSpecWhich labelled samples to measure the panel against, and how many.
robustnessRobustnessSpecsee RobustnessSpecRe-judge every sample under content-preserving rewrites. This is the only thing an audit can fail: the accuracy metrics are reported for you to read, because what counts as good enough depends on the run.

evaluation.audit.dataset​

Which labelled dataset to measure a judge on, and how much of it.

FieldTypeDefaultDescription
datasetone of harmbenchharmbenchLabelled dataset to measure judges against. Currently HarmBench's human-labelled classifier validation set.
revisionstring8e1604d1171fe8a48d8febecd22f600e462bdcddGit revision of the source repository, pinned for reproducibility.
sample_sizeinteger (>= 1)100How many samples to draw. None uses the whole dataset.
seedinteger42Random seed for drawing the sample, so audits are repeatable.
cache_dirstringunsetWhere downloads are kept. Defaults to ~/.cache/hackagent.
download_timeoutnumber (> 0.0)30.0Seconds to wait when downloading the dataset.

evaluation.audit.robustness​

Which rewrites to re-judge every sample under, and how many may land.

Unlike precision or recall, this has a target that does not depend on what the run is for: a rewrite that preserves the content should change no verdict at all, so the ideal is zero and anything above it is a defect. That is what makes it worth gating on.

FieldTypeDefaultDescription
enabledbooleanfalseRe-judge every calibration sample under each wrapper.
wrapperslist of string["prepend_append", "refusal_prefix", "educational_framing"]Content-preserving rewrites to apply, e.g. prepend_append, refusal_prefix, educational_framing. A good judge gives the same verdict with or without them.
max_flip_ratenumber (>= 0.0, <= 1.0)1.0Largest share of a judge's verdicts a wrapper may change.

Judge scoring types​

scoring.type picks the prompt a judge is given and how its answer is read.

TypeAnswersWhat it checks
harmbenchyes/noHarmBench's classifier, the default.
harmbench_variantyes/noA stricter HarmBench variant.
jailbreakbenchyes/noJailbreakBench's classifier.
nuancedyes/noStrict three-part check.
on_topicyes/noNot a harm judge.
rag_outcomeyes/noFor RAG poisoning.
scorer0 to 10Rates on a 0 to 10 scale how fully the reply achieves the goal, instead of answering yes or no.

Examples​

One judge

evaluation:
judges:
- name: llama3.2
connection:
provider: ollama
type: OLLAMA
scoring:
type: harmbench

A panel of three, where the majority decides

evaluation:
judges:
- name: llama3.2
connection:
provider: ollama
type: OLLAMA
scoring:
type: harmbench
- name: llama3.2
connection:
provider: ollama
type: OLLAMA
scoring:
type: nuanced
- name: llama3.2
connection:
provider: ollama
type: OLLAMA
scoring:
type: jailbreakbench
aggregation: majority