Free text classification node for n8n, no LLM, no API key, no subscription

Continuing the discussion from Feat(ai): add native support for System One / decision models (Decider, Jev) for calibrated deterministic routing:

I built a community node for text classification that is free, open source, doesn’t use LLMs, and you can run it locally on your computer (no GPU or server needed). Results are deterministic and fast (~15ms)

npm install n8n-nodes-jeffy

What it does:

- 15+ pretrained tasks from a dropdown (sentiment, intent, spam, topic, urgency, etc)

- No API key, no credits, runs on CPU

- Deterministic: same input always gives same output, no JSON parsing issues

- Retrain on your own categories with a few examples

I was running into the same issues others have reported with the Text Classifier node (JSON parse errors, markdown wrapping, inconsistent results) and wanted something simpler

GitHub: GitHub - nicobrenner/n8n-nodes-jeffy: n8n community node for Jeffy — fast text classification with frozen embeddings + logistic regression · GitHub

npm: https://www.npmjs.com/package/n8n-nodes-jeffy

Happy to help if anyone wants to try it out

Interesting approach! Deterministic classification could be useful for reliable routing in n8n without depending on an external LLM API. I’d be interested in how it performs on ambiguous messages and multilingual inputs, and whether it exposes confidence scores for fallback handling. Thanks for sharing it!

2 Likes

Thanks Shital! Good questions, let me address each:

Ambiguous messages: Jeffy returns confidence scores (probability distribution across all classes), so you can set a threshold. If the top class scores below, say, 0.7, route to a fallback or ask for clarification. In practice, logistic regression on embeddings gives well-calibrated probabilities, so confidence maps well to real uncertainty.

Multilingual inputs: The default model handles 100+ languages out of the box. You train on English examples and it generalizes to other languages with no extra work. I’ve tested across 51 languages with solid results. For n8n workflows handling international support tickets, this means one classifier covers all languages (demo here: Jeffy · Playground )

Confidence scores for fallback handling: Every prediction returns the full probability vector. In an n8n workflow you’d check result.confidence and branch: high confidence goes to the classified route, low confidence falls back to an LLM or human review. Since Jeffy runs locally on CPU, with no API calls, the latency is under 10ms, so adding it as a pre-filter before an LLM step costs almost nothing

Happy to help if you want to try wiring it into an n8n workflow!

1 Like

Thanks for the detailed explanation, Nico! The confidence-based fallback approach makes sense, especially for support-ticket routing.

One thing I’d be interested in testing is how the workflow handles cases where two classes have similar confidence scores. For example, would you recommend using both a minimum confidence threshold and a margin between the top two classes before routing automatically?

That could help avoid incorrect routing in ambiguous cases. Great work on making this available locally without external API dependencies!

1 Like

Great question. Yes, using both a minimum threshold and a margin between top classes would be the right approach for production routing

Jeffy returns probabilities for all classes, so you can check both: “is the top prediction above 0.7?” and “is the gap between #1 and #2 above 0.15?” If either fails, route to a human or a more expensive LLM call

For support tickets specifically, I’d suggest three tiers:

- Auto-route: top class > 0.8 and margin > 0.2

- Suggest + confirm: top class > 0.5 but margin < 0.2 (ambiguous)

- Escalate: top class < 0.5 (low confidence)

The thresholds depend on your data and how costly a misroute is. You can tune them by looking at the prediction distribution on a sample of your actual tickets

The nice thing about having real probabilities (vs LLM “I’m 85% sure”) is that these rules behave consistently. You can backtest them on historical data and know exactly what your routing accuracy will be before going live

If you want to try it out, I’m happy to help set up a test workflow. You can start with as few as 50-100 labeled examples per category, and the classifier trains in seconds. From there you can see the actual confidence distributions on your data and tune the thresholds

Thanks, Nico! I’d be interested in trying a small test workflow in n8n.

I’d like to evaluate the confidence threshold and top-two margin approach on labeled support-ticket examples, including ambiguous cases and multilingual inputs. I’m also interested in measuring routing accuracy and how often the workflow falls back to human review.

My portfolio focuses on reliable n8n workflows, validation, idempotency, and failure handling with Python, FastAPI, and PostgreSQL.

If you have a starter workflow or example dataset, I’d be happy to test it and share the results.

Thanks for offering to help!

1 Like

