multivon-eval bootstrap (covered in the bootstrap guide) is the user-facing CLI. Under it sit three primitives in multivon_eval.auto that you can call directly when you want fine-grained control or want to compose them into your own pipeline. Each one is documented and tested independently — you can use them in any combination.
auto_evaluators(case) — heuristic recommender
Pure pattern-match over an EvalCase shape. Returns a ranked list of recommended evaluators across primary / secondary / guardrail tiers, with a confidence rating per recommendation. Zero LLM cost. Microseconds.
Signature
task_type="auto"infers from case shape. Pin explicitly when the shape is ambiguous (e.g., a case with bothcontextandexpected_outputcould be RAG or fact-check).strict_mode=TrueraisesAmbiguousCaseShapeif the heuristic can only offer a low-confidence primary. Use this in CI / production code paths where a silent mis-recommendation is worse than failing loud.include_pii=True+pii_jurisdictionappendsPIIEvaluatoras a guardrail ("gdpr" | "ccpa" | "pipeda" | "hipaa" | "dpdp" | "all").include_safety=TrueappendsToxicity+Biasas guardrails.
EvaluatorRecommendation shape
suite.add_evaluators(...) after instantiation. The function never picks for you — it suggests.
generate_adversarial_cases(seed, mode, n) — LLM-generated stress cases
Synthesises cases targeting one of 10 named failure modes. Uses your configured judge (defaults to Claude Haiku) to write cases plausible enough to look real but designed to trip up a model on the specific weakness.
The 10 failure modes
Signature
tags = ["adversarial:<mode>"]metadata["target_failure_mode"]— the mode it was generated formetadata["stress_tests"]— the evaluators it’s designed to testmetadata["prompt_version"]— for reproducibility (the prompt template can evolve)metadata["judge_used"]— provider:model of the generator
Deterministic variant: generate_unicode_obfuscation_cases
Some attacks shouldn’t be LLM-generated — LLMs are aligned to NOT produce bypass attacks, so they tend to produce polished-looking but technically-easy attacks. For character-level obfuscation patterns (homoglyph, zero-width, RTL-override), use the deterministic generator:
validate_adversarial_cases(cases, baseline) — empirical hardness filter
Runs each generated case N times against a baseline model and evaluator, then filters fully measured cases by empirical failure rate. This measures behavior under that baseline and grader; it does not validate the task oracle. Complete hardness accounting ships in PyPI 0.19.0.
What this catches
Repeated shots give a coarse empirical failure rate; three shots do not establish statistical reliability. Results depend on both the baseline model and grader. Judge caching can reuse verdicts for identical outputs; disable it when measuring independent judge variation. The earlier +0.80 separation claim used an always-refuse baseline and a refusal shortcut that has since been removed from the grounding evaluators. It is not evidence for 0.17.0. Revalidate with task-appropriate good and bad outputs, including mixed refusals and unsupported factual claims.Signature
n_shots— how many times to sample baseline + evaluator per case. Default 3 gives a coarse empirical rate. The required sample count depends on the decision and observed variance.hardness_band—(min, max)failure-rate band. Cases outside the band are dropped from the kept list (but still returned in the full report). Default(0.5, 1.0)keeps cases the baseline fails at least half the time. Use(0.2, 0.8)for a discriminating-case filter that drops both too-easy and impossibly-hard cases.
HardnessReport shape
One report is returned per submitted case, including unavailable evaluators.
scores and baseline_outputs preserve shot positions with None for missing
measurements or outputs. shots retains statuses, reasons, errors and valid
verdict payloads; nonportable verdicts are retained as diagnostic text.
measured_shots counts actual quality measurements.
failure_rate and baseline_score are None unless all requested shots were
measured. baseline_failed is then None too; when complete, it means at least
half of the shots failed. Only fully measured cases can have
in_hardness_band=True. Baseline crashes no longer become zero scores or hard
examples, and evaluator crashes no longer disappear from reports.
Inspect every shot before interpreting a result. For transformation validity,
use the controlled robustness workflow separately.
Composing the primitives
Themultivon-eval bootstrap CLI is approximately:
- Add
auto_evaluators(case)recommendations to a manually-built suite - Run
generate_adversarial_caseson a different failure mode than your default - Validate any case set (not just generated ones) against your real baseline with N-shot aggregation
See also
- Bootstrap CLI guide — the one-command path that composes all three primitives + PII redaction + threshold calibration
- Generate eval cases — the higher-level
generate_from_file/generate_from_texthelpers, when you want generation without targeting a specific failure mode - Statistical rigor — why N-shot aggregation matters and how the hardness band relates to power
- Quickstart — the manual path

