SYSTEM ZERO sr-zero on PyPI

The reflex layer for AI decisions

System Zero Thinking, fast and slow — and zero.

Every answer has a receipt. Readable. Editable. 0 parameters.

A decision, one CPU core
~0.3 ms
Cold start
<0.5 s · 36 MB
Counted rules
477,291
Every answer names
file:line
When it is not sure
it defers

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?

System Zeroreflex · 1 CPU core

yes 0.900 84 µs

bag of words: 1,898 of 1,997 right

change it: edit frames.py:22046

System Oneintuition · GPU

an answer 37 ms

a probability, and no reason

change it: retrain

System Twodeliberation · GPUs

an answer seconds

after a page of reasoning

change it: prompt or retrain

Schematic, on a log time axis. System Zero: this request’s own time on one CPU core, the median of 41 runs at build time. System One: our 0.8B decision model’s median on the board, on a GPU. System Two: a reasoning model, seconds.

01Why System Zero

Two systems think.
The third answers by reflex.

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.

System Twodeliberate · seconds · GPU

answers after deliberating

hard → defer
System Oneintuitive · tens of ms · GPU · opaque

answers with a probability

not sure → defer
System Zeroreflex · ~0.3 ms · CPU · readable rules

answers with its rule, record and file:line

requests enter here ↑
Schematic. Requests enter at System Zero; most are answered there, a few rise to System One, and rarely one reaches System Two. The share each tier answers depends on the traffic. The compile flow down the side is the direction we are building toward.

Knowledge flows down

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.

The three systems compared
PropertySystem TwoSystem OneSystem Zero
Speedseconds per decisiontens of millisecondsabout 0.3 ms
Runs onGPUsa GPUone CPU core
Shows youits steps, as texta probabilitya rule, its record, its file and line
To change a decisionprompt it or train itretrain itedit a rule, as a reviewed diff
Suited tohard cases that need deliberationlanguage and world knowledgeroutine 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

A decision model with 0 parameters

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.

  • pick one of 2 to 255 options
  • yes or no as P(yes)
  • score on ordered levels
Rules
477,291counted from 995,023 training questions: decision lists, evidence sums, bags of words, relation tables and context cues, each with its record.
Modules
36 casesof hand-written modules for what can be computed: an AST interpreter, puzzle solvers, scene readers, rhyme and meter, chord templates, tool planning, BM25 ranking and checks for personal data.
Runtime
~0.3 msa decision on one CPU core, once loaded; one question in a fresh process takes 0.25 to 0.5 s at 35 to 38 MB. Pure Python, no dependencies, deterministic.
Explanation
file:lineEvery answer names its rule, with its file, line and training record, or says that no rule applied.
Probability
Wilsonthe lower bound of each rule's record, at 95%: no fitted temperature, “not sure” when the record is weak, and 0.9 or more only on a record that three or more families of training questions back.
Parameters
0Rule files are Python literals, read with ast.literal_eval: loading them runs nothing.

03Pillar I

Auditable decisions

A rule behind every answer, a record behind every rule, and a “not sure” when a record is weak.

  • TraceableA rule behind every answer; per-source counts that add up behind every rule.
  • EditableFix a decision with a reviewable diff, tested like any code.
  • CalibratedIn distribution: probabilities from records, and “not sure” when a record is weak.
  • FastAbout 0.3 ms a decision, on one CPU core.

Evidence for pillar I

  • Verified

    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).

  • Verified

    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).

  • Verified

    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.

  • Measured

    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.

  • Measured

    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