Hey Shital, good timing. We just shipped a margin field in every prediction response. It’s the gap between the top two confidence scores, so you can see not just how confident the classifier is, but how close the runner-up is

For your ticket routing, the three-tier pattern would look like:

  • conf > 0.8 and margin > 0.2: auto-route to the right queue
  • conf > 0.5 but margin < 0.2: show the suggestion but let an agent confirm
  • conf < 0.5: pass to an LLM or decision model as a fallback

The clinc_oos classifier covers 150 intents across banking, travel, food, smart home, and more. You could use it as a starting point to test the routing logic before training on your own categories

I wrote up the full pattern with code examples here: Confidence-Based Routing: When to Trust Your Classifier — Jeffy

If you want to try it in your workflow, the Jeffy n8n node already returns the margin field. You can branch on confidence and margin directly in an IF node. Happy to help you wire it up

Thanks, Nico! I’ll start with a small test workflow using the confidence and margin thresholds. Could you share the recommended setup steps or a starter workflow, along with a sample dataset if available? I’ll test the routing accuracy, ambiguous cases, and human-review rate, then share my findings with you.

1 Like

Hey Shital, happy to help you get started. Here’s everything you need

Setup

1. Install Jeffy and start the server:

pip install jeffy-classify
jeffy serve

This starts the API on http://localhost:8400. It ships with 15+ pretrained classifiers, no training needed. First run downloads the embedding model (~1.2 GB), then it’s cached

2. Install the n8n community node:

In your n8n instance, go to Settings → Community Nodes → Install, and enter:

n8n-nodes-jeffy

