Should the system prompt remain identical across all turns of a conversation, or vary per turn?
Keep the system prompt stable across turns to enable prompt caching and consistent behavior; put per-turn dynamic data in the user message, not the system block.
Think of the system prompt as the standing instructions you give to a new employee on day one: who they are, what they do, how they should behave. You do not rewrite the job description every time they answer a customer call. You let the standing instructions stay put and the customer-specific details show up in each conversation. Language models work the same way. The system message is the standing instructions; user messages are the per-call details. Rewriting the standing instructions every turn confuses the model and throws away a big cache discount the provider gives you for keeping prefixes stable.
Detailed answer & concept explanation~5 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 min: the two reasons system stability matters (caching + behavior consistency), where dynamic data belongs, and how to handle mid-conversation mode shifts.
Real products, models, and research that use this idea.
- Anthropic prompt caching offers about 90 percent off cached input tokens; production multi-turn routes lean on a stable system block to capture that discount.
- OpenAI automatic prefix caching applies 50 percent off matching prefixes; the design assumption is exactly that the system block does not change per turn.
- Production support agents structure the system block as stable role and policy text and put the customer-specific context in each user message.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow does Anthropic prompt caching cost structure shape multi-turn prompt design?
QWhen does a mid-conversation mode shift justify mutating the system block?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Editing the system prompt every turn with dynamic context, which invalidates the provider cache and produces inconsistent behavior across the conversation.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.