Courses/Working with AI Effectively/Under the Hood: How Large Language Models Really Work
โš™๏ธ
Working with AI Effectively

Under the Hood: How Large Language Models Really Work

Demystify the technology behind ChatGPT, Claude, and Gemini. Understanding how these systems work changes how you use them.

12 minยท4 sectionsยท3 quiz questions

You're Talking to a Very Sophisticated Autocomplete

When you send a message to an AI chatbot, here is what literally happens: your text is broken into tokens (roughly word fragments), each token is converted into a number, those numbers pass through billions of mathematical transformations called attention layers, and the system outputs the probability of every possible next token. It picks from those probabilities and adds the next word โ€” then repeats this process, one token at a time, until it decides to stop. There is no reasoning step. No planning step. No 'thinking' step. The model is not looking up facts in a database. It is generating text that is statistically likely to follow your prompt, based on patterns from its training data. This is why the output can sound brilliant and be completely wrong at the same time.

LLMs predict the next token. They do not look up facts, reason through problems, or 'understand' your words the way a human does.

Key Takeaways

  • โœ“LLMs predict text statistically โ€” they do not reason, look up facts, or 'think' like humans
  • โœ“Hallucinations are an inherent property of how these models work, not a fixable bug
  • โœ“Training data cutoffs mean the model can be wrong about anything that has changed recently
  • โœ“Temperature controls randomness โ€” the same prompt can yield different results each time
  • โœ“Fine-tuning shapes behavior but does not add factual knowledge to the model