See How A Language Model Writes, One Piece At A Time

You do not need an account, an API key or any prior experience. FirstPrompt is a transparent simulator with four hands on lessons. Every number you see is computed in your browser from a table you could read yourself.

Start Lesson One

No sign in. No network calls. Nothing leaves this page.

4 Interactive Lessons
0 Network Calls, Ever
42 Automated Tests Behind The Math

Words Become Tokens

A model never sees your words. It sees tokens, small pieces of text, and every token costs money. Type below and watch the pieces, the count and the bill move together.

0 Tokens
0 Characters
$0 Estimated Cost

Many small models charge around 10 cents for a million tokens, which is 0.0000001 dollars for one token. Change it and the estimate follows.

    Whole Word Subword Piece Punctuation

    This tokenizer follows fixed hand written rules, so common words stay whole and longer words split. Real tokenizers learn their pieces from huge text corpora and usually count spaces too, so treat these counts as a shape, not a quote.

    One Word At A Time

    A model holds odds for every word that could come next, then draws one. Temperature reshapes those odds before the draw and top k trims the menu. Drag the dial and watch the same table turn predictable or adventurous.

    Temperature Dial A gauge from 0 to 2. Low values are predictable, high values are adventurous. The needle follows the temperature slider. 0 0.5 1 1.5 2 Predictable Balanced Adventurous
    0.8
    8
    At 8 the menu keeps every word in this small table.

    Next Word Odds

    Simulated odds for the word after the highlighted context, reshaped by your settings.

      Pick A Starting Phrase

      Same seed, same draws, every time.

        Why low settings feel robotic. Near zero, the model nearly always picks its favorite word, so the same phrase repeats. Near one it balances surprise and sense. Past 1.5 the tail words get loud and grammar starts to wobble. Real settings rarely leave the 0 to 1.5 range.

        The Context Window

        A model can only hold so much text at once, and long conversations overflow. Fill this window and compare three rescue strategies for deciding what survives.

        Real windows run from a few thousand to around a million tokens. These are tiny so you can watch one fill in a dozen clicks.

        If It Overflows, What Gets Dropped

          Three real strategies, honestly simplified. Recent First slides the window forward and drops the oldest block. Keep The Opener also pins your first question, which often holds the real task. Summarize The Middle trades a few tokens for a tiny stand in summary of what was cut. Production systems combine all three.

          Build Your First Prompt

          Good prompts usually carry four parts. Fill them in and the builder assembles a prompt you can copy anywhere, then explains why each part earns its place.

          Who the model should be. A role sets the tone and the vocabulary.
          The one job, stated as an action. Put it early so it anchors the rest.
          One rule per line. Each line fences the answer in.
          The shape of the output. Naming it saves a round of reformatting.

          Your Prompt

          
                      
          1. Role sets the voice. The same task reads differently from a teacher than from an editor.
          2. Task is the job. One clear sentence beats three vague ones.
          3. Constraints fence the answer. Each line removes one way to drift.
          4. Format hands the model a container, so the answer lands ready to use.
          0 Tokens In This Prompt