liveBook · Manning

Majority label bias

As explained in The Art of AI Product Development

Majority label bias is a tendency for a model to favor labels that occur more frequently among the examples in a prompt.

Majority label bias makes a language model favor labels that appear most often among few-shot examples. In sentiment analysis, mostly positive examples can push future predictions toward positive. section 6.2.1

Reduce the bias by:

  • Balancing the labels represented in the example set. section 6.2.1
  • Checking example combinations and ordering, since few-shot prompts can produce different results when these change. 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 sentiment-analysis prompt example to inspect how label distribution can shape few-shot predictions. section 6.2.1

How The Art of AI Product Development covers it

How deep it goes
Defines the bias, demonstrates it with sentiment analysis, and recommends balanced examples without detailing implementation internals.
Examples
Uses sentiment prompts containing mostly positive examples to show how label frequency can influence future classifications.
What it assumes
Assumes familiarity with few-shot prompting and labeled examples, while defining the bias from a concrete classification case.
What you can do after
Diagnose/debug with it by reviewing label balance and revising few-shot examples.
How it connects
Connects few-shot prompting, sentiment analysis, prompt engineering, and dataset balance.

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.