Recency bias is a few-shot prompting failure mode in which a model favors outputs associated with examples near the end of the prompt. A final positive sentiment example, for instance, can pull later classifications toward positive. section 6.2.1
Reduce the risk with deliberate example design:
- Slightly underrepresent the label assigned to the final example in the list. section 6.2.1
- Vary example order and combinations during prompt development, then document and version the results. section 6.2.1
Sentiment classification
A prompt ends with a positive sentiment demonstration. The model may classify the current input as positive because it recalls the most recent context more strongly, even when earlier examples suggest another label. section 6.2.1
Figure 6.3 Example of a few-shot prompt for sentiment analysis
Use the few-shot sentiment-analysis prompt example to inspect how demonstration ordering can shape model outputs. section 6.2.1
