8000 bench(systemone): measure local /_decide for discussion #1012 email labelling by Vinz2168 · Pull Request #1026 · xerj-org/xerj · GitHub
[go: up one dir, main page]

Skip to content

bench(systemone): measure local /_decide for discussion #1012 email labelling - #1026

Merged
xerj-org merged 1 commit into
xerj-org:mainfrom
Vinz2168:feat/systemone-classify-email-proto
Sep 26, 2026
Merged

xerj-org merged 1 commit into
xerj-org:mainfrom
Vinz2168:feat/systemone-classify-email-proto

Conversation

@Vinz2168
@Vinz2168 Vinz2168 commented Sep 22, 2026 •
Copy link
Copy Markdown
Collaborator

Summary

#1012 proposes an optional Jev-classification stage in xerj autoindex and asks whether local-only classification from labelled history is an acceptable alternative to a hosted call. That local mechanism already ships — POST /_decide (engine/crates/xerj-api/src/systemone_api.rs), a weighted k-NN vote over a labelled-history index, zero egress — so this adds a benchmark that measures it, per the discussion's own stated next step ("a small measurement on a labelled dataset... before writing any code"). No engine code changed; no xerj-autoindex wiring yet.

  • 260 originally-authored synthetic emails (no license/privacy question) across the discussion's own 4 example labels: invoice/newsletter/personal/needs-reply. 200 train / 60 held-out test, k=10 (same k as the published Banking77/SMS-spam decisions-as-retrieval numbers).
  • A first run scored a suspicious 100% — the templated generators give each label near-exclusive vocabulary. Added a second, hand-authored "hard" tier (8 emails) that deliberately crosses that vocabulary (a personal note with a dollar figure, an invoice with no word "invoice" in it, a newsletter that ends on a direct question, etc).

Result (verified, rc.76, local node, lexical embedder, no egress)

Tier n accuracy mean confidence
easy (templated, same generator as train) 60 1.000 1.000
hard (hand-authored, boundary-crossing) 8 0.625 0.902

The hard-tier misses are wrong and confident (0.836–1.000), not wrong-and-hedging — the same shape of miscalibration the discussion's own text flags for the hosted path (ECE 0.31 on FiQA), just measured on the local path instead.

README.md answers the discussion's four open questions from this measurement and states plainly what a real autoindex integration would still need (a CLI flag, an abstain-tolerant pipeline step, a decision on how the labelled-history index gets built) — none of that is written here.

What I verified vs. assumed

Verified: built xerj-server from this branch's main (rc.76), ran a throwaway local node, executed gen_corpus.py and run.py end to end against it, numbers above are from results/run.json produced by that run.

Assumed / not tested: anything about real mailboxes (corpus is synthetic by design — see README's "What this is not" section); anything about the hosted Jev path (out of scope — its client would need extending first, per the discussion's own text); and the right decisions.min_confidence threshold for production use (n=8 on the hard tier is too small to tune it).

Test plan

  • python3 gen_corpus.py regenerates corpus.json deterministically (seed 7)
  • XERJ_URL=... python3 run.py reproduces the table above against a locally built node
  • No engine//xerj-autoindex code touched — nothing to build or gate

An agent (Claude Code) wrote this PR and ran the measurement above.

🤖 Generated with Claude Code

…belling

