How Large Language Models Actually Work
A large language model is, at its core, a prediction engine. It’s software that was trained on a massive corpus of text — books, websites, articles, code, forums, encyclopedias — and learned statistical patterns in how language works. It does not understand content. It does not retrieve facts from a database. It assembles statistically likely sequences of text, one piece at a time.
The basic unit isn’t even a word. LLMs process tokens — subword pieces. The word “understanding” becomes three tokens: “under,” “stand,” “ing.” This is why models can handle misspellings and new words, but it also means the model never “reads” your text the way you do. It processes numerical sequences. Everything an LLM does is one operation repeated: read all tokens so far, calculate the probability of every possible next token, select one, add it to the sequence, and repeat.
The output looks intelligent because the patterns were learned from trillions of words of human-written text. The sophistication is inherited, not generated. There is no reasoning engine, no comprehension module. The breakthrough that makes it feel coherent is the attention mechanism — when predicting the next word, the model weighs which previous words in the passage matter most, tracking relationships across the entire input rather than just the word immediately before.
Three technical concepts come up often. Temperature controls randomness — low temperature produces predictable, conservative responses; high temperature produces creative, varied, riskier ones. Context window is how much text the model can “see” at once, measured in tokens, ranging from thousands to millions. Fine-tuning is specializing a general model for a particular task — ChatGPT is a fine-tuned version of GPT, optimized for conversation. The base model is a general text predictor; the product you use has been shaped on top of that.
The practical takeaway: AI, without tools, is the most confident liar you’ll ever meet. It doesn’t browse the internet. It produces text from patterns learned during training. When it generates a citation, the output reads like a real citation because the model has seen thousands of them — not because it looked one up. This is hallucination, and it’s a feature of the architecture, not a bug to be patched. AI detection tools work the same way — statistical patterns, not reading for meaning.