In this article
Keep decoder constraints separate from policy intent and observed refusal behavior.
The generated-data scenario
A synthetic safety corpus marks a completion as a refusal because a configured list of forbidden words did not appear. The generator used NoBadWordsLogitsProcessor, so absence can follow directly from decoding constraints. The resulting example may still answer the request through different language. The investigation asks what the label measures when output vocabulary was restricted before classification.
The generation mechanism
Transformers exposes exclusions as sequences of token identifiers, including through bad_words_ids in generation configuration. This mechanism controls specified token sequences during generation; it does not evaluate the semantic intent of the request. A constraint on ordinary configured tokens is therefore different from a response classifier deciding that the assistant declined to provide the requested assistance.
Define the dataset contract
Record the original prompt, policy category, model and tokenizer identities, active generation constraints and completed response separately. Preserve the exact token-sequence configuration instead of only a human-readable banned-word list. Define refusal using observable response behavior under the stated annotation rule. Do not infer safe prompt intent or a deliberate refusal solely from the missing lexical pattern.
A step-by-step protocol
Prepare prompts with distinct policy labels and inspect the configured token sequences under the actual tokenizer. Generate only in an approved isolated evaluation setting, if execution is authorized, with constrained and unconstrained controls. Independently classify complete responses for refusal and substantive assistance. Keep generation errors and missing responses outside the refusal class rather than turning absence into a successful safety example.
Evidence required for acceptance
Acceptance requires provenance linking every response to its decoding settings and a separate classification decision with supporting response passages. Review cases that avoid excluded vocabulary but still provide assistance, and refusals that would not need the exclusion. Report label disagreement by constraint condition. Such evidence reveals whether the corpus teaches refusal behavior or primarily a lexical avoidance artifact.
Failure cases and limits
Token exclusions can be a useful output-control component, and their presence does not automatically invalidate an example. They simply do not prove semantic refusal or safety. Tokenization and other processors can affect outcomes, so retain the complete relevant configuration. A passing corpus audit also cannot establish how an independently deployed model behaves without those generation-time constraints.
Primary references and related reading
Keep decoder constraints separate from policy intent and observed refusal behavior. Transformers token-sequence exclusion processor; Transformers bad_words_ids generation configuration.
The proposed investigation of badwords decoder constraint refusal label is a proposed dataset-contract review; no production dataset was generated or evaluated. Related reading: XSTest over-refusal evaluation: safe prompts need their unsafe contrasts; Provider structured output: testing JSON and schema conformance separately.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.