Lorem Ipsum Generator Lab

Explore deterministic lorem generation, information-theory metrics (entropy/temperature), and how Markov context loops act as the direct ancestors of modern Large Language Models (LLMs).

Loading interactive simulation...

Your entropy slider is an LLM temperature dial 🖖

A Markov chain is the direct mathematical ancestor of modern Large Language Models (LLMs). Both operate under the exact same autoregressive next-token prediction loop. The generator looks at the preceding N words (context window) and selects the next word from a probability distribution. While a Markov chain does a simple lookup of exact matching phrases in a small corpus, an LLM uses billions of parameters (attention layers) to evaluate context and calculate probabilities. Furthermore, adjusting target entropy here directly corresponds to the Temperature parameter in LLM APIs: higher entropy creates creative and diverse text (high temperature), while lower entropy creates repetitive and predictable text (low temperature).

Why nonsense text makes better mockups 🖖

Placeholder text exists so you can judge a layout β€” spacing, font size, line breaks β€” without getting distracted by what the words actually say. Real copy tempts reviewers to rewrite sentences before the design is even settled. This lab goes one step further: the entropy and Zipf readouts let you check whether your filler mimics the word-frequency shape of real writing, so paragraphs wrap and break the way genuine content eventually will.

Lorem ipsum is mangled Cicero 🖖

'Lorem ipsum' isn't invented gibberish β€” it's scrambled Latin lifted from Cicero's ethics treatise De finibus bonorum et malorum, written in 45 BC. It even begins mid-word: Lorem is the tail of dolorem ('pain') with its first syllable sheared off. So the web's default filler is a 2,000-year-old meditation on pleasure and pain, garbled by early printers into a type specimen β€” and Markov mode lets you re-scramble what they first scrambled by hand.

Problem solved in full

  1. The target mismatch gap of 0.453 over 180 words 7 steps

    Classic mode, 180 words, seed spock, target entropy 6.2. The panel measures 5.747 bits per word and reports a target mismatch of 0.453. Work out how much of that gap the generator could ever close, and how much of it exists only because you counted 180 words rather than a million.

    1. Classic mode picks each word independently and uniformly from the distinct words of the source corpus. That corpus is 69 words long and 63 of them are different, so every draw is one chance in 63, which the trace prints as 1.6%.

    2. A uniform draw is the most unpredictable draw there is over a fixed alphabet, so log2 63 is a ceiling, not an average. The target of 6.2 sits above it. That much of the mismatch is a fact about the corpus and no seed, no re-roll and no word count can touch it.

    3. Now tally the passage the generator actually printed: 12 words occur once, 13 twice, 16 three times, 10 four times, 7 five times, 2 six times, and 1 word occurs 7 times. Two sums confirm the tally is complete β€” 61 distinct words, 180 tokens β€” and the first of them is the panel's second figure.

    4. Measured entropy is the plug-in estimate: take the observed frequencies and treat them as if they were the probabilities. Grouping words by how often they occurred collapses a 61-term sum into a 7-term one, because two words seen 3 times contribute identically.

    5. The words seen once contribute nothing at all, since 1 Γ— log2 1 = 0, so only 6 terms survive.

    6. Subtract, and it lands on the panel to the last printed digit.

    7. The remaining 0.230 bits sit between the measurement and the ceiling, and they are an artefact of counting: 2 of the 63 words never came up, and a plug-in estimate reads a ragged histogram as though it were the truth, which understates the entropy every time. Miller–Madow corrects that to first order using the number of word types actually observed.

    Answer

    5.747 bits per word, and the printed 0.453 is two unrelated things added together. 0.223 of it is a wall β€” the corpus supplies 63 words, log2 63 = 5.9773, and reaching 6.2 would need 26.2 = 73.5, so a vocabulary of at least 74 distinct words. The other 0.230 is not a property of the text but of the sample size, and the correction recovers it: 5.988 against a true ceiling of 5.9773, overshooting by 0.010. Even the sign of that overshoot is derivable β€” the generator builds 6 candidate passages and keeps whichever measures closest to the target, and since every candidate falls short of 6.2, keeping the closest means keeping the most uniform. The bias term falls as 1/N: at 1,800 words it is 0.025 bits, so a longer passage quietly fixes half the mismatch and leaves the other half exactly where it was.

References (2)

Example problems

  • balanced - Balanced placeholder text with moderate entropy and reproducible seed.
  • zipf-like - Zipf-like rank-frequency profile for natural-language style frequency decay.
  • markov chain - Markov-mode text with local sequence memory and higher variability.