liveBook · Manning

Common token bias

As explained in The Art of AI Product Development

Common token bias is a tendency for a language model to produce more probable, frequently observed tokens or labels more often than rare ones.

Common token bias makes a language model favor frequent, more probable tokens or labels over rare ones. In few-shot classification, this can skew predictions toward labels the model encountered more often during training. section 6.2.1

Emotion classification

When extracting sadness, happiness, fear, anger, surprise, and disgust, a model trained on more happiness and fear may overproduce those labels, even when another emotion fits better. section 6.2.1

Reduce the skew by:

  • Overrepresenting less common labels in the few-shot examples, while recognizing that training-data frequencies are usually unknown. section 6.2.1
  • Documenting and versioning prompt experiments before scaling with a database of relevant examples. section 6.2.1
Figure 6.3 Example of a few-shot prompt for sentiment analysis
A screenshot of a chat

AI-generated content may be incorrect.

Use the few-shot sentiment-analysis prompt example to inspect how label selection and example balance shape model outputs. section 6.2.1

How The Art of AI Product Development covers it

How deep it goes
Defines the bias, illustrates its label-level effect, and gives mitigation, but does not quantify training-data frequencies.
Examples
Uses six basic emotion labels, emphasizing happiness and fear as frequently observed outputs.
What you can do after
Apply it via few-shot prompting by overrepresenting less common labels and documenting prompt changes.
How it connects
Connects few-shot prompting with sentiment analysis, recency bias, and prompt versioning.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Art of AI Product Development. The section links point to the parts of the book it draws on.