discussions/1012 proposes an optional Jev-classification stage in `xerj
autoindex`, and asks (Q2) whether local-only classification from labelled
history is an acceptable alternative to a hosted call. That local path
already exists (POST /_decide, engine/crates/xerj-api/src/systemone_api.rs)
and needed no new code - this only measures it, per the discussion's own
stated next step ("a small measurement on a labelled dataset... before
writing any code").

Method: 260 originally-authored synthetic emails across the discussion's
own 4 example labels (invoice/newsletter/personal/needs-reply), 200 train
/ 60 held-out test, k=10 (matching the published Banking77/SMS-spam
decisions-as-retrieval numbers). A first run scored a suspicious 100% -
the templated generators give each label near-exclusive vocabulary - so a
second, hand-authored "hard" tier (8 emails) deliberately crosses that
vocabulary (a personal note with a dollar figure, an invoice with no word
"invoice" in it, etc).

Result (rc.76, local node, lexical embedder, no egress):
  easy tier: 60/60 = 1.000 accuracy, mean confidence 1.000
  hard tier:  5/8  = 0.625 accuracy, mean confidence 0.902

The hard-tier misses are wrong AND confident (0.836-1.000), not wrong and
hedging - the same shape of miscalibration the discussion's own text flags
for the hosted path (ECE 0.31 on FiQA). README.md answers the discussion's
four open questions from this and states plainly what a real autoindex
integration would still need to build; none of that is written here.

Written and measured by an AI agent (Claude Code), pushed from Vinz2168's
account at their request.
@Vinz2168
Vinz2168 force-pushed the feat/systemone-classify-email-proto branch from 5d972c3 to df0ce65 Compare September 23, 2026 06:09
Vinz2168 added a commit to Vinz2168/xerj that referenced this pull request Sep 23, 2026
…sion

Agent field report, per AI_CONTRIBUTIONS.md's baseline ask of every agent
that installs and runs XERJ. Filed alongside PR xerj-org#1026 and a comment on
discussions/1012.

Written by an AI agent (Claude Code), pushed from Vinz2168's account at
their request.
@xerj-org
xerj-org merged commit ba60714 into xerj-org:main Sep 26, 2026
22 checks passed
Amakurai pushed a commit to Amakurai/xerj that referenced this pull request Sep 27, 2026
…, rc.78 queue

The 2026-09-21 review of this file was stale within hours: xerj-org#950 closed
19:33, xerj-org#941 19:38, xerj-org#1015 20:49 (all 2026-09-21), xerj-org#874 2026-09-22, and the
stage-1 gating trio xerj-org#937/xerj-org#938/xerj-org#939 closed the same evening — every one
recorded here as open or "under way". This pass re-checks every status
claim against live tracker state and rolls the file forward:

- Next release: the two "in flight" items (xerj-org#1015, xerj-org#950) are closed with
  fixes on main riding to rc.78 — the section now records what actually
  landed since the rc.77 tag (xerj-org#1009, xerj-org#1017, xerj-org#1018, xerj-org#1020, xerj-org#1021, xerj-org#1023,
  xerj-org#1025, xerj-org#1026, xerj-org#1033, xerj-org#1034) with PR links, including xerj-org#874's budget met
  at ~3x margin (206 -> 64 kB per idle index) and discussion xerj-org#1012's
  email-labelling measurement (1.000 templated tier / 0.625 at 0.902
  confidence on the hard tier — wrong-and-confident).
- Open defects: now xerj-org#1031 and xerj-org#1032 only; xerj-org#1015/xerj-org#950 removed (closed);
  trackers sentence corrected (xerj-org#941, xerj-org#874 closed — only xerj-org#298 remains by
  design).
- GA gate: "Close the CHANGELOG gap" marked closed 2026-09-26 (the
  rc.19-rc.70 backfill, PR xerj-org#1035); the record-complete note replaces the
  gap warning under "Shipping today".
- Zero-token: stage-1 gating trio recorded as fixed (xerj-org#991, xerj-org#995, xerj-org#979)
  with the old measured costs kept as the before-state; the xerj-org#940
  hash-seed spread annotated as a pre-fix measurement; stage-2 object
  storage marked done (xerj-org#965 wired in rc.77 — the old bullet contradicted
  this file's own "Shipping today" section); mail ingest "unreleased"
  corrected to "shipped in rc.75"; three stale "In flight:" labels on
  landed stage-1 items relabelled "History:".
- Mail-ingest memory line: xerj-org#948's runaway is fixed (xerj-org#1002) — the line
  now carries the fixed numbers and points at xerj-org#1032 for the residual.

Review line updated to 2026-09-26 (machine-checked format), scoped
honestly as a desk review. The milestones line is true again: rc.78
milestone created, all four open issues triaged (xerj-org#1030/xerj-org#1031/xerj-org#1032 ->
rc.78, xerj-org#298 -> GA).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0