Combining rules with AI classification
Rules are predictable, AI handles fuzzy intent. A decision table for which inbox jobs belong to each, how to layer them, and what to do when they disagree.

On this page(8 sections)
Teams that adopt AI sorting often make one of two mistakes: they throw away their filters because "the AI handles it now," or they keep piling rules on top until nobody knows why an email landed where it did. The better approach is a deliberate split, where each tool gets the jobs it's good at.
What each approach is actually good at
A rule is a condition and an action: if the sender is [email protected], apply the Finance label. It does exactly what it says, every time, and you can explain it to anyone in one sentence.
An AI classifier reads the message and makes a judgment: this looks like a cold sales pitch, this looks like a newsletter, this looks like a real person asking a question. It handles wording and senders it has never seen before, but it can be confidently wrong, and it can't always tell you why.
| Property | Rules | AI classification |
|---|---|---|
| Predictability | Total | High, not perfect |
| Explainability | Trivial | Partial |
| New senders and phrasing | Misses them | Handles them |
| Maintenance | Grows with every exception | Mostly none |
| Failure mode | Silent gaps, stale conditions | Occasional misjudgment |
| Best at | Things you know for certain | Things you'd have to read to decide |
The decision table
Use this to decide, case by case, which mechanism should own a job.
| Situation | Owner | Why |
|---|---|---|
| A known, stable sender (your payment processor, your cloud provider) | Rule | You know the address; no judgment needed |
| Anything legal, security or billing-related from known sources | Rule | Mistakes are expensive; you want certainty and an audit trail |
| Mail sent to a specific address (billing@, security@) | Rule | The address already encodes the intent |
| Bulk newsletters from hundreds of senders | AI | Too many senders to list; headers and format make it easy to judge |
| Cold pitches from people you've never heard of | AI | No stable sender; intent is in the wording |
| "Is this a real customer question?" | AI | Requires reading the content |
| A customer who writes from a personal address | Rule, once you know | AI may misjudge the first time; a sender rule fixes it permanently |
| Topic-based routing (bug vs billing vs how-to) | AI, with rule overrides | Wording varies; overrides catch known patterns |
| One-off exceptions ("always show me mail from my co-founder's personal address") | Rule | Personal knowledge the model doesn't have |
A useful heuristic: if you could write the condition without reading the email body, it's probably a rule. If you'd have to read the email to decide, it's an AI job.
Layering: the order matters
When both mechanisms touch the same message, decide the order explicitly. A sensible default:
- Hard rules first. Security, billing, legal and known-sender rules run first and set their labels.
- AI classification next. The model sorts everything into broad categories.
- Soft rules last. Rules that refine the AI's output, such as "anything the AI calls a newsletter from these three domains also gets the Research label."
The reasoning: hard rules encode facts you're sure about, so they shouldn't be second-guessed. Soft rules are refinements, so they should work with the model's output rather than against it.
When a rule and the model disagree
Disagreements will happen. Your invoicing provider sends a monthly product update, and the AI files it under Newsletters while your rule labels it Finance. What should win?
The rule should usually win, because someone wrote it on purpose. But "usually" hides a few cases worth thinking through:
- The rule is stale. The vendor changed what they send from that address. Fix the rule rather than fighting the model.
- The rule is too broad. "Everything from @vendor.example is Finance" catches marketing too. Narrow it to the specific address.
- Both are right. Labels aren't exclusive. The email can be in the Newsletters category and carry the Finance label at the same time.
That last point resolves most conflicts. Categories answer "how urgently should a human look at this?" Labels answer "what is this about?" They don't have to agree.
A worked setup for a small SaaS team
Picture a five-person team sharing a support inbox. A reasonable configuration:
Hard rules
from: *@payments-provider.example → label: Finance
to: [email protected] → label: Security
to: [email protected] → label: Billing
from: [email protected] → keep in main view
AI categories
Everything else is sorted into broad buckets. In Koltrix those are Primary, Other, Cold pitches, Newsletters and Updates, so customer conversations stay in Primary and the noise moves out of the way.
Soft rules
category: Newsletters AND from: *@industry-weekly.example → label: Reading
label: Billing AND subject contains "refund" → label: Refund-request
That's seven rules. Teams that start with rules alone often end up with dozens, and many of them exist to approximate what a classifier does natively.
Keeping the combined system healthy
Rules rot. Models drift less, but your mail changes. A monthly fifteen-minute check keeps things tidy:
- Look at a sample of mail in each low-priority category for anything misfiled
- For each misfile, decide: one-time move, or a sender rule?
- Review rules that haven't matched anything in a month and delete the dead ones
- Check for rules whose conditions overlap and merge them
- Write a one-line reason next to every rule that isn't self-explanatory
The last item is the one people skip and regret. "Why does everything from this domain get the Legal label?" is a hard question to answer a year later.
What to avoid
Recreating the classifier with rules. If you're writing rules like "subject contains 'webinar' OR 'newsletter' OR 'digest'," you're doing the AI's job badly.
Using AI for certainty jobs. Security reports and payment failures shouldn't depend on a model's judgment when a two-line rule guarantees the outcome.
Hiding the logic. Whatever you build, everyone on the team should be able to answer "why is this email here?" in under a minute.
Key takeaways
- Rules own what you know for certain: known senders, specific addresses, high-stakes categories.
- AI owns what requires reading: intent, new senders, bulk mail at scale.
- Run hard rules first, then AI, then refining rules.
- When they disagree, the rule usually wins, but check whether the rule is stale or too broad.
- Categories and labels can coexist, which dissolves most conflicts.
Start with Koltrix
Your domain, one inbox, and an API that sends.
A team inbox where AI sorts and drafts (nothing is sent without your click), plus the transactional API and SMTP relay your product sends with. 7 days free, no card.

