Large Language Models (LLMs) like GPT, Claude and Gemini power modern AI assistants. Understanding how they work is the key to using them well.
Anatomy of an LLM
Tokens, context, temperature and hallucination.
Tap or hover a part to learn more.
Text in pieces.
LLMs break text into tokens (words or word-pieces) and predict the next token repeatedly. Everything an LLM does is next-token prediction at scale.
Check your understanding
1. What is the context window?
2. Why do LLMs hallucinate?
Keep learning
How LLMs work
- Tokens — LLMs break text into tokens (word pieces) and predict the next one, over and over.
- Training vs inference — trained once on huge datasets; inference is when you use the model.
- Context window — the amount of text the model can consider at once; exceed it and earlier content is forgotten.
- Temperature — controls randomness/creativity of output.
- Hallucination — LLMs can confidently state false things, because they predict plausible text, not truth. Ground them with RAG and verify outputs.
This foundation makes prompt engineering and agents make sense.
