Multi-Turn Conversations

Conversation history

Part of: Chat Roles & Messages

You tell a chatbot "my name is Sam." Five messages later it still calls you Sam, so it clearly remembers, right? Wrong. The model forgot you the instant it finished replying. The app remembered. Every single turn, it quietly resends the entire conversation so far. Understanding this trick is the difference between using chat and building chat. What it is A multi-turn conversation is back-and-forth: user, assistant, user, assistant. But the model is stateless : from the prediction lessons, it keeps nothing between requests. So how does turn five know about turn one? The answer: the app stores the conversation history : the full list of messages, and resends all of it on every request. Each turn isn't "continue where we left off." It's a brand-new prediction over the whole transcript, including the model's own past replies. How it works The crucial insight is that assistant messages become part of the input . When the model replies, the app appends that reply to the history, then on the next user turn sends everything: The list grows every turn: append the user's new message, send everything, get a reply, append the reply, repeat. The model never "remembers", the list carries the mem

Challenge: Context-Window Budgeter