What is an LLM
A large language model predicts the next token, over and over. What that means, what it gets you, and your first API call to one in Python.
AI series 1 of 5. What an LLM is, how it is built, tokens, prompting and what you can do with one. Code is based on the official docs and output is marked as example output.
8 parts
A large language model predicts the next token, over and over. What that means, what it gets you, and your first API call to one in Python.
Transformers, attention, pretraining, fine-tuning and preference training (RLHF, DPO): the stages that turn a pile of text into a chat assistant.
What a token is, how to count tokens before you send a request, what fills the context window, and what happens when it runs out.
How the next token is picked, what temperature and top-p do, why current Claude models no longer accept them, and why models hallucinate.
The system prompt, clear instructions with a reason, few-shot examples, XML tags and long documents: the prompting techniques the official guide recommends.
Get JSON that always matches your schema with structured outputs and Pydantic, and show the answer while it is being written with streaming.
What thinking is, how adaptive thinking and the effort parameter control it, how to read thinking blocks, and what it costs.
Sending images and PDFs to a model, how image tokens are counted, what vision is still bad at, and what to do with audio.