AI engineering glossary · Prompt context engineering

What is recency bias in prompts?

Recency bias in prompts: A tendency of models to lean toward the last example or the last instruction in a prompt, giving it extra weight. The order of few-shot examples can therefore change the output. Testing several orderings or placing the key rule last helps manage it.

Level: advancedTopic: Prompt context engineering

Recency bias in prompts: an example

With the final example labelled 'spam', a model labels an uncertain email as spam; swapping the example order flips the answer.

Related terms

More Prompt context engineering terms

Where you learn it

Recency bias in prompts is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.