PaperBleachPaperBleach
logo

How Temperature and Top-p Sampling Change Whether Text Looks AI to a Detector

P
Paperbleach

19 Jul 2025

When people ask why one AI draft gets flagged and a near-identical one slides through, the answer is often buried in two settings most writers never see: temperature and top-p. These knobs decide how a model picks its next word, and that choice quietly shapes the statistical fingerprint a detector reads. Understand them, and a lot of confusing detector behavior starts to make sense.

Key takeaways

  • Temperature and top-p are the two main knobs that control how “safe” or “surprising” a model’s word choices are.
  • Detectors mostly read statistical fingerprints like perplexity and burstiness, so changing how a model samples changes what the detector measures.
  • Low temperature tends to produce flatter, more predictable text that often scores as more AI-like.
  • Higher temperature and a wider top-p add unpredictability, but past a point you get nonsense, not human-sounding writing.
  • Sampling settings shift the odds, not the outcome. They don’t reliably beat a detector, and most people never touch them anyway.

What temperature and top-p actually do

Every time a language model writes a word, it isn’t really choosing one word. It’s producing a ranked list of probabilities over thousands of possible next tokens. The word “the” might sit at 30%, “a” at 12%, “this” at 8%, and a long tail of unlikely options trailing off after that. Sampling settings decide how the model turns that list into an actual pick.

Temperature stretches or flattens the whole probability curve. At a low temperature (say 0.2), the top option becomes even more dominant, so the model almost always grabs the most likely word. At a high temperature (say 1.2), the curve flattens out, and less probable words get a real shot at being chosen. Think of it as a confidence dial: low temperature is a cautious writer who always reaches for the obvious word, high temperature is one who’s willing to gamble.

Top-p, also called nucleus sampling, works differently. Instead of reshaping the curve, it trims the candidate list. With top-p set to 0.9, the model keeps adding words to the pool, starting from the most likely, until their combined probability hits 90%, then samples only from that group. Everything in the unlikely tail gets cut. A low top-p (0.3) keeps the pool tiny and predictable; a high one (0.95) lets oddball words back in.

The two are usually used together. A common default lands around temperature 0.7 to 1.0 with top-p near 0.9 or 1.0, which is why most AI text has a recognizable middle-of-the-road texture.

Why the detector cares

Detectors don’t read for meaning the way you do. Most lean on statistical signals, and the big two are perplexity and burstiness. Perplexity is roughly how surprised a model is by each word; predictable text has low perplexity. Burstiness is how much the sentence rhythm and surprise vary across a passage. Human writing tends to swing, with short punchy lines next to long meandering ones. Machine writing often hums along at one even pitch. If you want the full breakdown, we covered perplexity and burstiness in detail.

Here’s the connection. Sampling settings directly control how surprising the model’s word choices are. Low temperature means the model keeps picking its most-expected word, which produces text with consistently low perplexity. That’s the exact signature many detectors associate with machine writing. Push the temperature up and word choices get less predictable, perplexity rises, and the text starts to look statistically more like something a person might have written. Top-p does a similar thing from the other direction by allowing or forbidding the surprising tail.

So when two drafts of the same prompt get different scores, sampling is often part of the story. Same model, same instructions, different dice.

A concrete mini-scenario

Picture a student asking a model to write an intro paragraph about photosynthesis, run three ways.

Temperature 0.2, top-p 0.5. The output reads: “Photosynthesis is the process by which plants convert light energy into chemical energy. This process is essential for life on Earth. It occurs in the chloroplasts of plant cells.” Clean, correct, and deadly flat. Every word is the most probable choice. A detector sees uniformly low perplexity and almost no burstiness, and the probability of “AI” climbs.

Temperature 0.9, top-p 0.9. Now you get: “Plants pull off a quiet trick. Using sunlight, they stitch together sugars from little more than air and water, mostly inside tiny green compartments called chloroplasts.” More varied rhythm, a couple of less-obvious word choices, a short sentence next to a long one. The statistical signature is messier, closer to human, and a detector may be less confident.

