Directly forcing the model towards or away from specific words. Useful for banning a term outright, or for restricting an answer to a fixed set of options. It works at the token level, which means banning a word requires knowing all the ways it can be tokenised.
Technical view
Adds a fixed offset to specified token logits before sampling, with large negative values effectively prohibiting them. Applied per token identifier, so coverage of casing, leading spaces and subword splits must be handled explicitly. Useful for constraining classification outputs to valid labels and for cheap content controls, though it is easily circumvented by paraphrase and is not a substitute for a moderation layer.
Related
Part of AI Terminology Index, section: Language Models Specifically.