In front of your model
Routine decisions in under a millisecond with a receipt; the rest goes to your neural model.
The reflex layer for AI decisions
Every answer has a receipt. Readable. Editable. 0 parameters.
One request, three systems
Oh great, my flight got cancelled again. Truly the best way to start a holiday.
Is this text intended to be sarcastic?
yes 0.900 84 µs
bag of words: 1,898 of 1,997 right
change it: edit frames.py:22046
an answer 37 ms
a probability, and no reason
change it: retrain
an answer seconds
after a page of reasoning
change it: prompt or retrain
01Why System Zero
Psychology describes two systems of thought: System 1, fast, intuitive and automatic, and System 2, slow, deliberate and effortful. Automated decisions have both: neural decision models answer in tens of milliseconds, large reasoning models deliberate for seconds. Most systems have nothing below them, so every routine decision still goes up to a neural network.
System Zero is the missing layer: decisions as explicit rules and programs, readable and reviewable as code, served on a CPU in about 0.3 ms a decision, and calibrated in distribution, so that when it is not sure it passes the decision up.
answers after deliberating
answers with a probability
answers with its rule, record and file:line
Our mission: compile what System One and System Two know about recurring decisions into System
Zero. Release 0.11 counts its rules over public datasets and our own decision data, with hand-written modules
for what can be computed. In our distillation study, a System Zero student was compiled from a large decision
model's decisions. Deferring to your own model is built in, with --defer-to; distilling it into a
Zero pack is planned.
| Property | System Two | System One | System Zero |
|---|---|---|---|
| Speed | seconds per decision | tens of milliseconds | about 0.3 ms |
| Runs on | GPUs | a GPU | one CPU core |
| Shows you | its steps, as text | a probability | a rule, its record, its file and line |
| To change a decision | prompt it or train it | retrain it | edit a rule, as a reviewed diff |
| Suited to | hard cases that need deliberation | language and world knowledge | routine decisions whose evidence is in the input |
Zero thinking time. Zero opacity. Zero GPUs.
For routine decisions whose evidence is in the input. Language- and knowledge-heavy decisions go up.
02What it is
0 parameters: no learned weights; the rules are counted data you can read. It answers typed decision questions (pick one of many options, yes or no, or a score) with a probability for every option, through a standard decision API.
ast.literal_eval: loading them runs nothing.03Pillar I
A rule behind every answer, a record behind every rule, and a “not sure” when a record is weak.
Exact removal, byte for byte: in sr-zero 0.11.0,
pack unlearn takes a source out of a Zero pack, and the rebuilt rules file is the one a compile
of the remaining rows gives, byte for byte (Build your own Zero, step 08).
Exact removal by subtraction: on the 0.9 build of the official rules, removing a source's counts gives rule files byte-identical to a rebuild without it, 5 of 5 files in both trials; for one public training fold, 18 s against 660 s for the rebuild (wall-clock, on a shared machine).
Exact source removal on three example decisions of release 0.11.0: relearned from every source, the rules match the shipped ones exactly; without its one source, the comment-spam answer flips, and without its largest, the sarcasm answer holds with another rule.
Calibration: expected calibration error 2.8% on 50,443 held-out dev questions, in distribution; on Decision Bench's new domains it is 5.1%, and a confident answer there can still be wrong.
Where the points come from: of release 0.11.0's 27.60 public-index points, hand-written modules earn 13.52 (49%; tools alone 5.98) and counted word statistics 13.89 (50%; bags of words 8.46), and the prior or chance 0.18.
Demo · a decision, traced
Precomputed with release 0.11.0 on the site's own example requests: every proposer's offer, the one trusted most, and the rule in its file. Nothing here calls a model.
Requests
03Pillar I · how it works
A request is read once: the words and word pairs of the state and the question, how the parts of a JSON state relate, the option set by its names, and parsers for code, puzzles, dialogues, scenes, verse and music. Seven proposers then answer from their records, and the proposal trusted most answers. Its trust is the Wilson lower bound of its record, right over fired.
An interpreter, puzzle solvers, tool planning, BM25 ranking, checks for personal data and more.
For known option sets, over 854 option sets and 1,962 frames, 912 of them one whole question asked often: the first rule that fires decides.
For many answers: every cue that counts for one adds up.
For answers told apart by many words at once, such as intents, topics and tone: naive Bayes from counts.
For questions in two parts, such as a claim and its evidence: the answer counted for parts that relate as these do.
For options never seen, over 2,144 templates: overlap, verbatim, longest and more.
The most frequent answer, else every option alike, and the explanation says so.
Scroll sideways to see the whole figure.
Scroll sideways to see the whole figure.
Demo · calibration from records
Each rule stores how often it fired on the training split and how often it was right. Its probability is the lower end of the 95% interval around that rate (Wilson): the share a rule picked on a few questions still reaches on new ones. Fewer cases, less trust. Below the floor, here even odds for a yes/no question, the answer is “not sure”.
No fitted temperature: the counts are the calibration. An answer reaches 0.9 only on a record that three or more families of training questions back. On 50,443 held-out dev questions the expected calibration error is 2.8%.
Wilson explainer
Scroll sideways to see the whole figure.
Remove a source · release 0.11.0
Demo · attribution
Every count behind an answer adds up over the training questions it came from, so it splits by the source each question came from: a rule's record, or how often a word came with each answer. Remove a source, relearn the rules it fed from the counts that remain, and decide again: the same answer a full rebuild without it would give. Relearned from every source, the rules these three questions read match the shipped ones exactly, and so does every answer.
Sources are the data pools of the training questions, numbered here. Measured with release 0.11.0's own learner on its private training records; nothing here is recomputed in the browser.
Scroll sideways to see the whole figure.
Choose your threshold · the tutorial's 180 dev tickets
The example pack from Build your own Zero, on 180 dev tickets it never learned from. At 0.625,
the threshold sr-zero pack test --dev prints for it when the answers kept must be right at a
75% lower bound, System Zero answers a third of the tickets on its own, 89% right, and the rest go to your
model. This small example pack is never surer than 0.63, so above that it hands every ticket to your
model.
04Pillar II
Put System Zero in front of your neural model, or of any System One endpoint. It keeps the decisions it is sure of, each with a receipt, in under a millisecond, and sends the rest to your model.
A question stays with System Zero when a pack's override decided it, or a rule answered it at or above the
threshold; an answer resting on a prior or on chance always goes. Pick the threshold on your own data:
sr-zero pack test PACK --dev DATA --seal recommends one and seals it into the pack, and
--threshold T sets one by hand. If your model fails or times out, System Zero keeps its own
answer, marked, and the request still succeeds.
Built in: --defer-to
Your model is any System One endpoint. Here a second System Zero, serving decision lists compiled from the same tickets, stands in for it on port 8001. Serve your pack in front of it:
sr-zero serve --pack support --defer-to http://127.0.0.1:8001 --threshold 0.625 --port 8765System Zero 0.11.0: loading the rules ...packs: support 0.1.0defer: questions not kept here (threshold 0.625, from --threshold) go to http://127.0.0.1:8001/v1/systemoneSystem Zero is listening on http://127.0.0.1:8765 (POST /v1/systemone)
From another terminal, a ticket the pack is unsure of
curl -s localhost:8765/v1/systemone -H 'content-type: application/json' -d '{"state": "The login page keeps spinning and never loads", "questions": {"team": {"type": "choice", "instructions": "Which team should handle this ticket?", "criteria": {"account": "account", "billing": "billing", "returns": "returns", "sales": "sales", "shipping": "shipping", "technical": "technical"}}, "urgent": {"type": "noul", "instructions": "Is this ticket urgent?"}}}'{"model":"system-zero","answers":{"team":{"type":"choice","choice":"technical","confidence":0.8401642072561855,"probabilities":{"account":0.02663929879063576,"billing":0.02663929879063576,"returns":0.02663929879063576,"sales":0.02663929879063576,"shipping":0.02663929879063576,"technical":0.8668035060468212}},"urgent":{"type":"noul","noul":0.4868865548799214}},"usage":{"input_tokens":30,"output_tokens":0}}
Both questions went to your model, which answers technical at 0.87: the pack alone would have said
account at 0.45, below 0.625, and the urgent question rests on a prior. /api/decide gives the
receipt: deferred: the top probability here, 0.447, is below the threshold 0.625
, with the pack's own
answer and its line. A ticket the pack is sure of, such as I was charged twice for my plan this month
(billing at 0.63), is answered here and sends nothing.
Or in your own code, with the API's probabilities
"""Ask System Zero, and send what it is not sure of to your model: the caller-side cascade.
python caller.py 'The login page keeps spinning and never loads'
ZERO is `sr-zero serve --pack support --port 8765`; MODEL is your model's System One endpoint.
Standard library, no dependencies.
"""
import json
import sys
import urllib.request
ZERO = "http://localhost:8765/v1/systemone"
MODEL = "http://localhost:8001/v1/systemone"
THRESHOLD = 0.625 # what `pack test --dev` prints, safe to copy: it keeps the answers the sealed one keeps
TEAMS = ["account", "billing", "returns", "sales", "shipping", "technical"]
QUESTIONS = {
"team": {"type": "choice", "instructions": "Which team should handle this ticket?",
"criteria": {team: team for team in TEAMS}},
"urgent": {"type": "noul", "instructions": "Is this ticket urgent?"},
}
def ask(url, state, questions):
body = json.dumps({"state": state, "questions": questions}).encode()
request = urllib.request.Request(url, body, {"Content-Type": "application/json"})
with urllib.request.urlopen(request, timeout=10) as reply:
return json.load(reply)["answers"]
def top(answer):
"""The probability of the answer's top option."""
if answer["type"] == "noul":
return max(answer["noul"], 1 - answer["noul"])
return max(answer["probabilities"].values())
def decide(state, questions):
answers = ask(ZERO, state, questions)
unsure = {key: questions[key] for key, answer in answers.items() if top(answer) < THRESHOLD}
if unsure:
try:
answers.update(ask(MODEL, state, unsure))
except OSError as error:
print(f"your model did not answer ({error}); keeping System Zero's answers", file=sys.stderr)
return answers, sorted(unsure)
if __name__ == "__main__":
answers, sent = decide(sys.argv[1], QUESTIONS)
print(json.dumps({"sent to your model": sent, "answers": answers}, indent=2))
It prints, with sr-zero serve --pack support --port 8765 and your model on port 8001
python3 caller.py 'I was charged twice for my plan this month'{ "sent to your model": [ "urgent" ], "answers": { "team": { "type": "choice", "choice": "billing",…
Python 3.9 or newer, standard library only. The threshold is the one pack test
printed, which keeps the answers the sealed threshold keeps. The built-in path differs in two ways: it also sends
answers that rest on a prior alone, which /v1/systemone does not show a caller, and it marks an
answer it keeps after a failure.
05Pillar III
Learning beyond gradients: a decision is a rule or a module, written as code. You or your coding agent propose one; counted records on held-out data, the tests and the leak screen decide what is accepted.
Every accepted change is a reviewable diff with its records before and after, and every answer can be blamed to a commit.
Ten releases as commits: every rule file is a reviewable Python literal, and every answer names its file and line.
Blame to a commit: in release 0.11.0 the comment-spam
example's rule is system_zero/rules/options.py:2324, and git blame still names 66c2eb7, release
0.1.
Open-domain language understanding and world knowledge stay with neural models; send those decisions to one.
Demo · decisions across releases
Each release is a commit. Pick a request to see what each release answered, which proposer answered, and what changed.
Requests
Write a rule or a module as code, yourself or with your coding agent.
It needs a counted record that beats the default, on held-out dev data as well.
The tests and the leak screen gate every change.
The change is a diff, with its records before and after, reviewed like any code.
After the merge, every answer names its file and line, and git blame names the commit.
06Results
Where it can run the code or solve the puzzle, System Zero is near perfect: 97.5 on CRUXEval, above the best of the board's 1.2–4.7B entrants (95.8). Tool calls and intents come next: 88.8 on BFCL, 83.9 on BANKING77, 82.1 on CLINC150. Across the 37 benchmarks of the public Decision Index it scores 27.60, on one CPU core: about 0.3 ms a decision, where neural decision models take tens of milliseconds on GPUs.
Chance-corrected skill, where 0 is chance: release 0.11.0 on the public Decision Index.
at the median with sr-zero serve, 0.6 ms p95; neural decision models take tens of milliseconds on GPUs
one question in a fresh process, 0.25 to 0.5 s at 35 to 38 MB
for reference, neural decision models on the same board: 0.6B 28.82 · 0.8B 36.93 · 2B 42.22 · 4B 54.90
of 1,071 decisions right, against 28.0% by chance
477,291 counted rules, every one with its record
Release 0.11.0 on public benchmarks, published as sr-zero 0.11.0. Timings measured with sr-zero 0.11.0.
Decision Index public index, chance-corrected. Decision Bench: 32.7% in 0.1, 44.2% in 0.3, 48.1% from 0.4, 48.4% in 0.9 and 46.6% in 0.11 (chance 28.0%; 4B decision models 83.1 to 86.0%). Dashed lines: neural decision models on the same board, for reference.
| Model | Public index | Outside language | Median |
|---|
Our neural models by size, from the live board (Decision Index 0.4.1, public data of 21 November 2026): latency on GPUs. System Zero: one CPU core.
Chance-corrected skill per area of the public index (0 is chance).
About half of release 0.11.0's 27.60 points come from hand-written modules (13.52) and half from counted word statistics (13.89, of which bags of words earn 8.46); the prior or chance adds 0.18. A benchmark's points split by how far each kind of answer beats chance (exact for accuracy, approximate for F1, case-exact and ranking metrics). Right on dev: in distribution, on the held-out dev split.
Strongest where it can compute the answer: above the median of the board's 1.2–4.7B entrants on CRUXEval, POP909, PhishNChips, BBH, ChessBench and HLE. In 0.11.0 ToolRet rose from 26.1 to 36.2 and BRIGHT from 10.2 to 19.8, with one ranker for every candidate; HoVer from 19.7 to 27.4, with relation tables; and BANKING77 from 76.1 to 83.9, When2Call from 42.6 to 51.7 and CLINC150 from 76.7 to 82.1.
| Expected calibration error, 50,443 held-out dev questions | 2.8% |
| Decision Bench, 1,071 decisions (chance 28.0%) | 46.6% right |
| Decision Bench calibration error | 5.1% |
| A question with sr-zero serve, one CPU core: median; p95 | 0.3 ms; 0.6 ms |
| One question in a fresh process: time; memory | 0.25–0.5 s; 35–38 MB |
| sr-zero serve: every rule loaded; peak memory | about 3 s; 410–460 MB |
| The Decision Index harness: median; p95 | 0.6 ms; 6.2 ms |
07Method
Results come from public benchmarks, each scored by its own scorer, and calibration from a held-out dev split that the rules never learn from. The training data is decontaminated against the evaluation sets, and a leak screen checks every shipped string, this site's text included, against them. The requests on this site are our own examples, never benchmark items. System Zero calls no model when it answers.
08Roadmap
Planned capabilities, without dates.
Compile the routine decisions of your own neural model into a Zero pack, served in front of it.
Your own modules, for answers that can be computed, served beside the rules.
Share a pack, with its records and tests, and install someone else's.
System Zero for the semantic router's own decisions: the routine ones on a CPU, the rest passed on.
09Scenarios
Wherever routine decisions arrive in volume and their evidence is in the request: answer them on a CPU, each with its receipt, and send the rest on.
Routine decisions in under a millisecond with a receipt; the rest goes to your neural model.
Fast, readable signals for an LLM router, such as an intent, a tool choice or a policy check.
Every answer names its rule, its record and its file and line.
Your labelled examples become your own rules, and a data source can be removed exactly.
Code, logic and tool calls, answered by modules that compute them.
Pure Python, no dependencies, no GPU, and nothing leaves the machine.
Not for open-domain language and world knowledge; keep those with a neural model.
10Get started On PyPI
System Zero is on PyPI as sr-zero. One command answers a question; a server keeps the rules loaded.
On the command line every answer prints its rule, its record and its file and line;
sr-zero serve answers the standard decision API on a local port.
Install with your agent
Set up System Zero by following https://system-zero.semantic-router.org/llms.txt
Add the System Zero skill to your agent
Install the System Zero agent skill from https://system-zero.semantic-router.org/skill/SKILL.md
The code is Apache-2.0. The rule tables in system_zero/rules/ are counted from
the datasets and data pools listed in DATA_SOURCES.md, whose licences are mixed, including
non-commercial, share-alike, research-only and unknown ones; their licence,
LicenseRef-System-Zero-Rule-Tables, is described in NOTICE. Check
DATA_SOURCES.md before commercial use; both files are installed with the package.
11Build your own Zero
A Zero pack is your own rules, counted from your labelled examples and served in front of the official rules. Every answer from a pack names the line of the rule that decided it, its record, and how many of its counts came from each of your sources.
A question
The example: 600 synthetic support tickets for six teams, written from templates, and 180 dev tickets from templates the training tickets never use. sr-zero 0.11.0.
01Get the example tickets
curl -fsSLO https://system-zero.semantic-router.org/examples/support-intents/tickets.csvcurl -fsSLO https://system-zero.semantic-router.org/examples/support-intents/dev.csvhead -3 tickets.csvtext,label,source,groupIs there a plan for nonprofits? Thank you!,sales,web,sales-13Can I get a copy of my invoice for January? Thanks.,billing,email,billing-04
Synthetic tickets, written from templates for this example, and free to reuse under Apache-2.0, like the code: tickets.csv and dev.csv. Or bring your own CSV.
02Start a pack
sr-zero pack init support --question 'Which team should handle this ticket?'created support/: manifest.json, overrides.jsonl (rules you write), tests.jsonl (their examples and your decision tests)
03Count your examples
sr-zero pack compile tickets.csv -o support --licence Apache-2.0read 600 rows from 1 file(s); skipped 0 without a usable label account, billing, returns, sales, shipping, technical (under any question template): 600 training questions, evidence sums and a decision list: 45 rules, 1134 evidence cuessources (questions, licence class): email 300 (P), web 300 (P)
A CSV needs text and label columns; source keeps the counts by source, so a source can be removed exactly, and group keeps near-duplicates together when the compiler holds questions out. System One JSON lines compile the same way.
04Test it against a gate
sr-zero pack test support --dev dev.csv… accuracy 51.7% (the official rules alone: 20.6%)…gate: passed (180 questions the pack answers: pack 51.7%, official alone 20.6%; 56 won, 0 lost, sign test p < 0.0001)
On the dev tickets, the pack is right where the official rules are wrong 56 times, and never the reverse.
05Read an answer's receipt
sr-zero pack explain support 'I was charged twice for my plan this month'> billing 0.63 ###############…why: the answer the request's words count for most (12 of its cues: "i was", "month", "was charged") (132 of 190 right in training) support/rules.jsonl:454 · 374 µs · 0 parameters by source: email 64 of 98, web 68 of 92
The rule's line, its record, and how many of its counts came from each source.
06Write a policy as one line
support/overrides.jsonl{"id": "chargebacks", "when": {"any": ["chargeback", "disputed the charge"]}, "answer": "billing", "note": "Payment disputes go to billing, whatever else the ticket says."}support/tests.jsonl{"rule": "chargebacks", "state": "My bank shows a chargeback from you.", "fires": true}{"rule": "chargebacks", "state": "I disputed the charge with my card company.", "fires": true}{"rule": "chargebacks", "state": "Can I charge my phone with the dock?", "fires": false}{"state": "I was charged twice for my plan this month", "expect": "billing"}sr-zero pack test support --seal…overrides: 1 rule(s), 3 example(s), all as they should bedecision tests: 1 of 1 passsealed: manifest.json records the hashes of the files that passed
The examples a rule must fire on, or leave alone, and your decision tests go in tests.jsonl; the pack refuses to load when an example does not hold.
07Serve it in front of the official rules
sr-zero serve --pack support --port 8000System Zero 0.11.0: loading the rules ...packs: support 0.1.0System Zero is listening on http://127.0.0.1:8000 (POST /v1/systemone)
The served pack answers its own question, and the official rules answer every other question as they would without it.
08Forget a source, exactly
sr-zero pack unlearn support --source email tickets.csv -o support-webremoved 300 rows of email; rebuilt support-web from 300 rows: 1121 rule lines gone, 839 new or changedits rules.jsonl is the one a compile of the remaining rows gives, byte for byte; manifest.json records the removal
unlearn rebuilds the pack from the remaining sources with the recorded settings; overrides and tests come along.
Small packs are weak when one intent comes in many phrasings: the tutorial pack is right on 51.7% of its dev tickets, against 20.6% for the official rules alone.
Serve it where it is sure: a third of the dev tickets get
a probability of 0.5 or more, and those are right 88.5% of the time. Serve the pack for them, and send the
rest to your model with --defer-to, as in In front of your model.