An AI text generator writes by predicting one token (a word or word fragment) at a time, then choosing among the likeliest candidates. The choice rule, called decoding, changes the output even when the model is identical: in a 2019 study, always taking the single likeliest token (greedy decoding) produced text with 73.66 percent repetition, against 0.28 percent for human writing. The settings known as temperature and top-p control how much variety the generator allows.
Key takeaways
- A language model outputs a probability for every possible next token. A separate decoding step picks one.
- Lower temperature makes the likeliest token more dominant. Higher temperature spreads probability toward unlikely tokens.
- Top-p (nucleus) sampling keeps the smallest set of tokens whose probabilities add up to at least p, then samples only from that set.
- Generators predict likely wording and do not look facts up, so Google's search guidance tells publishers to fact-check AI-generated content before publishing.
- Using AI to produce many pages without adding value to readers may violate Google's scaled content abuse policy.
From probabilities to a sentence
Modern text generators are built on the transformer, a neural network design introduced in the 2017 paper "Attention Is All You Need" by Ashish Vaswani and seven co-authors. Given the text so far, the network assigns a probability to every token in its vocabulary. The generator picks one token, appends it, and repeats until the answer is complete. Everything a reader sees is the result of many such small picks in a row.
Because each pick depends on the previous ones, an early odd choice can steer the rest of a passage. This is why the same prompt can produce different answers on different runs, and why a fixed procedure for choosing the token matters.
Why always choosing the likeliest token fails
The obvious rule is to pick the highest-probability token every time. The paper The Curious Case of Neural Text Degeneration by Ari Holtzman, Jan Buys, Li Du, Maxwell Forbes, and Yejin Choi, presented at ICLR 2020, tested this. Greedy decoding gave 73.66 percent repetition, and beam search with 16 beams gave 28.94 percent, compared with 0.28 percent for human text. The authors found that text from the most probable path is bland and loops, because human writing does not stay in the highest-probability zone. Their conclusion was that the decoding strategy alone can change quality a great deal even with the same model.
Temperature and top-p, with a worked example
Temperature rescales the probabilities before the pick. The example below is illustrative: the next-word probabilities for "The sky is" are invented to show the mechanics, and are not taken from a real model. Each probability is raised to the power 1/T and the results are renormalized to add up to 100 percent.
| Next word | Base (T = 1) | T = 0.5 | T = 1.5 |
|---|---|---|---|
| blue | 60.0% | 86.7% | 46.2% |
| clear | 20.0% | 9.6% | 22.2% |
| falling | 10.0% | 2.4% | 14.0% |
| gray | 6.0% | 0.9% | 10.0% |
| purple | 4.0% | 0.4% | 7.6% |
At T = 0.5 the top word nearly takes over, so output is steadier and more repetitive. At T = 1.5 the unlikely words gain share, so output is more varied and more error-prone.
Top-p works differently. With p = 0.9, the generator adds words from most to least likely until the total reaches at least 90 percent: blue (60), clear (80), and falling (90). Gray and purple are dropped, and the remaining three are rescaled to about 66.7, 22.2, and 11.1 percent. The Holtzman paper used p = 0.95 and reported the highest score on its human-evaluation measure among the methods it compared. It also explained why a fixed cutoff of k tokens is weaker: the number of sensible candidates changes from one position to the next, and top-p adjusts to it.
What the generator does not do
A text generator predicts plausible wording. It does not consult a database of verified facts unless the product adds a search or document lookup step. Google's page on generative AI content in Search, last updated October 1, 2026, states that such models predict likely word sequences and may produce hallucinations, and advises publishers to manually fact-check and review all AI-generated content for accuracy and trustworthiness before publishing. The same page says generative AI can be useful when researching a topic and adding structure to original content, and it applies the same review to titles, meta descriptions, structured data, and image alt text.
Content-creation checks before publishing
- Check every name, date, number, and quotation against a primary source.
- Rewrite passages that sound plausible but cannot be traced to a source.
- Add something a reader cannot get from a generic draft: original data, firsthand experience, or local detail.
- Review the title, description, and alt text, not only the body.
- Consider telling readers how the content was made. Google suggests explaining how automation was used.
- Avoid producing large numbers of near-identical pages. Google's policy on scaled content abuse covers pages made at volume without added value.
FAQ
What does temperature do in an AI text generator?
It rescales the next-token probabilities. A low value favors the likeliest word and yields steadier text. A high value lets less likely words through and yields more variety and more mistakes.
What is the difference between temperature and top-p?
Temperature changes the shape of the whole distribution. Top-p cuts off the unlikely tail and samples from what remains. Many tools offer both, and they can be combined.
Does a low temperature make the answers true?
No. It makes the output more predictable, not more accurate. A generator can repeat the same wrong claim every time at low temperature.
Is AI-written content banned from search results?
Google's guidance says AI content is not barred in itself. Content must meet its spam policies and Search Essentials, and mass production without added value may violate the scaled content abuse policy.
Related reading
- What the GPT-3 paper described
- Copyright questions for AI-generated content
- How GPT-based chatbots work
- Google's LaMDA language model
More in AI Basics.
Last verified: October 2026
Sources
- The Curious Case of Neural Text Degeneration, Holtzman et al., ICLR 2020 (arXiv:1904.09751)
- Attention Is All You Need, Vaswani et al., arXiv:1706.03762, 2017
- Google Search Central, Google Search's guidance about using generative AI content, updated October 1, 2026