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
Then, from another terminal, one question over HTTP:
curl -s http://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?"}}}'
{"model":"system-zero","answers":{"spam":{"type":"noul","noul":0.9059390425448562}},"usage":{"input_tokens":10,"output_tokens":0}}
Python 3.9 or newer. The package installs the command sr-zero, also available as system-zero, and the Python
package system_zero. Every process loads all the rule tables before its first answer: 8.5 to 21 seconds and 1.2 to
1.4 GB of memory in our tests, depending on the Python version (the newer, the faster). sr-zero serve loads them
once and keeps them loaded, so for more than a few questions, run it or pass a file of requests with -j. A compact
rules format that loads lazily is planned for a later release.
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 |
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.mdand 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 itLicenseRef-System-Zero-Rule-Tables. - Check
DATA_SOURCES.mdbefore commercial use. It is in the sdist, andNOTICEandDATA_SOURCES.mdare installed with the package in its.dist-info/licenses/directory.
Metadata
Release files for sr-zero 0.9.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sr_zero-0.9.1.tar.gz | 2.5 MB | Without provenance | Details for sr_zero-0.9.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sr_zero-0.9.1-py3-none-any.whl | Python 3 | none | any | Details for sr_zero-0.9.1-py3-none-any.whl |
Total release size: 5.2 MB
Release files / sr_zero-0.9.1.tar.gz
| Download URL | sr_zero-0.9.1.tar.gz |
|---|---|
| Size | 2.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2b2b28242fbc908bc6937556b66f3b0107960bca5efe9bd6742fa1e8d8ab8936
|
|
BLAKE2b-256 checksum How to use checksums |
c339270ce626fbb95170a27d2edbd998b8836dad8d87a5d6fef5f93dd0ea1d8f
|
| 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.1-py3-none-any.whl
| Download URL | sr_zero-0.9.1-py3-none-any.whl |
|---|---|
| Size | 2.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e199ae431cf9e787dea88d67908aab959c114bf3aef97887b573665b35e0470c
|
|
BLAKE2b-256 checksum How to use checksums |
ab05381caa97cee620cfeaf2409085d54fdb3b1a456fde2e3aaceeaeb0f0f1a0
|
| 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.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.
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.