Pick a request, and follow it from its cues to its line of code

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

    Read once, propose seven ways, answer by trust

    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.

    • 1Modules36 counted cases

      An interpreter, puzzle solvers, tool planning, BM25 ranking, checks for personal data and more.

    • 2Decision lists38,376 rules

      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.

    • 3Evidence sums63,422 cues

      For many answers: every cue that counts for one adds up.

    • 4Bags of words366,936 features

      For answers told apart by many words at once, such as intents, topics and tone: naive Bayes from counts.

    • 5Relation tables802 cells

      For questions in two parts, such as a claim and its evidence: the answer counted for parts that relate as these do.

    • 6Context cues8,521 cues

      For options never seen, over 2,144 templates: overlap, verbatim, longest and more.

    • 7Prior, then uniformwhen no rule fires

      The most frequent answer, else every option alike, and the explanation says so.

    Scroll sideways to see the whole figure.

    How System Zero answers, release 0.11.0, 477,291 counted rules. A request, a state and typed questions (choice, yes/no or score), is read once: words and word pairs of the state and question, how the parts of a JSON state relate, the option set known by its names, and parsers for code, puzzles, dialogues, scenes, verse and music. Seven proposers, each trusted by its training record: modules (9 modules, 36 cases: an interpreter, puzzle solvers, tool planning, BM25 and more), decision lists (38,376 rules over 1,962 frames and 854 option sets: the first rule that fires decides), evidence sums (63,422 cues: each cue that counts for one answer adds up), bags of words (366,936 features: naive Bayes from counts, for intents, topics and tone), relation tables (802 cells: answers counted by cell, for a claim and its evidence), context cues (8,521 cues over 2,144 templates, for options never seen), and the prior then uniform when no rule fires. The proposal trusted most answers; trust is the Wilson lower bound of its record, right over fired, at 95%. The answer is a probability for every option, plus the rule, its record and file:line.
    Release 0.11.0: 477,291 counted rules in all. Rule files are Python literals; modules are hand-written code, trusted by their own counted records.
    The modules and their 36 counted cases

    Scroll sideways to see the whole figure.

    The modules that answer in release 0.11.0 and the training record of each of their 36 cases. run: computed, 11,598 of 11,598. music: chord template 2,758 of 3,589, no chord 417 of 417. puzzles: order, free time, liars, adjectives, swaps, route, boolean. scenes: objects, figure. verse: meter 1,578 of 1,878, rhyme 1,246 of 1,309. tools: next request, call grounded, no fitting tool, candidate misfits, ask for missing, candidate fits, sole tool fits, request fits no tool, logs in, no tool fits, sole tool misfit. match: the query ranks from first to eleventh and below, no match, describes state, describes state far and describes state clear. pii: contact 3 of 5, checked number 1 of 1. A lime bar under each case shows its trust, the Wilson lower bound of its record.
    A module proposes with the case it recognises; the case's record on the training split is its trust. Records of release 0.11.0.

    Demo · calibration from records

    A record becomes a probability

    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

    Right in training
    100%
    Interval (95%)
    0.906–1.000
    Yes/no answer
    0.906

    Scroll sideways to see the whole figure.

    Calibration from records, release 0.11.0. Panel A: five records and the lower ends of their 95% intervals: the phishing link's words to no, 425 of 433, give 0.964, held under 0.9 at 0.90; the sarcasm example's words to yes, 1,898 of 1,997, give 0.940, held at 0.90; my channel to yes, 37 of 37, gives 0.906, held at 0.90; a rule seen 3 times, 3 of 3, 0.438; our to no, 131 of 240, 0.483, floored to 0.50: not sure. Panel B: on 50,443 held-out dev questions, accuracy against mean confidence for each kind of answer: whole-question lists 82.9 against 73.1, modules 74.0 against 73.8, bags of words 72.6 against 69.3, decision lists by frame 68.9 against 64.3 and by option set 67.5 against 64.2, relation tables 55.7 against 51.2, evidence sums 51.7 against 47.9, prior 51.5 against 55.4, context cues 47.8 against 39.8, uniform 27.2 against 27.4. Expected calibration error 2.8%.
    Release 0.11.0: records of its answers (A) and its held-out dev split (B).

    Remove a source · release 0.11.0

    Demo · attribution

    Every record splits by source, and removing one is exact

    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.

    Attribution for the comment-spam example, release 0.11.0. With every source, the record 37 of 37 behind my channel, answer true, comes from Source 1 alone; the answer is yes at P(yes) 0.900. Without Source 1, whose 5,757 of the option set's 81,403 training questions leave, the rules are relearned and the first rule that fires reads the question's wording: or a, answer false, 83 of 88, rank 2,623 of 2,747. The answer flips to no, P(yes) 0.126.

    Choose your threshold · the tutorial's 180 dev tickets

    System Zeroyour model
    System Zero answers
    34%
    Right when it answers
    89%
    Your model answers
    66%

    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

    In front of your model

    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

    Heuristic learningDecisions as code, written and maintained by you and your coding agent

    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.

    Evidence for pillar III

    • Shipped

      Ten releases as commits: every rule file is a reviewable Python literal, and every answer names its file and line.

    • Shipped

      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

    The same request under ten releases: a log of decisions

    Each release is a commit. Pick a request to see what each release answered, which proposer answered, and what changed.

    Requests

    1. 01Propose

      Write a rule or a module as code, yourself or with your coding agent.

    2. 02Count

      It needs a counted record that beats the default, on held-out dev data as well.

    3. 03Test

      The tests and the leak screen gate every change.

    4. 04Review

      The change is a diff, with its records before and after, reviewed like any code.

    5. 05Blame

      After the merge, every answer names its file and line, and git blame names the commit.

    06Results

    97.5 on CRUXEval, where it runs the code

    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.

    Its strongest benchmarks

      Chance-corrected skill, where 0 is chance: release 0.11.0 on the public Decision Index.

      A decision, one CPU core
      ~0.3 ms

      at the median with sr-zero serve, 0.6 ms p95; neural decision models take tens of milliseconds on GPUs

      Cold start
      <0.5 s

      one question in a fresh process, 0.25 to 0.5 s at 35 to 38 MB

      Public index, 37 benchmarks
      27.60

      for reference, neural decision models on the same board: 0.6B 28.82 · 0.8B 36.93 · 2B 42.22 · 4B 54.90

      Decision Bench
      46.6%

      of 1,071 decisions right, against 28.0% by chance

      Parameters
      0

      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.

      By release

      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.

      For reference

      ModelPublic indexOutside languageMedian

      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.

      By area

      Chance-corrected skill per area of the public index (0 is chance).

      Where the points come from

      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.

      Per benchmark

      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.

      System Zero1.2–4.7B medianour 0.8B

      Calibration and latency

      Expected calibration error, 50,443 held-out dev questions2.8%
      Decision Bench, 1,071 decisions (chance 28.0%)46.6% right
      Decision Bench calibration error5.1%
      A question with sr-zero serve, one CPU core: median; p950.3 ms; 0.6 ms
      One question in a fresh process: time; memory0.25–0.5 s; 35–38 MB
      sr-zero serve: every rule loaded; peak memoryabout 3 s; 410–460 MB
      The Decision Index harness: median; p950.6 ms; 6.2 ms

      Limits

      • Language and knowledgeNear chance on open-domain language and world knowledge: keep those with a neural model.
      • New domainsOutside what its rules cover it falls back to the prior or chance, and its confidence there can be wrong.
      • Wording mattersThe rules are keyed to how a question is asked; ask it the way the rules were built for, or build a Zero pack from your own questions and wording.
      • PhrasingsAn intent asked in many different phrasings needs more labelled data.
      • EnglishThe modules read English.
      • Public benchmarksPublic-index results, largely in distribution; the board's private Full score is not measured.
      • LabelsMost answer keys come from the generator that built the row or from the source dataset; 0.6% were set by models, and for 26.7% (our pooled data) the origin isn't recorded per row.

      07Method

      How we measure

      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

      What comes next

      Planned capabilities, without dates.

      • 1Distill your model

        Compile the routine decisions of your own neural model into a Zero pack, served in front of it.

      • 2Module plugins

        Your own modules, for answers that can be computed, served beside the rules.

      • 3Packs on the Hub

        Share a pack, with its records and tests, and install someone else's.

      • 4In the router

        System Zero for the semantic router's own decisions: the routine ones on a CPU, the rest passed on.

      09Scenarios

      Where it fits

      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.

      A

      In front of your model

      Routine decisions in under a millisecond with a receipt; the rest goes to your neural model.

      B

      Router signals

      Fast, readable signals for an LLM router, such as an intent, a tool choice or a policy check.

      C

      Decisions you must audit

      Every answer names its rule, its record and its file and line.

      D

      Build your own Zero

      Your labelled examples become your own rules, and a data source can be removed exactly.

      E

      Computable checks

      Code, logic and tool calls, answered by modules that compute them.

      F

      CPU-only, edge or offline

      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

      Run it on your own CPU

      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

      Your rules, in front of ours

      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

      1. 1Your overridesone line for each policy you know: the earliest that fires answers
      2. 2Your packrules counted from your examples, for the question it claims
      3. 3The official rulesevery other question, answered as they would be without a pack
      Precedence, top first. A pack is data, JSON lines and a manifest: loading one runs no code.

      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.

      1. 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.

      2. 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)
      3. 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.

      4. 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.

      5. 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.

      6. 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.

      7. 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.

      8. 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.

      9. The limit, measured

        • Measured

          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.

        • Measured

          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.