📄️ Tokens and Tokenization
Tokens are the fundamental unit that language models operate on. Everything you send to a model and everything it sends back is measured in tokens.
📄️ Temperature and Sampling
Language models don't retrieve pre-written answers. They generate text one token at a time, choosing each token based on a probability distribution. The parameters that control how the model makes these choices (temperature, top-p, and top-k) directly affect the quality and consistency of the code you get back.
📄️ Context Window
The context window is the total amount of text (measured in tokens) that a language model can process in a single request. It includes everything: your input, the model's previous responses, system instructions, and any other context. Think of it as the model's working memory, everything it can "see" when generating a response.
📄️ System Prompts and Roles
Every message you send to a language model has a role attached to it. These roles are system, user, and assistant. These roles tell the model how to interpret each piece of the conversation. Understanding this structure is essential for getting reliable results from AI coding tools, and it's the foundation of how tools like Claude Code and Cursor work behind the scenes.
📄️ Tool Use and Agentic Coding
Language models can generate text, but they can't read files, run tests, or execute commands on their own. Tool use is the mechanism that bridges this gap an AI that can autonomously complete multi-step software engineering tasks.