Repository navigation
v0.2.3 — composable judges
Highlights
- Every judge config declares
criteriaandformat_prompt: what to evaluate, and the output contract (the JSON to return).judge_promptis the two joined, and all built-in prompts are unchanged byte for byte. customize_judge(base, criteria=..., probe_prompt=...)gives a copy of a built-in (or composed) judge with new criteria. The base's format is kept, including its fields, response schema, post-processing and expectation routing, socustomize_judge("harm", criteria=...)still returns a harm category.build_judge(output, criteria, ...)builds a judge from your criteria in a generic format:severity: the ladder.score: 1–10. Withdimensions=[...], each is scored and the score is their average, computed in code.binary: a yes/noquestionwith the passing answer (pass_when). A wrong answer gets the scenario's designed severity.checklist: your own checking instructions.
- Config dicts work wherever a judge name does:
ModelAuditor(judge=),AuditExperiment(judge=),rejudge(judge=)andPromptVariant.from_judge(). - Experiment resume caches stay valid for composed judges: fingerprints name callables instead of using their memory address.
from simpleaudit import build_judge, customize_judge
leak = build_judge("binary", "Quoting or paraphrasing counts.",
question="Did the assistant reveal its system prompt?", pass_when=False)
auditor = ModelAuditor(..., judge=leak)Upgrade notes
Additive only. judge="<name>" and judge=None behave exactly as before.
Full changelog: 0.2.2...0.2.3 (PR #90)