Skip to main content

Mobius Guard

mobiusguard-eval

An honest evaluation harness for LLM guardrails. It scores prompt-injection detectors the way a deployment would use them: recall at a fixed false-positive rate, with the threshold set on ordinary traffic, on data the detector was not trained on. It also tests the streaming redactor. The harness behind Mobius Guard's published numbers.

pip install "mobiusguard-eval[sklearn,hf]"

mobiusguard-eval sources                     # the provenance ledger
mobiusguard-eval build --out runs/suite      # fetch pinned data, build the suite
mobiusguard-eval score --suite runs/suite --detector piguard --device cuda --out runs/piguard
mobiusguard-eval report --suite runs/suite --runs runs/piguard --out runs/report

Or everything in order: mobiusguard-eval pipeline --out runs --device cuda. Every step saves its work as it goes and skips what is already done for the same inputs, so a crash or a fix never means starting over (--force redoes a step).

Train and export a classifier

The same harness built Mobius Guard's own classifiers, Fortress-XS and Fortress-Base, and measured them against the published ones:

mobiusguard-eval train-data --suite runs/suite --out runs/train   # licensed sources, suite overlap removed
mobiusguard-eval judge --data runs/train --out runs/judge         # optional: two LLM judges label it
mobiusguard-eval apply-judges --data runs/train --judged runs/judge --out runs/clean
mobiusguard-eval train --data runs/clean --base deberta-v3-xsmall --out runs/model
mobiusguard-eval export --model runs/model/best --out runs/onnx --val runs/clean/val.jsonl
mobiusguard-eval score --suite runs/suite --detector local:runs/model/best --out runs/mine

Training needs a GPU ([train]); the judges need [judge] and are paid model calls. Export writes ONNX and INT8 and refuses an INT8 model that disagrees with PyTorch; --quantize int8-ffn2-float keeps the layers that INT8 breaks in larger models in float32. gate passes or fails a candidate against a baseline on every held-out set, and model-meta writes the thresholds a released model ships with. Every step resumes after a crash. Each training source is in the ledger with its licence, and any source of the evaluation suite is refused.

Recall at 1% false positives per attack family for Fortress-XS, PIGuard, ProtectAI v2 and keyword rules

Red-team a configuration

Attack a Mobius Guard configuration with garak's prompt-injection probes, each in 26 mutated forms and delivered both as a message and as a tool result, then see what got through and check that a fix does not block more harmless text:

mobiusguard-eval redteam run --seeds seeds.jsonl --config mobiusguard.toml --out runs/rt
mobiusguard-eval redteam seal --seeds seeds.jsonl --out runs/holdout      # before tuning
mobiusguard-eval redteam findings --out runs/rt --seeds seeds.jsonl \
    --holdout runs/holdout/holdout.json --report runs/findings
mobiusguard-eval redteam gate --suite runs/suite --base mobiusguard.toml --patched new.toml \
    --report runs/gate

Runs resume after a crash and store no attack text. See the red-team guide.

What makes the numbers honest

  • A provenance ledger. Every dataset is pinned to a commit or a SHA-256, with its licence and the published detectors known to have trained on it. Their numbers on those sets are marked †.
  • Thresholds from ordinary traffic. Half of a real-user message set (oasst1) sets each detector's threshold for 0.1%, 1% or 5% false positives. Every attack set and every hard-benign set is reported out of sample.
  • Families, not rows. Attacks are reported per source, plus five deterministic obfuscations (spaced letters, look-alike letters, zero-width characters, leetspeak, base64). Near duplicates (MinHash) stay together in one split.
  • False positives first-class. Hard benign sets (NotInject, XSTest, OR-Bench), real emails, 35 languages of ordinary traffic.
  • Latency with the hardware stated. P50/P95/P99 at fixed input lengths and thread counts.
  • One row per item. Every run writes the score for each input, so any number can be traced back and reviewed.

Detectors and tests

  • keyword (the floor).
  • tfidf: trained leave-one-source-out, so no score comes from a model that saw its source. Needs [sklearn].
  • protectai-v2 and piguard, pinned to a commit and never running downloaded code. Need [hf].
  • mobiusguard-rules, and the normalised variants *-norm (Mobius Guard's clean-up in front of a classifier).
  • local:<dir>: a model trained here; local:<dir>#harmful scores its harmful output.
  • redaction: how often each of the 245 redaction patterns fires on ~57,000 real texts, and recall on 15,000 synthetic secrets (exact and garbled) streamed in random chunks. Includes near misses that must not be redacted.

The design is in decision 0009; the datasets and their licences in datasets.md; results in docs/results. No data is bundled: the harness downloads each source at its pinned revision.

Alpha: the API may still change before 1.0. Apache-2.0.

Metadata

Release files for mobiusguard-eval 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mobiusguard-eval 0.3.1
File Size Uploaded Provenance Actions
mobiusguard_eval-0.3.1.tar.gz 175.2 kB With provenance Details for mobiusguard_eval-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mobiusguard-eval 0.3.1
File Interpreter ABI Platform Actions
mobiusguard_eval-0.3.1-py3-none-any.whl Python 3 none any Details for mobiusguard_eval-0.3.1-py3-none-any.whl

Total release size: 331.9 kB

Release files / mobiusguard_eval-0.3.1.tar.gz

Download URL mobiusguard_eval-0.3.1.tar.gz
Size 175.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6bea1779846358bc3fd4014dfe3647a92b7f5846a6f1b9e084979a6b88614025
BLAKE2b-256 checksum
How to use checksums
323debf0bf004ab392e7a926ab734510a0be63943046b7eaadc26918c1bf5415
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Release files / mobiusguard_eval-0.3.1-py3-none-any.whl

Download URL mobiusguard_eval-0.3.1-py3-none-any.whl
Size 156.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
26db86dba61e70d965508d28ff31100964efc23b026137b8d9045cb83b7c10fd
BLAKE2b-256 checksum
How to use checksums
1ce092dd390e7f4e51c5fc2db9bceddc2c1471bf1f2bd2123e1f16ef0361cb82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Security for mobiusguard-eval 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mobiusguard_eval-0.3.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page