I Tried to Make AI Writing Sound Human by Banning AI Words Through Logit_bias

vincent_s1 pts0 comments

I Tried to Make AI Writing Sound Human by Banning AI Words Through logit_bias - Vincent Schmalbach

Skip to content

Currently Available: Need a skilled Software Developer for your next project?

Hire Me Today

Categories

API LLM Software Development

I Tried to Make AI Writing Sound Human by Banning AI Words Through logit_bias

July 29, 2026<br>by Vincent Schmalbach

I tried to make AI writing sound more human with logit_bias, an API setting that changes how likely a model is to select specific tokens. I built a blacklist from words that appeared unusually often in AI-generated text, converted the words into token IDs, and assigned those IDs negative values.<br>I'm writing this while working on vroni.com, my AI coding tool for turning tasks into pull requests.

This is different from putting “do not use these words” in the prompt. A prompt gives the model an instruction. The model reads it along with the article, decides how to apply it, and may ignore it when another instruction seems more important. logit_bias does not ask. It changes the numerical scores used to select every next token.

My idea was simple: if AI articles are easy to recognize partly because the same words keep appearing, perhaps I could reduce those words at the API level. I wanted the model to rewrite an AI-generated article while keeping its claims intact, but with fewer of the words associated with AI prose.

To test that, I started with eight complete AI-generated articles. I sent each full article to DeepSeek V4 Flash through OpenRouter and asked it to edit the prose while preserving every fact, name, number, example, qualification, recommendation, and conclusion. I did not process the articles paragraph by paragraph.

Each source article went through the model twice. Both calls used the same editing prompt and sampling settings. The control call used no token bias. The experimental call added a -8 bias to the token IDs on my blacklist. This produced eight control rewrites and eight blacklist-active rewrites of the same eight source articles.

What logit_bias changes

Before a language model writes its next token, it assigns a score to every token it could choose. That score is called a logit. The API turns those scores into probabilities and samples the next token.

logit_bias inserts another number between those two steps. OpenAI's Chat Completions reference defines it as a map of token IDs to values from -100 to 100. The API adds the supplied value to the model's score before sampling. A negative value reduces the chance that a token will be selected. A value near -100 can effectively ban it.

Suppose the model is about to write “This is a crucial distinction.” If the token for “ crucial” receives a negative bias, another continuation becomes more likely. The model might choose “important,” remove the adjective, or construct a different sentence.

That does not happen only once. Whatever token gets selected becomes part of the context used to score the following token. One forced substitution can therefore change the rest of the sentence and later sentences too.

Words also do not map neatly to tokens. “Crucial” at the start of a sentence may have a different token ID from “ crucial” after a space. A capitalized form may be different again. Some words split into several tokens. Penalizing a shared fragment can affect words that were never meant to be on the blacklist.

A prompt blacklist is not the same thing

Listing words in the prompt is easier because it does not require tokenization. It also gives the model some discretion. If “appears” is on the list but the source makes an uncertain claim, the model can keep the hedge because preserving the claim is more important than following the blacklist perfectly.

The disadvantage is that prompt instructions are not enforcement. The model may use a listed word anyway, especially in a long article with many other requirements. It may also obey mechanically and replace a normal word with an awkward synonym.

I tested this separately with GPT-5.6 Sol, which does not accept logit_bias. Five control articles used an ordinary editing prompt. Five experimental calls used the same task plus an explicit 93-word suppression list.

The prompt list reduced watched-word occurrences from 11 across the five control outputs to one across the five experimental outputs. But two of the five experimental articles dropped or changed information. All five controls preserved the source meaning.

That was not a direct comparison with the DeepSeek experiment because the model and source set were different. It did show that merely moving the blacklist into the prompt does not remove the tradeoff. The model can follow the list and still damage the article.

Which APIs and models support it

There is no single model list that can be trusted without testing the actual endpoint.

OpenAI still includes logit_bias in the Chat Completions schema, but that does not mean current OpenAI models accept it. I sent...

model words token logit_bias prompt blacklist

Related Articles