Stage 02 · 11 articles
Context & Caching
What goes into the context window, what it costs, and how to stop paying for the same tokens twice.
Context window: what fits, what it costs, when bigger hurts
Context & Caching11 min read
LoRA and QLoRA: fine-tuning a model on one GPU
Context & Caching13 min read
Embedding models: how to pick one for retrieval
Context & Caching16 min read
What is a token in AI? How models count and bill them
Context & Caching13 min read
Chunking strategies for RAG: size, overlap, and when to skip
Context & Caching14 min read
RAG vs fine-tuning: which one fixes which problem
Context & Caching14 min read
Prompt caching: how it works and what it saves
Context & Caching10 min read
Semantic caching: when it saves money and when it is wrong
Context & Caching10 min read
KV cache explained: memory math, paging, and prefix reuse
Context & Caching13 min read
Context engineering: what to put in the window and where
Context & Caching10 min read
Context rot: why long prompts make models worse
Context & Caching9 min read
About this stage
The context window is the token limit that one model call shares between its input and its output, and every token in it is billed. This stage covers what to put in the window, how to keep it small, and how caching stops you paying for the same tokens twice.
Start with tokens and the window itself, then context engineering and context rot, which explain why a longer prompt can make answers worse. The caching articles separate prompt caching, which the provider applies to a repeated prefix, from semantic caching, which you run yourself and which can return a wrong answer. Retrieval belongs here as well: chunking, embedding models, and whether RAG or fine-tuning fixes the problem in front of you.
Start here
- 01What is a token in AI? How models count and bill themWhy counts differ by model and language, and how to count first.
- 02Context window: what fits, what it costs, when bigger hurtsWindow sizes today, and what a long input costs.
- 03Context engineering: what to put in the window and whereHow to budget the window and order it for caching.
- 04Prompt caching: how it works and what it savesRepeated prefixes billed at a fraction of the price, if they never change.