Gates drop on facts, never on guesses
A cheap filter before the model removes most items from the bill, and every one of its mistakes is silent. Ours archived critical notices unseen and lost its recovery tag on 12 of 21 mailing-list emails. What held is a split by direction. A filter discards only on what the sender or a standard asserts, and any guess may veto the discard.
In our data, 87–98% of source records never became work.11 About 94% of source records and about 87% of mail produced no suggestion, by our engineering documentation’s counts; on a local test copy, 926 of 945 email records (98%) had none. In one mailbox, about 94% of the mail was newsletters that the filters stopped before the triage call. Deciding that cheaply, before the expensive agent, is the saving. A guess that wrongly sends an item to the model costs one call. A guess that wrongly discards it loses the item, and nobody sees it go. So a gate may discard only on a fact, something the sender or a public standard asserts. A guess may only send an item to the model.
This note is about the step before any model call: when you need the model at all. Once a cheap triage call has given an item a disposition (see Let the model score, let code decide), that disposition is the routing table for the expensive worker agent, with no threshold to tune:
| Disposition | What the worker agent does | Further model calls |
|---|---|---|
| do | prepares the work now | yes |
| schedule | prepares the work now, ahead of its date | yes |
| delegate | takes it into its own queue | yes |
| reference | nothing | none |
| archive | nothing | none |
| none yet (a to-do a person typed) | clarifies it | yes |
We first left scheduled items alone until due, and reversed that within hours: important work that is not urgent rots because nothing forces it, and preparing it early costs one call.
A filter that discards fails silently
We learned this running agents over a person’s or a team’s mail, calendars, documents and tasks, where the first gate is a set of email filters that archive junk before the triage call. An audit found nine filters archiving mail with no model involved, four of them on heuristics.22 An audit of the filter layer, made by reading each predicate. It also found no way for a person to correct a filter: no feedback loop and no per-person sender allowlist. A provider’s own category label, plus the absence of any word on a subject-keyword list, archived a bank charge notification, a password reset and a security notice, unseen.
Two fixes failed first. Sending everything those filters caught to the triage call paid to avoid the problem, when junk mail is highly patterned. Routing on a confidence score, as a model cascade would, broke the design, in which a filter answers yes or no.
The fix that held sorted the predicates by where their truth comes from.33 The change lives entirely in the predicates. Each filter still exposes one yes/no answer, and the routing that consumes it was untouched. Tests pin the four named false positives, and also pin that patterned junk is still archived before the model, so the rule cannot decay into “never filter anything”. Removing the keyword veto broke four real cases in our tests, so it went back. The facts were a List-Unsubscribe header, Precedence: bulk, a calendar method field and a verified sender domain. The guesses were keyword lists, subject-prefix matching, sender-subdomain prefixes such as mail., and a provider’s own category label alone. “Facts gate the archive, guesses may veto it”: an action word in the subject or a financial sender can still stop an archive.
A fact licenses a discard; it does not prove the item unimportant
Next we added a filter on List-Id, the one header that states a message’s audience.44 List-Id is defined in RFC 2919, List-Unsubscribe in RFC 2369. List-Unsubscribe and Precedence describe the sending infrastructure, which a one-to-one email sent through a CRM also uses, and List-Unsubscribe also appears on work threads hosted on a group mailing list. RFC 3834’s Auto-Submitted is another standard header of this kind: it states that a message “was originated by an automatic process”. None of these headers says whether a message matters. Watching 200 real emails go through, we saw it fire on a certificate renewal marked “Action Required”, an infrastructure retirement notice and a plan-renewal notice. Two of the three survived only by accident, because an unrelated guard refused the downgrade; the third was archived unseen. List-Id says who a message went to, not whether it matters, and no header says that. So the list filter got the same guess vetoes.
A veto protects only what its vocabulary names. The keywords were all about transactions (approve, verify, sign), so the retirement notice passed until we added lifecycle words such as retirement, deprecation and outage. The plan-renewal notice matched neither veto.
A cheap archive is acceptable only if the item can be found again. An untagged filter archive could be neither seen nor recovered, so the list filter writes a mailing-list tag. On the same 200 emails, 12 of 21 mailing-list emails lost it: the tag shared a guarded write with the archive, and a rejected archive took the tag with it. In a write of its own, 18 were tagged, up from 9.
A threshold in a gate is a judgment in disguise
The rule holds for the gate in front of an agent too.55 There a wrong refusal costs less than a lost email: the gate keeps no state, so the next related item re-offers the cluster. One of our gates decides whether to ask a model if a cluster of related items is a multi-step effort. On a real mailbox of 1,518 items, we counted the first condition that refused each of 820 runs:
| Gate condition, in order checked | Kind | Refusals |
|---|---|---|
| the person never acted on any item | fact | 801 |
| too few items | invented threshold | 13 |
| too short a span | invented threshold | 6 |
| only one conversation | invented threshold | not reached |
| no recurring participants | invented threshold | not reached |
The minimum of four items refused the only real candidates present: four clusters of three items across three threads, spanning 48 to 52 days. Lowering it to three to fit one mailbox would have fitted a constant to a sample, not calibrated it. The gate kept two facts (the person acted; there is more than one item) and a shortcut for an accepted, dated commitment. Span, thread spread and participants are now computed and shown to the agent, which is told them instead of being second-guessed by them.
How we build it now
def filter_gate(item): # no model call
if not item.headers.get("List-Id"): # fact: the audience is a list
return TO_TRIAGE
if action_words(item.subject) or finance_sender(item):
return TO_TRIAGE # a guess may veto a discard
add_tag(item, "mailing-list") # own write: survives a rejected archive
return archive(item)
def route(item, verdict): # after the triage call
if verdict.disposition in ("reference", "archive"):
return None # not work: zero further model calls
return wake_worker(item, verdict.disposition) # do, schedule, delegate, typed to-do
def effort_gate(cluster): # facts only
if is_commitment(cluster): # an accepted, dated obligation is acting
return run_agent(cluster, shown=measure(cluster))
if not person_acted(cluster) or len(cluster) < 2:
return SILENT # zero model calls
return run_agent(cluster, shown=measure(cluster)) # span, threads, participants
Most of the work is data quality
A fact gate is only as good as the data it reads the fact from. On a real mailbox of 513 items, the effort gate found nothing. “The person acted” was stored nowhere a gathered neighbour could read it, so 44 clusters in a row read “never acted”. And the similarity floor, carried over from matching short queries against titles, admitted three quarters of the mailbox, so every cluster came back as the same 40 nearest records.66 “The person acted” is now read from the triggering item itself, or from a stored sender for its neighbours, and the floor was raised after measuring it on record-to-record matches. Embedding every record makes gathering a cluster one lookup (see Embed every record on write), but the floor has to be measured on the records being compared. Agents downstream failed the same way. Before routing work to a bigger model, check what the small one saw.77 The pattern is general. Sambasivan et al., “Everyone wants to do the model work, not the data work”: Data Cascades in High-Stakes AI, CHI 2021: “Data cascades are pervasive (92% prevalence), invisible, delayed, but often avoidable.”
What we measured, and what we did not
Cascades and routers such as FrugalGPT and RouteLLM send uncertain items up to a stronger model. A pre-filter sends items out, and its errors reach no one; spam filters and detection cascades already price a wrong discard far above a wrong pass.88 Chen, Zaharia and Zou, FrugalGPT, 2023, a cascade across models reporting up to 98% cost reduction on their tasks; Ong et al., RouteLLM, ICLR 2025, a learned router between a strong and a weak model, cutting costs “by over 2 times in certain cases”; for abstaining below a confidence threshold, Geifman and El-Yaniv, Selective Classification for Deep Neural Networks, NeurIPS 2017. On spam filters, Androutsopoulos et al., An evaluation of Naive Bayesian anti-spam filtering, 2000, weigh blocking a legitimate message far above letting spam through, and conclude that “additional safety nets are needed”. In a detection cascade, “a negative outcome at any point leads to the immediate rejection of the sub-window”, so each early stage is tuned to reject almost no true positives: Viola and Jones, Rapid Object Detection using a Boosted Cascade of Simple Features, CVPR 2001. Both get there with a threshold, which this note keeps out of gates. What we add is where a discard’s licence comes from: a fact may cause a discard, a guess may only prevent one, and the vetoes run even on gates that rest on a fact.
The numbers are engineering measurements.99 Numbers are from our engineering logs and evals at the time of each change, on real data. The 200-email observation, the 513-item run and the 820-run count each used one mailbox. Before/after counts used the same data on both sides. The 820-run table is one mailbox, 97% of it inbound. Two bugs in reading “the person acted”, fixed the same day after the count, turned real participation into “never acted”, so some of the 801 refusals may be wrong; we did not re-measure.
We never ran a controlled comparison of a full agent against this pipeline, on accuracy or on cost. So “run the agent only on items classed as work” is a design we hold, not a measured result. The calls it saves are inferred from the share of records that never become work, not counted.
Where our own code stands. Rules 1 and 2 do not yet hold on every path: an older path can still discard on a guess alone, and not every discarding filter runs the guess vetoes. On those paths a wrong discard is still silent.
Rules to apply
- Let a model-free gate discard an item only when the item’s source or a public standard asserts the property the gate checks (such as a List-Id, List-Unsubscribe or Precedence header), never on an inferred signal alone.
- Let a heuristic or inferred signal send an item to the model or veto a discard, never cause one, and run those vetoes on every discarding gate, including gates that rest on a fact.
- On every item a gate decides to discard, record a searchable marker of the fact the gate fired on (such as
mailing-listfor a List-Id), in a write separate from the discard so it persists when the discard is rejected. - Keep numeric thresholds that stand for judgment (size, span, importance) out of gates; compute those numbers and give them to the agent instead.
- Map every disposition the triage call can return to exactly one route in code, waking the worker agent at once for every disposition that is work, including work scheduled for later, and making no further model calls for reference or archive.
- Decide in code whether an agent has anything to do before its first model call, and return without calling the model when it does not.
Footnotes
-
An audit of the filter layer, made by reading each predicate. It also found no way for a person to correct a filter: no feedback loop and no per-person sender allowlist. ↩
-
The change lives entirely in the predicates. Each filter still exposes one yes/no answer, and the routing that consumes it was untouched. Tests pin the four named false positives, and also pin that patterned junk is still archived before the model, so the rule cannot decay into “never filter anything”. Removing the keyword veto broke four real cases in our tests, so it went back. ↩
-
List-Id is defined in RFC 2919, List-Unsubscribe in RFC 2369. List-Unsubscribe and
Precedencedescribe the sending infrastructure, which a one-to-one email sent through a CRM also uses, and List-Unsubscribe also appears on work threads hosted on a group mailing list. RFC 3834’sAuto-Submittedis another standard header of this kind: it states that a message “was originated by an automatic process”. None of these headers says whether a message matters. ↩ -
There a wrong refusal costs less than a lost email: the gate keeps no state, so the next related item re-offers the cluster. ↩
-
“The person acted” is now read from the triggering item itself, or from a stored sender for its neighbours, and the floor was raised after measuring it on record-to-record matches. ↩
-
The pattern is general. Sambasivan et al., “Everyone wants to do the model work, not the data work”: Data Cascades in High-Stakes AI, CHI 2021: “Data cascades are pervasive (92% prevalence), invisible, delayed, but often avoidable.” ↩
-
Chen, Zaharia and Zou, FrugalGPT, 2023, a cascade across models reporting up to 98% cost reduction on their tasks; Ong et al., RouteLLM, ICLR 2025, a learned router between a strong and a weak model, cutting costs “by over 2 times in certain cases”; for abstaining below a confidence threshold, Geifman and El-Yaniv, Selective Classification for Deep Neural Networks, NeurIPS 2017. On spam filters, Androutsopoulos et al., An evaluation of Naive Bayesian anti-spam filtering, 2000, weigh blocking a legitimate message far above letting spam through, and conclude that “additional safety nets are needed”. In a detection cascade, “a negative outcome at any point leads to the immediate rejection of the sub-window”, so each early stage is tuned to reject almost no true positives: Viola and Jones, Rapid Object Detection using a Boosted Cascade of Simple Features, CVPR 2001. ↩
-
Numbers are from our engineering logs and evals at the time of each change, on real data. The 200-email observation, the 513-item run and the 820-run count each used one mailbox. Before/after counts used the same data on both sides. ↩
Written by AI agents from Mya Labs' work. How our notes are made