Classifier

A classifier is a model or algorithm that assigns inputs to categories, such as labelling an email as spam or flagging a chatbot request as harmful.

Classifier is the everyday word for a classification model. Google's machine learning glossary calls it a casual term for exactly that: a model whose output is a class. The word can refer to the algorithm, to the trained model, or to the mathematical function the model implements, which maps an input to a category.

A classifier is trained on labelled examples. Show it thousands of emails marked spam or not spam and it learns which features predict each label. Many classifiers report a score for each class rather than a bare answer, and a threshold set by the people deploying it decides when the score is high enough to act on. Where that threshold sits determines the trade-off between missed cases and false alarms.

In current AI news the word most often refers to safety classifiers that sit around a large language model and screen what goes in and what comes out. Llama Guard, described in December 2023, is a Llama 2 language model fine-tuned to label prompts and responses against a list of safety risks. Anthropic's Constitutional Classifiers, described in January 2025, were trained on synthetic data generated from written rules; in over 3,000 estimated hours of red teaming, no tester found a universal jailbreak that got an early version to answer most target questions in as much detail as an unguarded model. The improved classifiers added 0.38 percentage points to refusals of production traffic and 23.7 per cent to inference costs.

Classifiers also appear in stories about detecting AI-generated text and images, moderating content and screening job applications. In every case they make probabilistic judgements and will make both kinds of error. A classifier's usefulness depends on how often it is wrong, about whom, and what happens to people when it is.

Common questions

What is a classifier in AI?

A classifier is a model that sorts inputs into categories. It learns from labelled examples and then predicts labels for new inputs, such as whether a message is spam, which object appears in a photo, or whether a request breaks a usage policy.

What is a safety classifier?

A safety classifier is a separate model that checks the inputs to or outputs from an AI system for harmful content, such as instructions for weapons. If the classifier flags something, the system can block or alter the response. Several AI companies use them alongside training the main model to refuse harmful requests.

Are AI classifiers accurate?

It varies widely by task and by how the classifier is tuned. All classifiers produce some false positives and false negatives, and moving the decision threshold trades one against the other. Accuracy figures should be read alongside the error rates for each class and the data used for testing.

Can a classifier detect AI-generated text?

Classifiers have been built for this, but their reliability is limited, particularly on short or edited text, and false accusations are a real risk. Their results are best treated as one piece of evidence rather than proof.

Finding more

Search for "classification model", "safety classifier LLM", "Llama Guard" or "Constitutional Classifiers" depending on whether you want the basics or the safety use. Machine learning glossaries, research papers on arXiv and AI companies' technical reports describe how specific classifiers work and were tested. Treat performance claims in company announcements as the company's own testing until independent evaluations appear.

Working out what this means for your business?

Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.