Think Build Implement Repeat
London, UK +44 7367 067226
WhatsApp FOLLOW f in X
  1. Home
  2. Blog
  3. Sorting Things Automatically and Correctly
Python & Django

Sorting Things Automatically and Correctly

Designing an AI classification service for routing, triage and categorisation: getting the categories right, setting confidence thresholds and monitoring.

Updated 2 min readBy SpiderHunts Technologies

Free estimateNo obligation

Get a free estimate

Tell us what you need. A senior engineer reads every enquiry.

Takes under a minute. We never share your details.

  • Free consultation
  • No commitment
  • NDA on request

Prefer to talk? Book a free 30-minute call →

Quick answer — TL;DR

Classification is the highest-value, lowest-risk AI application in most businesses. Get the categories right first — most classification problems are labelling problems.

Most classification problems are category problems

Before any model, look at the categories. If your business uses sixty overlapping categories where a person cannot reliably choose between them, no model will either.

Fifteen clear, mutually exclusive categories produce far better classification than sixty overlapping ones, and they produce better reporting too.

Fix the categories first

  1. Take two hundred real items and have two people categorise them independently
  2. Measure how often they agree
  3. Where they disagree, the categories are ambiguous
  4. Merge, split or define more precisely until agreement is high
  5. Then, and only then, build the classifier

Confidence and routing

  • High confidence: route automatically
  • Medium: route with a flag for review
  • Low: send to a person to categorise
  • Corrections captured and added to the evaluation set

Thresholds set from a shadow run against real data, not from intuition. Running in shadow for two weeks gives you the numbers to set them properly.

Monitor the distribution

SignalMeans
Distribution shiftingInput has changed
One category growing sharplyEither real, or a classifier problem
Low-confidence proportion risingInput drifting from the examples
Correction rate risingQuality degrading
A category never usedIt probably should not exist

Where it pays

Support ticket routing, document type identification, enquiry triage, expense categorisation, product classification. All high volume, all currently done by a person reading and deciding.

The value is not just the time. It is the consistency, which makes the resulting data usable for reporting in a way manual categorisation never is.

FAQ

Frequently asked questions

The questions readers ask us after this guide.

Still have a question?

Ask us directly — a senior engineer will get back to you.

Ask about your project

Do we need to train a model?

Usually not. Modern language models classify well from a description of the categories and a handful of examples.

How accurate is it?

Ninety to ninety-six per cent on well-defined categories. Lower where categories overlap, which is a category problem rather than a model one.

What accuracy do we need?

Better than the current manual consistency, which is frequently lower than people assume. Measure that first.

Should low-confidence items be guessed?

No — route them to a person. A confident wrong classification is worse than an acknowledged uncertain one.

Keep reading

More on Python & Django

Python & Django

An API Other Systems Can Depend On

Designing a Python API service others can depend on: validation at the boundary, consistent errors and status codes, early versioning and documentation.

Python & Django

Moving and Transforming Data Reliably

Building data pipelines in Python that cope with malformed input: restartable stages, quarantining failures, reconciling counts and alerting on absence.

Start here

Someone reading and sorting all day?

Check your category agreement first — two people, two hundred items. Then we can talk about automating it.

  1. You tell us what you needTwo minutes on the form, or a message on WhatsApp.
  2. A senior engineer reviews itAnd comes back with questions, a realistic range and an honest view on fit.
  3. Free 30-minute scoping callWe talk through scope, options and a realistic estimate — with no obligation.
Free estimateNo obligation

Talk to someone who builds this

Send a short brief and we will come back with an honest view and a realistic range.

Takes under a minute. We never share your details.

  • Free consultation
  • No commitment
  • NDA on request

Prefer to talk? Book a free 30-minute call →