Askpert
Menu
Get started
Evaluation

Why LLM prompt sensitivity makes model comparisons unreliable

Separators, casing and field order change nothing about what you asked, and can change the score enormously. That breaks prompt tuning, and it quietly breaks model comparisons run on one template.

Three coral cards holding identical green content but arranged differently, each feeding a navy gauge, with the three gauge needles pointing to visibly different positions.
On this page
Terms, definedthe jargon, decoded
Spurious feature
Something present in the input that affects the model but has no intended relationship to the task. Formatting is the clearest example.
Format spread
The gap between the best- and worst-scoring formatting variant of the same prompt on the same task.
Few-shot
Including a handful of worked examples in the prompt. Formatting effects are measured most sharply here, since layout governs the examples too.
Confounded comparison
A before/after test that changed two things at once, so the result cannot be attributed to either.
FormatSpread
The tool Sclar et al. built to search formatting variants and report the resulting spread.

Prompt evaluations treat formatting as inert. Engineers change separators, indentation, capitalization, whitespace, field order or the markers around answer choices, and assume only presentation moved.

It did not. Formatting is a spurious feature: present in the input, influential on the model, and unrelated to the task label by any intention of yours. Which means one prompt template is not an experimental control, and format is a variable rather than invisible plumbing.

What is prompt sensitivity?

The change in a model's measured behavior when semantically equivalent prompts differ in wording or formatting. Formatting sensitivity is the narrower case where separators, casing, spacing, field order or option markers change while the task content is identical, so the model is responding to a surface feature the evaluator never meant to test.

ProSA frames it as performance depending on prompt construction rather than on the underlying task alone. The mechanism is unglamorous: a prompt is both an instruction and a token sequence, and models process the sequence they actually receive, punctuation and layout included. A formatting change shifts token boundaries, local patterns, and the relationship between demonstrations and labels. What those demonstrations teach is its own inverted result: few-shot examples convey format and input distribution more than they convey answers. None of that alters the human reading of the task. All of it alters the computation.

How much can formatting change accuracy?

Up to 76 accuracy points, for LLaMA-2-13B in the few-shot experiments reported by Sclar, Choi, Tsvetkov and Suhr. That is task and model specific rather than a universal penalty, and it establishes something sharp: formatting can dominate the effect you are trying to measure.

The paper's more consequential finding is methodological. In their words, "format performance only weakly correlates between models, which puts into question the methodological validity of comparing models with an arbitrarily chosen, fixed prompt format." A format that favors one model is not evidence that the model is better at the task.

Evaluation setupWhat the score containsMain risk
Same content, one formatBehavior under one surface representationA lucky or hostile template is mistaken for capability
Content change plus layout changeContent effect and formatting effect togetherThe improvement is confounded
Several formats, one modelContent effect under a format distributionThe mean hides instability
Several formats, several modelsModel behavior plus format interactionThe ranking is conditional unless interaction is reported

The measured spread is the baseline that matters. A small difference between two systems means little when equivalent formatting variants produce a wider range for the same system on the same task.

Does format matter when the meaning is identical?

Yes, because semantic equivalence is not computational equivalence. Numbered options, bullets, XML-like tags, plain delimiters, extra spaces and different capitalization are different token sequences. A person treats them as interchangeable; the model is under no obligation to.

So reserve "the same prompt" for the exact serialized input, not for two prompts a human would read identically. That distinction also separates this from infrastructure nondeterminism: same prompt, different answers covers one exact prompt varying across runs, whereas this is a different prompt scoring differently while the intended task holds still.

The diagnostic follows directly. If an exact serialized prompt varies run to run, inspect inference conditions and serving behavior. If equivalent serializations differ in accuracy, inspect prompt design and treat format as an experimental factor.

Why does a fixed template break comparisons?

Because it does not neutralize formatting, it just picks one and applies it everywhere, and the format effect interacts differently with each model. The resulting ranking is conditional on that template, so you have measured a property of the model-template pair rather than a stable ordering of capability.

The weak correlation finding also rules out the obvious shortcut: optimize a format on one model, then reuse it as a neutral setup for another. The optimized format may transfer poorly or reverse the apparent advantage.

This extends to published benchmark deltas. If two models differ by a small margin and the task's format variants produce a wider spread, that ranking is not stable to a surface choice. It is the same reason a score is not a guarantee: the number is real, the thing it is a number about is narrower than it appears.

How should you test for it?

Build a format set before comparing models or tuning content. Hold semantic content, demonstrations, labels and evaluation code constant, change one formatting family at a time, then run the complete set rather than picking the best variant after looking.

A useful set covers plain text versus marked sections, numbered versus bulleted choices, alternative separators, capitalization variants, whitespace variants and reordered fields. Keep every variant a valid equivalent prompt rather than a distortion that alters the task, and record the serialized prompts so someone else can reproduce the comparison.

Then report, per model: accuracy for every variant, the mean across the set, the minimum and maximum, the spread between them, and the ranking under each variant.

The mean does not replace the spread. A model with the highest mean and a wide range may be less dependable than one slightly lower with narrow variation, and which you want depends on your deployment. The tradeoff just has to be visible to be chosen.

How should prompt tuning control for it?

Hold formatting fixed when content is the variable under test, then run format sensitivity as a separate experiment. A before-and-after is interpretable only when wording, demonstrations, field order, delimiters, whitespace and output framing are controlled independently.

If a tuning change moved wording and layout together, label it a combined prompt change and do not call the difference a wording improvement. The clean design is factorial: choose content variants and format variants in advance, evaluate both, inspect the interaction.

None of which makes a formatting win worthless. If one representation performs better and stays stable across your models and tasks, deploy it. Just record it as a format selection decision rather than evidence that the instruction got better.

What belongs in the report?

The exact prompt serialization, the format variants, the task set, the models and the aggregation rule. It should distinguish a single-template score from a format-sensitive one, and say whether the template represents a real product interface.

It should also flag any leaderboard delta smaller than the observed format spread for that task. Treat that as a diagnostic rather than a theorem: spread measured on one task does not establish uncertainty for every other task, only that this published delta is smaller than a known uncontrolled effect in this setting.

Model comparisons need a declared format policy. Without one, formatting stays a hidden confounder that everybody reports around and nobody reports.

Can changing prompt formatting change LLM accuracy?

Yes. Sclar, Choi, Tsvetkov and Suhr measured up to 76 accuracy points of difference from formatting alone on LLaMA-2-13B in few-shot settings. That does not predict the spread for every model or task, but it establishes formatting as an experimental variable rather than harmless presentation.

Is prompt formatting the same as prompt wording?

No. Wording changes the linguistic content of an instruction; formatting changes its surface arrangement, including separators, casing, spacing, field order and option markers. Both affect a model, so an evaluation has to control them separately before attributing a score change to content.

How many prompt formats should an evaluation test?

The cited paper establishes no universal count. Use a predefined set covering the formatting families relevant to your task, and report every result plus the mean and full spread. Treat the set as an evaluation design choice, never as a hidden tuning parameter.

Can one prompt template fairly compare two models?

It compares them under that template, which is a narrower claim than it looks. Format performance correlates only weakly between models in the cited study, so a fairer comparison evaluates a shared set of formats and reports the model-by-format variation.