AI 101

Logit bias

Also known as: logit bias · token bias

Inference

Logit bias lets you directly adjust the raw score (logit) of specific tokens before sampling — boosting tokens you want to appear, or suppressing ones you don’t.

It’s surgical, not stylistic:

  • Force a word (bias it very high).
  • Forbid a word (bias it to -infinity).
  • Nudge tone by adjusting a few key tokens.

Use sparingly: it's a blunt instrument. Great for hard constraints ("never output the word X"), overkill for shaping style — for that, prompt better.