Why does the format of your prompt change how an LLM answers?
Even when a prompt's meaning stays the same, small changes in formatting — headers, bullet points, JSON wrappers — can meaningfully shift an LLM's output. This is called prompt sensitivity.
The reason comes down to how LLMs work: they predict the next token based on every token before it. A formatting change alters the statistical context, shifting the probability distribution over what comes next. The model isn't just reading meaning — it's pattern-matching against its training distribution, where different formats co-occurred with different kinds of responses.
This matters in production. A system that behaves differently based on whether you use a colon or a newline is fragile. Researchers measure this with a format sensitivity index — a score for how stable a model's answers are across equivalent but differently-formatted prompts.