AI engineering glossary · Prompt context engineering

What is presence penalty?

Presence penalty: A sampling setting that lowers the chance of any token that has already appeared at least once, regardless of how often. It nudges the model to bring in new words and topics rather than staying on what it has said.

Level: intermediateTopic: Prompt context engineering

Presence penalty: an example

A presence penalty of 0.6 encourages a brainstorming answer to list varied ideas rather than circling one theme.

Related terms

More Prompt context engineering terms

Where you learn it

Presence penalty 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.