Skip to main content

System Zero

A decision model with no learned weights, published as sr-zero. System Zero answers the typed decision questions of the System One API (a choice of 2 to 255 options, a yes/no, a score on ordered levels) with a probability for every option. The answers come from rules counted over training decisions, kept as Python literals you can read, and from hand-written modules for what can be computed. Every answer names its rule, the rule's record in training, and its file and line, or says that no rule applied. The probability is the lower end of that record's 95% interval, so a weak record says "not sure", and a caller can send the decision up to a neural model.

Pure Python standard library, no dependencies, one CPU core, deterministic. The full story, with interactive demos: system-zero.semantic-router.org.

Licence, in short: the code is Apache-2.0. The rule tables are statistics counted from datasets with mixed licences, some of them non-commercial, share-alike, research-only or unknown, and from labels generated by models; their licence is under review. Check DATA_SOURCES.md, installed with the package, before commercial use.

Install

uvx sr-zero "Check out my channel and subscribe!" -q "Is this comment spam?" --yes-no
uv tool install sr-zero        # or: pip install sr-zero
sr-zero serve --port 8000

Python 3.9 or newer. The package installs the command sr-zero, also available as system-zero, and the Python package system_zero. Each process loads the rule tables once, which took 10 to 17 seconds and about 1.5 GB of memory in our tests, so for more than a few questions, run sr-zero serve or pass a file with -j.

From the command line

Command What it does
sr-zero STATE -q QUESTION -o A B C one choice, with the rule behind it
sr-zero STATE -q QUESTION --yes-no a yes/no probability
sr-zero STATE -q QUESTION --levels LOW MID HIGH a score on ordered levels
sr-zero -j requests.jsonl -e {state, questions} per line in, one answer per line out, with explanations
sr-zero serve --host HOST --port PORT the System One API over HTTP

From Python

With System One's request: a state and named questions.

from system_zero import decide

decide("Our production app has returned 500 errors since the 09:00 deploy. Customers cannot check out.",
       {"team": {"type": "choice", "instructions": "Which team should handle this ticket?",
                 "criteria": {"billing": "Payments, invoices and refunds",
                              "engineering": "Outages, errors and bugs",
                              "sales": "Plans, pricing and contracts"}},
        "urgent": {"type": "noul", "instructions": "Does the user report a problem that blocks them?"}},
       explain=True)

The System One API

sr-zero serve answers the System One API as the published standard, systemone/0.2, and its vllm-sr/5.0 extensions define it, so System One clients work unchanged.

Endpoint Does
POST /v1/systemone one request; a question that cannot be answered fails it with question_failed
POST /v1/systemone/batch named requests in one call, each answered as it would be alone
POST /v1/decisions the native form: a failed question carries its own error in a 200
GET /v1/models, GET /health the model and its card, and readiness
Question You write The answer
choice criteria: 2 to 255 options, each a key and a description choice, confidence and every option's probabilities
noul instructions; optionally criteria.true and criteria.false noul: P(yes)
score criteria: 2 to 10 levels, lowest first score (the expected level), confidence, legend and each level's probabilities
curl -s localhost:8000/v1/systemone -H 'Content-Type: application/json' \
    -d '{"state": "Check out my channel and subscribe!", "questions": {"spam": {"type": "noul", "instructions": "Is this comment spam?"}}}'

Errors are the standard's. System Zero reads text: box questions and images are refused. Set SYSTEM_ZERO_API_KEYS to require an API key on the /v1/ paths.

Results

Public-benchmark results of the full 0.9.0 build, the one this package ships, each run with its benchmark's own scorer on one CPU core.

Measure System Zero 0.9.0 For reference
Decision Index, public index (37 benchmarks, chance-corrected) 25.6
Decision Index, public, outside language understanding (28 benchmarks, index points) 23.44
Decision Bench, bench-v4 (1,071 decisions, accuracy) 48.4% chance 28.0%
Held-out test (49,674 questions, accuracy) 57.16%, calibration error 2.2% majority answer 39.6%; uniform 33.8%
Latency, one CPU core 1.1 ms median, 13.1 ms p95

These are public-index and largely in-distribution numbers: stand-ins and train splits for many of the task formats are in the training data, so private tests may show less.

Limits

  • Language understanding and world knowledge stay with neural models. Words alone do not carry those answers, and System Zero says so with a low probability, so the decision can go up.
  • Under distribution shift, some families of decisions are confidently wrong.
  • Its modules are written for English text, so other languages lean on the counted rules.
  • Part of the training labels were generated by models, and the rules reflect their data.
  • Not for decisions about people or other high-stakes uses without review.

Licence

  • The code is licensed under the Apache License 2.0 (LICENSE).
  • The rule tables are derived from the datasets listed in DATA_SOURCES.md and from labels generated by models. 37.6% of the 995,023 training questions come from sources flagged there: non-commercial, share-alike, of unknown licence, or written by a model or a machine. Their licence is under review; the package metadata names it LicenseRef-System-Zero-Rule-Tables.
  • Check DATA_SOURCES.md before commercial use. It is in the sdist, and NOTICE and DATA_SOURCES.md are installed with the package in its .dist-info/licenses/ directory.

Metadata

Release files for sr-zero 0.9.0

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

Source distribution (sdist)

Source distribution for sr-zero 0.9.0
File Size Uploaded Provenance Actions
sr_zero-0.9.0.tar.gz 2.5 MB Without provenance Details for sr_zero-0.9.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sr-zero 0.9.0
File Interpreter ABI Platform Actions
sr_zero-0.9.0-py3-none-any.whl Python 3 none any Details for sr_zero-0.9.0-py3-none-any.whl

Total release size: 5.2 MB

Release files / sr_zero-0.9.0.tar.gz

Download URL sr_zero-0.9.0.tar.gz
Size 2.5 MB
Tags Source
SHA-256 checksum
How to use checksums
3410049ad1da146a489bd8e4298802922c45981d5c9486ed2b63e61d542d7579
BLAKE2b-256 checksum
How to use checksums
9d86a178ee832e3ec14e0cf3f9fdf6ab6ee09eddd3d185dfb3a6e42bf5d14148
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / sr_zero-0.9.0-py3-none-any.whl

Download URL sr_zero-0.9.0-py3-none-any.whl
Size 2.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
f3abee8582831efa8f0a657209dbd6ebdd94a9299ecfbc17623a55857f6c80a9
BLAKE2b-256 checksum
How to use checksums
a106fc582b32f142291edeaaacb1a87b0098c1a60fba83f82d2161921cc0e3e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for sr-zero 0.9.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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