As large language models (LLMs) become foundational to language technologies, accurately characterizing their performance is crucial. In the world of prompt engineering, researchers and practitioners often obsess over what they say to a model—the specific instructions and few-shot examples. However, they rarely report how they format it. Does it matter if you write Input: [text] versus INPUT: <text>? Intuitively, it shouldn't, as the semantic meaning remains identical.
This paper reveals that LLMs are incredibly sensitive to these "meaning-preserving" formatting choices. This sensitivity acts as a major blind spot in LLM evaluation, making benchmarks brittle and comparisons between models potentially misleading. To address this, the authors introduce FormatSpread, an efficient tool that estimates a model's performance "spread" across various plausible formats, proving that current single-prompt benchmarking is often a roll of the dice.
The Hidden Variance in Prompt Design
If a researcher reports that Model A outperforms Model B, that conclusion might only hold for one specific, arbitrarily chosen prompt format. If you change a few colons to dashes or alter the capitalization, the ranking might completely flip.
To systematically study this, the researchers formalized the "space" of prompt formatting. They created a grammar of plausible prompt formats that defines how descriptors (like "Passage:"), separators (like "||"), and casing can be combined while keeping the core intent of the prompt intact.
Because testing every possible format combination is computationally prohibitive, the authors proposed FormatSpread. This algorithm treats the search for the best and worst formats as a "multi-armed bandit" problem. Using Thompson Sampling—a Bayesian optimization technique—it intelligently samples formats. Instead of testing every format on every data point, it quickly identifies which formats are likely to be high- or low-performers, allowing it to estimate the "performance spread" (the gap between the best and worst format) within a tight computational budget.
Key Insights and Results
The primary evaluation used a subset of 53 tasks from Super-NaturalInstructions, covering classification and multiple-choice problems, alongside Instruction Induction tasks and open-ended generation metrics.
- Extreme Sensitivity: The performance variance observed isn't just statistical noise; it is a structural sensitivity. On the LLaMA-2-13B model, the authors observed an accuracy spread of up to 76 points on a single task just by varying the format. Across 50+ tasks, the average spread was approximately 10 accuracy points.
- Widespread Impact Across Models: Even "instruction-tuned" models (like LLaMA-2-Chat or Falcon-Instruct) and larger models (up to 70B parameters) exhibit massive sensitivity to formatting. Furthermore, even behind an API where weights aren't accessible, FormatSpread found a median spread of 6.4 accuracy points (with a maximum of 56) for GPT-3.5 at a minimal cost.
- Rank Reversals: Crucially, model rankings are often inconsistent across formats. Model A might beat Model B on format $p$, but Model B might significantly beat Model A on format $p'$. This suggests that comparing models using a single fixed prompt format is methodologically flawed.
- Internal Representations: Using Principal Component Analysis (PCA) on the models' internal embeddings, the authors showed that LLMs "see" different formats as distinct, identifiable clusters. The model's internal state is physically different depending on whether a tab or a space was used, which correlates with the eventual performance spread.
- A "Spiky" Prompt Space: The prompt space is highly non-monotonic. Making a tiny "atomic" change—like altering a single character—can lead to a massive jump or drop in accuracy. This spikiness makes local search methods less effective than the Bayesian approach used in FormatSpread.
Limitations and the Path Forward
While comprehensive, the study has boundaries. The space of "plausible formats" is defined by a manually constructed grammar; while it covers over 100 standard tasks, it cannot capture every idiosyncratic way a human might format a prompt. Additionally, the study focused heavily on classification and short-text generation. The dynamics of formatting in long-form creative writing or complex reasoning (like Chain-of-Thought) remain open areas for future exploration.
Ultimately, this paper focuses on quantifying the problem rather than fixing it. Future work will need to develop training or decoding techniques that make models more robust to these trivial formatting changes.
For now, the takeaway for the AI community is clear: stop reporting single-number accuracies for a single prompt. If we want to truly understand and compare how LLMs perform, we must evaluate and report the performance spread.
Summary updated