An LLM doesn't "know" language. At every step it just asks: given what came before, which word comes next? Everything else — chatting, coding, refusing — is this one trick, run token by token, at a scale that makes it look like understanding.
The simplest possible language model looks at the last word and counts what word followed it, every time that word appeared in training text. Ask for the next word, and it hands back whichever follower showed up most often.
Real LLMs replace "last word" with attention over the entire prior context (the next level) and "counts" with billions of learned weights — but the question being answered is identical. Change what the model was trained on, and you change what it thinks comes next. The data is the prediction.
Prompt: "the cat sat on the ___". Check the sentences you want in the training set. The bars show what the model predicts comes after the, counted straight from the text you chose. Get mat on top with over 50%.
You just moved a prediction by choosing which sentences counted. A real model is trained on scraped web text nobody hand-picked — which means anyone who can get a phrase repeated across enough pages gets a vote in what the model predicts next.
A support bot was trained on scraped help pages. Prompt: "...resetting your password, visit ___". Right now it correctly predicts the real support link. Below are scam pages already crawled by the scraper, waiting to be counted. Check at least two to flip the top prediction to the scam domain.
What just happened: nobody touched the model's weights or the support bot's code. A handful of near-duplicate pages, crawled like any other page, was enough to outvote the real answer — because a next-token model only knows what it counted.
Why it works: training data is a vote, and nothing weighs a vote by truth — only by frequency. Carlini et al. ("Poisoning Web-Scale Training Datasets is Practical", 2023) showed that a surprisingly small, cheap set of edits to widely-scraped sources (even a few hundred pages, or well-timed edits to pages known to be re-crawled) is enough to influence what large models learn, because of exactly this counting mechanism.
The fix: dedupe and weight sources by trust and diversity, not raw frequency; filter or down-rank near-duplicate text; and for anything safety-critical (like where to send a password reset), never let free-text generation pick the destination — retrieve it from a verified source instead. Also: a bigram only remembers the last word, which is exactly why it's this easy to push around. The next level gives the model the whole sentence to look at — see whether that's actually harder to poison.