Free course · 9 lessons · 35–45 min

How LLMs actually work

What happens between pressing send and reading the reply.

What you’ll learn

Explain in plain words how a language model turns your message into a reply, how it was trained, and why it is sometimes confidently wrong.

Before you start

You've used a chatbot like ChatGPT or Claude. No math or programming is needed.

Course outline

  1. Chapter 1

    Words in, words out

    What a language model does when it answers you, and what it actually sees when you type.

    1. One word at a timeA reply is built by predicting the next piece of text, over and over, with a roll of weighted dice.3 min
    2. Tokens, not wordsText is chopped into chunks and swapped for numbers before the model ever sees it.3 min
    3. Meaning as a directionEach token becomes a point in a huge space, where nearby points and shared directions carry meaning.3 min
  2. Chapter 2

    How it's built

    The design inside the model, the training run that fills it with knowledge, and the tuning that turns it into an assistant.

    1. Attention: words looking at wordsHow each token pulls in information from the words before it, layer after layer.3 min
    2. Learning from a mountain of textBillions of random numbers become a model by guessing the next token trillions of times.3 min
    3. From text predictor to assistantExample conversations and human preferences teach a base model to answer instead of ramble.3 min
  3. Chapter 3

    Limits and open questions

    Why models make things up, how tools and search help, and what researchers still can't explain.

    1. Why it makes things upBlurry knowledge in the weights, exact knowledge in the context window, and what happens in between.3 min
    2. Tools, search, and agentsA model that can only write text can still search, calculate, and act, by asking software to do it.3 min
    3. What nobody knows yetThe open problems: reading a model's insides, sudden abilities, and what understanding means here.3 min

Where people go next

Questions this course tends to raise. In Learnfold, any of them becomes a course of its own.

  • How attention works, with real numbers
  • Writing prompts that get good answers
  • How AI agents plan and use tools
  • What interpretability has found inside models

Get Learnfold

Learnfold is free on the App Store for iPhone, and this course is free to read in it.

  1. Get the app. Tapping the App Store button also copies this course’s link to your clipboard.
  2. Open Learnfold and tap Paste on the first screen to start with this course.
Download on the App StoreDownload on the App Store

Scan with your iPhone camera to open this course there. If Learnfold is installed it opens straight in the app.

Or send yourself the link:

Or see Learnfold on the App Store