Then add your Jeffy server URL (http://localhost:8400) as a credential under Credentials → Jeffy API

Starter workflow

Here’s a classify-then-route workflow you can import directly (Settings → Import from JSON):

shital-starter-workflow.json (see below)

Workflow JSON (click to expand)

The Jeffy node returns label, confidence (0-1), and margin (gap between top two predictions). The Switch node routes into three branches:

  • confidence >= 0.8 → auto-route (high certainty, act on it)
  • confidence 0.5-0.8 → needs review (the model has an opinion but isn’t sure)
  • confidence < 0.5 → human only (too ambiguous to trust)

You can also use the margin field for a tighter ambiguity check. A high confidence but low margin means the top two labels are close, so the prediction is fragile even though one label technically “wins”

Sample datasets to try

These are all pretrained and ready to go, no training data needed:

  • banking77 – 77 banking intents (card cancellation, transfer timing, pin reset, etc). Great for testing fine-grained routing
  • inbox_router – email routing (support, sales, spam, personal)
  • emotion – 6 emotions (joy, anger, sadness, fear, surprise, love)
  • sms_spam – spam vs ham
  • clinc_oos – 150 intents + out-of-scope detection. Good for testing the threshold on ambiguous cases

For your routing accuracy / ambiguous cases / human-review rate test, I’d recommend banking77. It has 77 classes so you’ll naturally get a spread of confidence levels, and it maps well to a support ticket routing scenario

Run jeffy capabilities from the CLI to see the full list with class counts

Let me know how the testing goes, curious what you find on the human-review rate especially

Thanks, Nico! This gives me a clear starting point. I’ll test the confidence and margin-based routing with the banking77 dataset, compare predictions against the expected labels, and measure ambiguous cases and the human-review rate. I’ll also check the Cloud-to-local connectivity requirements before integrating it with my workflow. I’ll share the findings once I have actual test results.

1 Like

Hi Nico,

I tested Jeffy’s text classification API with n8n and built a workflow for intent-based routing.

I verified three scenarios:

  • Billing: transaction_charged_twice with 0.999 confidence

  • Manual Review: Low-confidence predictions are routed for review

  • OOS-label routing: The oos label is routed to an Out of Scope department and marked for review

I’m using n8n Cloud, where I couldn’t access the community-node installation option, so I integrated Jeffy through an HTTP Request node instead.

I’ve captured screenshots of the workflow and its test outputs. I’d be happy to share them and would appreciate your feedback.

Thanks for building and sharing Jeffy!

1 Like

This is fantastic, thank you for testing it this thoroughly and sharing the screenshots

The three scenarios you verified (high-confidence auto-route, low-confidence review, OOS routing) are exactly the pattern we had in mind, and seeing it work on a real n8n Cloud workflow is great validation

Good catch on the community-node limitation. n8n Cloud only allows verified community nodes, so the HTTP Request approach you used is the right one there. Two things coming out of your feedback:

  1. We’re looking into n8n’s verified community nodes program so Cloud users can install the node directly
  2. In the meantime we’ll publish a workflow template with the HTTP Request nodes preconfigured, so nobody has to rebuild what you just built

Also, since you mentioned testing on labeled support tickets: version 0.1.0a16 (published today) ships a built-in support_ticket classifier (11 categories: billing, refund, cancel, shipping, account, etc.) and a /v1/train endpoint. You can POST your own labeled examples as JSON and get a custom classifier served immediately, no Python needed, works straight from an HTTP Request node. There’s also /v1/feedback for sending corrections back

Would love to see the accuracy and human-review-rate numbers if you run that test, that’s exactly the data that helps us tune the default thresholds

And sorry about the 404 on the starter workflow in my earlier post, re-uploading a fixed link shortly

Hi Nico,

Thank you for the feedback and for sharing the update about v0.1.0a16.

I’m interested in testing the built-in support_ticket classifier and the /v1/train and /v1/feedback endpoints through n8n Cloud.

I’ll prepare a labeled test set and measure classification accuracy and the human-review rate, keeping the evaluation results separate from the routing tests I’ve already completed.

I’ll share the measured results once the tests are complete.

Thanks again for your work on Jeffy!

1 Like

Hi Nico,

I tested Jeffy’s support_ticket classifier through the HTTP API and built an n8n workflow around it with confidence-based routing and a Manual Review path.

Here are my initial results from 11 manually labeled test cases:

  • 7/11 correct classifications (63.6%)

  • 4 misclassifications identified for further analysis

  • Verified low-confidence routing to Manual Review using confidence and margin thresholds

  • Observed API response times of approximately 310–358 ms across these tests

I also tested the public /v1/train endpoint. It returned 404 for POST, so I understand that training may not be enabled on the public playground. I haven’t claimed any training or feedback results that I couldn’t verify.

I’d be interested in helping with practical testing, n8n integration, evaluation datasets, confidence-threshold tuning, or improving the human-review workflow. If you have a small technical task or a scoped collaboration where I could contribute, I’d be happy to work on it and share the results.

Thanks for building and sharing Jeffy!

Best,
Sheetal

Hi Shital,

That evaluation plan sounds right, and keeping the accuracy measurement separate from the routing tests you already ran is the correct call

A few things to save you time before you start

support_ticket is live on the playground now, so you can test it from n8n Cloud with the same HTTP Request node you already have, just change the task:

POST https://playground.jeffyclassify.com/v1/predict
{ "text": "{{ $json.message }}", "task": "support_ticket" }

11 classes: account, cancel, contact, delivery, feedback, invoice, order, payment, refund, shipping, subscription

I found a real defect in that pack while getting ready for your test, and fixed it today

Anything phrased as “change/update my ” used to route to shipping with high confidence, because the source dataset’s shipping class owns that phrasing. “change the address on my account” came back shipping at 0.972. Login and password intents were fine, field updates were not. The bad part is that it was confidently wrong, so a 0.8 auto-route threshold would have sailed straight past it

The fix was 24 hand-written account examples covering contact-field updates. It is live now:

Input Was Now
change the address on my account shipping 0.972 account 0.844
how do I change my email address shipping 0.796 account 0.968
I have to change the delivery address shipping 0.986 shipping 0.969

Tracked and closed here: support_ticket: account-change phrasing misroutes to shipping with high confidence · Issue #11 · nicobrenner/jeffy · GitHub

One case stays ambiguous: “I need to change my home address” still leans shipping, at 0.55 instead of 0.97. I do not think that one is fixable, and I am not going to pretend it is. A home address often is the shipping address, so there is no signal in that sentence to resolve it. It needs additional context the original message example doesn’t really have

What it means for you: you might want to split your accuracy table by intent type rather than reporting one aggregate. That issue was invisible in every aggregate number I had, including a 0.9992 held-out accuracy. It only showed up when I looked at one family of phrasings on its own

On the accuracy number the pack reports. /v1/capabilities now shows test_accuracy: 0.9964 on 550 held-out examples, up from a 1.0 measured against a much smaller internal split. It went down because the measurement got harder, not because the model got worse. Either way, do not expect to reproduce it. It is the source dataset’s own test split, which is far more separable than real tickets. Your labelled set is the number that actually matters, which is exactly why I am glad you are measuring it

Also note confidence on this task runs lower than on banking77, because several of the 11 classes overlap (refund vs payment vs invoice, shipping vs delivery). If you reuse the 0.8 and 0.5 thresholds from the routing test, expect a high review rate. I would measure the confidence distribution on your labelled set first, then pick thresholds from it

/v1/train and /v1/feedback are not on the playground, deliberately. They mutate server state and write files to disk, so exposing them unauthenticated on a public instance is not safe. Both return 404 there. They are disabled unless you explicitly opt in, so to test them you will need your own instance:

pip install jeffy-classify==0.1.0a19
JEFFY_ENABLE_TRAINING=1 jeffy-serve

Then to reach it from n8n Cloud, put it behind a tunnel:

cloudflared tunnel --url http://localhost:8400

That gives you a public https URL to drop into the HTTP Request node. Your ticket data stays on your machine, which is probably what you want for a real labelled set anyway

One thing to be careful about: a quick tunnel URL is public and unauthenticated, and with JEFFY_ENABLE_TRAINING=1 anyone who has the URL can train on your instance. Treat it as temporary, shut it down when the test run is done, and do not leave that combination running unattended

Training payload:

POST /v1/train
{
  "task_id": "my_tickets",
  "examples": {
    "billing":  ["I was charged twice", "my invoice is wrong", "..."],
    "shipping": ["where is my package", "delivery is late", "..."],
    "account":  ["cannot log in", "reset my password", "..."]
  },
  "tune_C": true
}

It returns {"status": "trained", "task_id": "my_tickets", "n_classes": 3, "labels": [...]} and the classifier is immediately available to /v1/predict under that task_id, no restart. tune_C grid-searches the regularization strength. task_id has to match ^[A-Za-z0-9_-]{1,64}$

Then corrections go to:

POST /v1/feedback
{ "task_id": "my_tickets", "text": "...", "correct_label": "shipping" }

That returns {"status": "stored", "feedback_count": N, "retrain_threshold": 50}. Corrections accumulate and trigger an automatic retrain at 50 by default, configurable with JEFFY_RETRAIN_THRESHOLD

Training on your own taxonomy will almost certainly beat the built-in pack on your data, and it sidesteps the whole class of problem above, since you control the classes rather than inheriting someone else’s idea of what “shipping” means

On the Cloud side, two importable workflows now, not one. They are the exact same workflow, differing only in how they call Jeffy, so you can prototype with HTTP Request and switch to the node later without touching anything downstream:

Both route on confidence into four branches rather than on label alone: auto-route, suggest-and-confirm, manual review, and a separate out-of-scope branch. The out-of-scope branch also surfaces best_guess, the label the classifier would have picked if you had not set a threshold, which is useful when you are deciding where to put the threshold in the first place

One gotcha if you modify them: keep the request threshold below your suggest-and-confirm cutoff. Set them equal and the server marks everything under the cutoff out-of-scope, and your manual-review branch silently never fires. I had exactly that bug in the first version of the template

And on Cloud availability: the node now publishes from CI with an npm provenance attestation, passes n8n’s @n8n/scan-community-package checks, and is submitted for verification. I can’t promise a timeline, but if it goes through you would be able to install it directly on Cloud instead of using HTTP Request nodes

Really looking forward to those numbers, especially the human-review rate. That is the metric we have the least real data on

Thank you Shital for collaborating on this!

Hi Nico,

I’ve completed the three requested validation checks:

  1. Feedback-triggered retraining: Verified. The model automatically retrained when the feedback count reached the configured threshold of 2.

  2. Model persistence: Verified. The saved custom model loaded successfully after restarting the Jeffy server.

  3. Per-intent accuracy and error breakdown: Evaluated the existing 11 test cases. The system produced 8 correct predictions and 3 mismatches, giving an overall accuracy of 72.7%.

The mismatches were:

  • cancel → subscription

  • order → delivery

  • shipping → delivery

Since there was only one test example per intent, the per-intent results are preliminary and need a larger test set for reliable accuracy estimates.

The requested checks are complete, and I’ve documented the observed results and remaining accuracy limitations.

Best regards,
Sheetal

1 Like

Thank you, this is really helpful, and the retraining and persistence checks are great

I reproduced all three mismatches against the live pack. The class names I inherited from the source dataset do not describe what the classes contain:

  • cancel is the cancellation fee and early-termination penalty, not cancelling anything. So “cancel my order” routing to order is the pack working correctly
  • shipping is editing the delivery address only. Shipping options, cost and tracking all live in delivery, at 0.91 to 0.95 confidence
  • subscription is the company newsletter, not a paid plan, which is why “cancel my subscription” lands there

Your third case is different and you were right to flag it. order and delivery genuinely overlap: both contain order-status phrasings in the training data, so for “where is my order” either label is defensible and the choice is your team’s preference, not a correctness question

I shipped those names without checking what the classes actually held, which was my mistake. Fixed in 0.1.0a20, out now: /v1/capabilities/support_ticket returns a label_descriptions field written from the training examples, so the next person does not have to discover this by testing

pip install --upgrade jeffy-classify==0.1.0a20

You are right that one example per intent is preliminary. But the more useful conclusion is that your own taxonomy will beat measuring against mine. You already have /v1/train and /v1/feedback working, which was the hard part. Your labels encode what your team wants routed where, and no pretrained pack can know that

If you send me your 11 intents with your own definitions, I am happy to look at which pairs would overlap in practice before you spend time labeling

Hi Nico,

Thanks for checking the mismatches against the live pack and clarifying what the labels actually represent. That distinction is important, and I agree that label names alone are not enough to judge routing correctness.

I’ll define my 11 intents based on the intended business action rather than inherited dataset labels. I’ll also distinguish between genuinely incorrect predictions and cases where two labels overlap and the routing decision depends on the team’s policy.

For the custom support classifier, my initial intent set is:

  • account — account access, profile details, and account changes

  • cancel — requests to cancel an order, service, or subscription

  • contact — requests to contact support or obtain contact details

  • delivery — delivery status, tracking, shipping options, and delivery costs

  • feedback — complaints, suggestions, and general feedback

  • invoice — invoices, receipts, and billing documents

  • order — order placement, order details, and order-status questions where the team prefers the order queue

  • payment — payment methods, failed payments, and transaction issues

  • refund — requests to return money or check refund status

  • shipping — delivery-address changes and shipping-destination corrections

  • subscription — starting, changing, or managing a newsletter or paid subscription, depending on the business definition

Some boundaries still need explicit rules—for example, order status versus delivery tracking, and account-address changes versus delivery-address changes. I’ll treat these as policy decisions to define before creating a labelled evaluation set, rather than assuming the classifier can resolve every ambiguous message from wording alone.

Thanks again for offering to review the taxonomy. Your feedback should help me define clearer boundaries before spending time labelling examples.

1 Like

Hey there, @nicobrenner!

This is absolutely fantastic news and a super valuable contribution to the n8n community! It’s brilliant how you’ve tackled the common challenges with text classification, especially offering a free, local, and deterministic solution without needing LLMs or API keys. The ability to retrain on custom categories with just a few examples is a huge win for many builders.

I love that you’ve focused on speed and CPU-friendliness. This is exactly the kind of innovation that empowers more users to build robust workflows.

Thanks so much for sharing Jeffy with everyone, I’m sure it’ll be incredibly useful!

1 Like

Thanks, that genuinely made my week

One thing worth knowing if you try it, since it is the bit people miss: every prediction comes back with confidence, entropy and margin, not just a label. margin is the gap between the top two categories. A low margin means the model is torn between two specific categories, and in practice that is almost always a message that genuinely belongs to both, rather than the model
being wrong

So the pattern that works well in a workflow is a Switch on margin: high margin goes straight to the automated branch, low margin goes to a human. You get the speed on the easy 85% and you stop the confident-wrong answers, which are the ones that actually cost you

The other thing is that retraining is seconds, not a job. If you find a category that keeps getting missed, add a handful of examples and retrain, and it picks it up. No GPU, no fine-tuning run

If you do build something with it, I would really like to know what breaks. The failure cases I know about came from people telling me, and the next useful thing to fix is usually whatever someone hit first

Repo and docs: GitHub - nicobrenner/jeffy: Pretrained text classifiers you can run and retrain on CPU · GitHub

1 Like