Today's menu
LLM Kitchen
How a large language model works, one idea at a time. Start with guessing the next word, build up to an agent that uses tools, and finish with other kinds of models made from the same pieces.
Start with Ch 0 →Part I Prediction
Part II Representation
Part III Learning
- A neuron Ch 6
- Learning from mistakes Ch 7
Part IV Context
- The context problem Ch 8
- Attention Ch 9
- The transformer block Ch 10
Part V Putting it together
- Generating text Ch 11
- Scale Ch 12
- Fewer bits per number Ch 13
- Guessing ahead Ch 14
- From predictor to assistant Ch 15
- Quirks and limits Ch 16
- Thinking before answering Ch 17
Part VI Prompt engineering
Part VII Harnesses
- The model is not the product Ch 23
- Managing the context Ch 24
- Search and memory Ch 25
- Caching: reusing the work Ch 26
- Which model answers? Ch 27
Part VIII Agents
- Tools Ch 28
- The agent loop Ch 29
- Designing an agent Ch 30
- Splitting the work Ch 31
Part IX Safety
- Making things up Ch 32
- Prompt injection Ch 33
- Trust and guardrails Ch 34
- Did it work? Ch 35
Part X Other kinds of models
- Reading both ways Ch 36
- Many experts Ch 37
- Remembering without attention Ch 38
- Seeing pictures Ch 39
- Painting from noise Ch 40
- Choosing actions Ch 41
Wrap-up
- Recap: the whole picture Ch 42
- From message to reply Ch 43
- Is a model the right tool? Ch 44
- Picking a model Ch 45
- Check yourself Ch 46