liveBook · Manning

Classifier

As explained in How Large Language Models Work

Classification is the task of assigning an input to one of a set of discrete outcome categories.

Classification assigns text to one choice from a fixed set of categories. For example, it can choose A, B, or C for a new text. section 8.3.1

A practical pipeline labels older texts with known outcomes, converts text into embeddings, and trains a simple classifier to predict the category of new text. section 8.3 section 8.3.1

Predicting a rating category

Give old customer texts their known net promoter score ratings, represent them as embeddings, and use logistic regression to predict the rating category for new texts. section 8.3.1

Figure 8.4 LLMs produce numeric vectors known as embeddings as an intrinsic part of their function-ing. The utility of these embeddings is dependent on the fact that these numbers only change a little bit when given similar text. The two example tests here will have similar embeddings, and thus, their plots look similar, even though they don’t share any of the same words. This is a powerful feature that was present in older machine learning techniques.
figure

Similar texts can produce nearby numeric embeddings even when they share no words, giving classification algorithms a usable representation of meaning. section 8.3.1

How How Large Language Models Work covers it

How deep it goes
Defines category prediction and outlines an embedding-based workflow, but stops short of mathematical or algorithmic derivation.
Examples
Uses A/B/C choices and net promoter score ratings as labeled outcomes for predicting categories on new text.
What it assumes
Assumes labeled historical texts and embeddings, while distinguishing categorical prediction from continuous regression.
What you can do after
Apply classification by feeding text embeddings into logistic regression to predict discrete outcomes.
How it connects
Ties classification to embeddings, regression, clustering, outlier detection, and logistic regression.

Also explained in

Compare how 31 books explain classifier →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of How Large Language Models Work. The section links point to the parts of the book it draws on.