Stage 1 · Lesson 1 of 6
How a language model writes code
Every AI coding tool sits on a (LLM): a program trained on huge amounts of text and public code that predicts the next small chunk of text, called a , from everything before it. It does not look anything up or run your code unless the tool actually runs a command or reads a file.
That is why it is excellent at code that looks like code it has seen many times, and confidently wrong on unusual problems, your private business rules or library versions released after it was trained. Once you see it as a very well-read predictor rather than a colleague who checked the facts, its strengths and mistakes both make sense.
Common trapbelieving the model tested or verified something when it only predicted what a correct answer usually looks like.
A question to check yourself, an AI practice session and 1 cheat sheet entry come when you add the roadmap to your account. Add it
Resources for this stage
Start with· follow one of these
- VideoFreeDeep Dive into Large Language Models like ChatGPT
Andrej Karpathy · Intermediate
A clear, free explanation of how language models are trained and why they hallucinate; watch the first hour
- CourseFreeClaude Code 101
Anthropic · Beginner
Anthropic's free starter course: what an agent is, the agentic loop, context and permissions