Module 2 of 11

How LLMs Work

Lessons

About This Module

You don't need a research background to build with language models, but you do need a working mental model of what they are and why they behave the way they do. Most of the surprises you'll hit while building, such as odd spelling mistakes, forgotten instructions, and confident wrong answers, trace back to a few core ideas. This module gives you those ideas so you can design around them instead of being caught off guard.

It starts with a big-picture introduction to LLMs: what a model actually is and how it's trained. It then looks at tokens, the units a model reads and writes, and why they affect quality and cost. From there it covers the context window, the model's working memory and what happens when you run out of it, and finishes with hallucinations: why models state false things with confidence and what you can do about it.

Watch the lessons in order, then continue on to Prompt Engineering.

Lessons

4 videos
01

[1hr Talk] Intro to Large Language Models

A general-audience introduction to what a large language model is, how it is trained, what it can do, and the security challenges it faces.

02

Tokenization: The Cursed Trick that Unlocked LLMs

How text is broken into tokens before a model sees it, and why tokenization explains many LLM quirks and affects what you pay.

03

What is a Context Window? Unlocking LLM Secrets

The context window as a model's working memory: what fills it, how tokens relate to it, and what happens when a conversation exceeds it.

04

Why Large Language Models Hallucinate

What hallucinations are, the common causes behind them, and practical techniques like clear prompts and multi-shot prompting to reduce them.