AI engineering glossary · Prompt context engineering

What is logit bias?

Logit bias: A parameter that adds a fixed number to the score of chosen tokens before one is picked, making them more or less likely, or effectively banned. It can force a choice among labels or suppress unwanted words.

Level: advancedTopic: Prompt context engineering

Logit bias: an example

Give the tokens for 'Yes' and 'No' a large positive bias so the model answers with only one of them.

Related terms

More Prompt context engineering terms

Where you learn it

Logit bias 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.