Chapter 3 of 5
Stateless calls and conversation history
A model call is stateless: the provider keeps nothing between calls, and the model begins each one with only what the request contains. A chat that appears to remember is a client re-sending the whole transcript every turn, tagged with who said what. This chapter builds that client in ten lines, works out the arithmetic that makes turn 30 cost sixteen times turn 1, explains what prompt caching does and does not change, and lists the three categories of fact a model cannot know unless the request says so.
What a language model is — read the current version at https://daviddominguez.dev/learn/en/what-a-language-model-is/stateless-llm-requests