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.
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
- Program-aided language models
- Prompt
- Prompt caching
- Prompt chaining
- Prompt compression
- Prompt engineering
- Prompt optimisation
- Prompt registry
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.