Temperature 1.6, top-p 1.0. Cranked too far, you might see: “Plants, those verdant alchemists, conjure sustenance from photons whilst water cavorts through emerald vesicles.” Now it’s high-perplexity, sure, but it’s also overwrought and slightly absurd. High surprise isn’t the same as good writing, and a reader (or a careful detector) notices the difference.

That middle setting is where text tends to look most natural. But notice what didn’t change across all three: the ideas, the organization, the slight hedging tone. Sampling reshuffles word choices. It doesn’t give the writing a point of view.

What sampling can’t do

This is where it’s worth being honest. Tweaking temperature and top-p moves the statistical needle, but it doesn’t transform machine text into something a person actually wrote. A few hard limits:

  • It can’t add real specificity. A model at high temperature still doesn’t know which professor said what in your lecture, or the exact number from your dataset. It just picks rarer words for the same generic claims.
  • It can’t fix structure. The predictable paragraph-per-point scaffolding, the tidy three-item lists, the even pacing across sections all survive a temperature change.
  • It can break things. Push too high and you get factual errors, dropped logic, and word salad. The text might fool a perplexity metric while failing the most important test, which is a human reading it.
  • You probably can’t access it anyway. In the standard ChatGPT or Claude chat box, you don’t get a temperature slider. These controls live in APIs and developer playgrounds. For most writers, this is background knowledge that explains detector behavior, not a dial you’ll be turning.

There’s also a deeper reason chasing settings is a losing game. Detectors are probabilistic. They output a likelihood, not proof, and they get less reliable on short text, on edited text, and on writing from non-native English speakers. A 2023 study by Liang and colleagues at Stanford found that GPT detectors misclassified more than half of a set of TOEFL essays by non-native writers as AI-generated, while flagging native-writer essays far less often. And OpenAI quietly shut down its own AI-text classifier in July 2023, citing its low rate of accuracy. If the tools themselves are this shaky, gaming one input to them isn’t a strategy. It’s a coin flip you don’t control.

The practical takeaway

If you write with AI and care about how it reads, the useful lesson from sampling isn’t “find the magic temperature.” It’s that predictable, low-variety text is the AI tell, and that’s something you fix by editing, not by tuning a knob you may not even have.

The qualities that high temperature gestures at, varied rhythm, surprising-but-apt word choices, uneven pacing, are exactly the things a human editor adds naturally. You bring the specific example, the aside, the short sentence that lands. That does far more for how text reads than any sampling parameter, and it holds up whether or not a detector is involved. For more on the machinery behind all this, there’s more on how detection works in our archive.

Frequently asked questions

Does turning up the temperature make AI text undetectable?

No. Higher temperature adds variety to word choice, which can raise perplexity and make text look less predictable to a detector. But it doesn’t rewrite the underlying structure, and crank it too high and the text gets weird or wrong. It shifts probabilities, it doesn’t guarantee anything.

What’s the difference between temperature and top-p?

Temperature reshapes the whole probability curve, making likely words more or less dominant. Top-p (nucleus sampling) instead trims the candidate pool to the smallest set of words whose combined probability crosses a threshold, then samples from that set. They’re often used together.

If I’m just using ChatGPT, can I even change these settings?

Usually not in the standard chat box. Temperature and top-p are exposed through APIs and developer playgrounds, not the consumer chat interface, which uses fixed defaults. So for most writers this is background knowledge, not a control panel.

Why does low-temperature text often look more AI to detectors?

Low temperature pushes the model toward its single most probable next word over and over. That produces flat, low-perplexity text with little burstiness, which is exactly the statistical signature many detectors associate with machine writing.

Can I tell what sampling settings a piece of text used just by reading it?

Not reliably. You can sometimes guess that very repetitive, hedge-heavy text came from conservative settings, or that incoherent text came from extreme ones. But editing, prompting, and the model itself all affect the output too, so it’s never a clean read.

Closing

Temperature and top-p are a neat window into why detectors behave the way they do, but they’re not a lever for sounding human. The variety they hint at is something you add by writing with intent, with real detail and a real voice. Want to see how your own draft scores and which lines fall flat? Try PaperBleach and find out.

Try it on your own text

Paste your draft into PaperBleach to humanize AI text so it reads naturally — then check your score against built-in AI detection. Free on your first run.