aifree.dev

Why can’t it write exactly 100 words?

Length control in LLMs: tokens are not words, and nothing counts while it writes · Beginner · 5 min · tokens, llm · after Next-token prediction

A language model writes tokens, not words, one at a time, with no running word count. It ends the answer when the length feels right, so a request for 100 words lands near 100, rarely on it.

Before you start: could you explain this to a friend?

1 = not at all · 5 = easily

  1. 1 Guess first

    In a 2024 test, GPT-4 Turbo got 802 requests that began “Answer the following instruction using N words or less.” How often did its answer go over the limit?
  2. 2 Look

    Words in, tokens seen, limits missed

    1 / 3

    You see: “We are met on a great battle-field of that war.”

    The model sees:

    Wearemetonagreatbattle-fieldofthatwar.

    10 words · 12 tokens · no word counter anywhere

    Tokens measured with o200k_base (GPT-4o), tiktoken 0.14.0, 2026-10-23

    It reads and writes tokens: “battle-field” is two, the full stop is one. Words exist only in your counter.

    The model never sees words, only tokens, and it stops when the answer feels long enough.

  3. A tokenizer cuts text into pieces that don’t match words, and the model writes one next token at a time. Nothing keeps a running word count: to hit 100 it has to sense, from the tokens so far, roughly where it is, and pick the end at the right moment. It lands near, rarely on.

  4. 4 You are the model

    You are the model. You see your text as token chips, not words. Say how many words each one makes.

    text 1 of 3 · all you see is chips (· = a space). How many words?

    Thecatsatonthewarmmatbythedoor.

    Illustrative sentences; tokens measured with o200k_base (GPT-4o), tiktoken 0.14.0, 2026-10-23

    You are the model. You see chips, not words. Count the words.
  5. 5 Check

    In the picture, how many tokens did the first 100 words of the Gettysburg Address take?
  6. To get closer, ask for a range (“90 to 110 words”) or a shape (“5 sentences of about 20 words”): smaller things to keep track of. Reasoning models do better; a 2025 benchmark of 26 models found them best at following lengths. For an exact count, use a word counter and ask it to trim.

  7. 7 Say it back

  8. 8 Mission · 5 min

    In ChatGPT Free, send “Write exactly 100 words about the sea.” Paste the answer into a word counter (a doc’s word count works). Then, in a new chat, send “Write 5 numbered sentences of exactly 20 words each about the sea.” Count again. Which came closer to 100, and by how many words?

Three quick ones

Drawn at random from this lesson's pool; different next time.

Done?

Now: could you explain this to a friend?

1 = not at all · 5 = easily

Answer the three quick ones first.

Get an email when new lessons come out

New lessons arrive in the weekly digest, only in a week that has one. You confirm by email first; unsubscribe in one click.

Sources

  • Tokens measured with OpenAI’s tiktoken 0.14.0, o200k_base (GPT-4o), on 2026-10-23; words = runs of text between spaces. “We are met on a great battle-field of that war.” = 10 words, 12 tokens (We| are| met| on| a| great| battle|-field| of| that| war|.). First 100 words of the Gettysburg Address = 112 tokens; first 100 words of the Declaration of Independence = 117 tokens; “Our state-of-the-art e-bike costs $1,299.99 (incl. VAT) in 2026.” = 9 words, 24 tokens. Role sentences: 10 words 11 tokens, 7 words 12 tokens, 9 words 24 tokens
  • Texts: Gettysburg Address, Bliss copy (https://www.abrahamlincolnonline.org/lincoln/speeches/gettysburg.htm, checked 2026-10-23); Declaration of Independence transcript, US National Archives (https://www.archives.gov/founding-docs/declaration-transcript, checked 2026-10-23). The product line and the role sentences are illustrative
  • Yuan et al., “Following Length Constraints in Instructions” (arXiv:2406.17744, v1 2024-06-25, https://arxiv.org/abs/2406.17744, checked 2026-10-23). Table 2, AlpacaEval-LI (802 prompts, template “Answer the following instruction using <MAX_LEN> words or less.”, MAX_LEN = the shortest of three strong models’ answers, words counted with NLTK excluding punctuation), share of answers over the limit: GPT-4 Turbo (gpt-4-turbo-2024-04-09) 49.3%, GPT-4o (2024-05-13) 39.0%, Claude 3 Opus 37.0%, Llama 3 70B Instruct 10.2%
  • Zhang et al., “LIFEBench: Evaluating Length Instruction Following in Large Language Models” (arXiv:2505.16234, v2 2025-06-11, https://arxiv.org/abs/2505.16234, checked 2026-10-23): 10,800 instances, lengths 16 to 8192 words, 26 models; most follow short lengths but deteriorate sharply beyond a threshold; reasoning LLMs achieve state-of-the-art length following
  • aifree.dev catalog, chatgpt-free (verified 2026-10-12): free text chats on chatgpt.com
  • Tokens per word in the text, from the counts above: 24 ÷ 9 = 2.67 (the product line), 112 ÷ 100 = 1.12 (Gettysburg), 117 ÷ 100 = 1.17 (Declaration). The 87-word reply and the “90 to 110 words” range are illustrative examples
  • https://docs.x.com/fundamentals/counting-characters (X developer docs, checked 2026-10-26): “Posts on X can contain up to 280 characters”; emoji and CJK characters count 2, every link 23

Published Oct 23, 2026 · updated Oct 26, 2026

Embed this

Paste this into a blog post or course page: the lesson's main picture in an iframe, with a link back to the full lesson.

<iframe src="https://aifree.dev/embed/explain/word-count" width="100%" height="620" style="border:0;max-width:720px" title="Why can’t it write exactly 100 words? (aifree.dev Explain)" loading="lazy"></iframe>
<p><a href="https://aifree.dev/explain/word-count">Why can’t it write exactly 100 words? Interactive lesson on aifree.dev</a></p>

Never miss new offers and news

New tools, credits, and AI news are added regularly. Pick how you want to hear about them.

Telegram channel
Join @aifree_dev and get new free AI offers and news right in your Telegram feed.
Browser notifications
Turn on push notifications and get an alert on this device whenever something new is posted. No account needed.
Email newsletter
A weekly digest of new, changed and expiring free AI offers. Double opt-in, one-click unsubscribe. See the latest issue.

Unsubscribe anytime. Privacy

Frequently asked questions

What is aifree.dev?

aifree.dev helps everyone access AI through a curated directory of free AI tools, API credits, free tiers, and startup programs for coding, image, voice, video, and students - verified regularly.

How are offers presented?

Each offer includes its access details, free models when available, and expiration information when provided. Limited-time deals stay visible so they are easy to compare.

Do education and startup programs need verification?

Yes. Providers usually ask students to verify their status with a school email, student ID, or a program like the GitHub Student Pack, and ask startups to verify company details such as age, funding, or website. Check each offer’s claim page for the exact requirements.

What kinds of free AI offers are listed?

Free tiers and free trials from AI providers, free API credits, startup and student programs, and free tools for coding, image generation, voice, and video.

How can I suggest a tool or report a broken link?

Use the submit form: paste the offer page URL and a short note. A person checks every submission before anything is listed. Broken links and changed terms go through the same form.

+

Know a good one?

Tell us about an AI tool worth knowing. Found a broken link? We want to hear that too.

Submit an offer