03 · What You Need to Know
Understanding Prompt Sensitivity and Designing a Measurement Procedure
What exactly is prompt sensitivity?
Prompt sensitivity describes how strongly an AI system's behavior depends on the formulation of its input instructions.
Consider two prompts that request the same underlying task:
- "Identify the research methodology used in this abstract."
- "Classify the study described in this abstract according to its research methodology."
If the model produces different classifications, the observed difference may indicate sensitivity to the prompt formulation.
However, researchers must first establish that the prompts are sufficiently equivalent for the intended comparison. A prompt requesting a general methodology description and another requesting a classification from three predefined categories may impose different response requirements.
Prompt sensitivity is therefore meaningful only in relation to a defined set of permissible prompt changes and an explicit evaluation objective.
How is prompt sensitivity different from response nondeterminism?
Both phenomena can produce different AI outputs, but they concern different sources of variation.
Prompt sensitivity
Variation associated with changing the wording, structure, examples, or other defined features of a prompt.
Response nondeterminism
Variation observed across repeated executions of the same defined prompt condition, potentially arising from stochastic generation or other system factors.
Suppose a model produces different answers when the same prompt is repeated. That variation cannot automatically be attributed to prompt wording because the wording did not change.
Conversely, if different prompt formulations produce different results, the researcher must determine whether the differences exceed the variation ordinarily observed under repeated executions.
For this reason, a study measuring prompt sensitivity may need repeated generations within each prompt condition.
Researchers should account for nondeterministic AI responses before attributing observed differences entirely to prompt formulation.
Which prompt features can researchers vary?
Prompt sensitivity is not limited to replacing individual words with synonyms.
Researchers may investigate several features, provided the manipulation is clearly defined and relevant to the research question.
| Prompt feature |
Example of variation |
Potential effect |
| Wording |
Replacing an instruction with a semantically equivalent paraphrase |
Changes in task interpretation or response selection |
| Instruction order |
Presenting the same requirements in a different sequence |
Changes in emphasis or instruction adherence |
| Formatting |
Using paragraphs, numbered instructions, or structured delimiters |
Changes in parsing or output organization |
| Role framing |
Assigning a professional or task-specific role |
Changes in tone, assumptions, or response content |
| Few-shot examples |
Changing the order or selection of demonstrations |
Changes in inferred patterns or classifications |
| Output constraints |
Requesting a label only versus a label with an explanation |
Changes in response format and possibly task performance |
Not every variation preserves the same task. Adding examples, changing output constraints, or assigning a role may alter the information available to the model.
Researchers should distinguish sensitivity to semantically equivalent paraphrases from sensitivity to broader prompt-design choices. Combining these effects without explanation can make the resulting measure difficult to interpret.
How should researchers select prompt variants?
The selection procedure should reflect the range of prompts to which the findings are intended to generalize.
For example, a study of ordinary user phrasing might use independently written paraphrases collected from several people. A study of instruction formatting might systematically vary punctuation, delimiters, or the order of otherwise identical requirements.
Researchers can also use automated paraphrasing, but generated variants should be checked for changes in meaning.
Prompt variants should not be selected merely because they produce unusually high or low performance.
A defensible procedure defines eligibility criteria before final testing and preserves the full set of variants included in the analysis.
The risk of prompt wording influencing a study's conclusion becomes particularly serious when researchers select formulations after examining which results favor their hypothesis.
How many prompt variants should be tested?
There is no universal minimum.
Two variants can demonstrate that different formulations produce different observed outputs, but they provide limited information about the broader distribution of prompt effects.
Testing more variants may improve coverage, although the benefit depends on how the variants are selected and whether they represent meaningfully different formulations.
Ten nearly identical prompts do not necessarily provide more informative coverage than a smaller, carefully designed set spanning relevant wording differences.
Researchers should consider the number of evaluation items, the number of prompt variants, and the number of repeated generations per variant as separate design decisions.
Where quantitative inference is intended, pilot data and precision-based sample-size planning can help determine an appropriate allocation.
What metrics can measure prompt sensitivity?
The appropriate metric depends on the outcome being evaluated.
| Outcome |
Possible sensitivity measure |
Interpretation |
| Classification |
Proportion of prompt variants producing different labels |
How frequently the assigned category changes |
| Accuracy |
Range or standard deviation of accuracy across prompt variants |
How much measured correctness depends on formulation |
| Numerical answer |
Absolute difference or dispersion across outputs |
How much the numerical result varies |
| Open-ended response |
Human-rated semantic consistency or claim-level agreement |
Whether substantive conclusions remain stable |
| Model comparison |
Variation in performance differences or model rankings |
Whether comparative conclusions depend on prompt selection |
| Instruction adherence |
Variation in compliance rates across formulations |
Whether formatting or instruction-following performance changes |
Researchers should define the metric before collecting final evaluation results whenever feasible.
Different metrics can produce different conclusions. A model might maintain high average accuracy while frequently changing its answer on a small subset of difficult questions.
Reporting both overall performance and the distribution of sensitivity across items may therefore be more informative than presenting one aggregate score.
How can researchers calculate sensitivity in classification tasks?
One simple descriptive measure is the proportion of evaluated items for which the model produces more than one distinct classification across a predefined set of prompt variants.
This indicates that at least one classification difference was observed for 30% of the abstracts under the tested conditions.
It does not mean that 30% of the classifications were incorrect, nor does it establish the probability of a classification change under all possible prompts.
The measure also depends on the number of variants tested. With more opportunities to observe disagreement, the probability of detecting at least one change may increase.
If repeated generations are collected, researchers must specify whether the measure uses one response per variant, a majority label, or another aggregation rule.
How can researchers measure variation in accuracy?
When reference answers are available, researchers can calculate accuracy separately for each prompt formulation.
For example, suppose a model achieves accuracies of 78%, 83%, 81%, 76%, and 85% across five prompt variants evaluated on the same dataset.
The observed accuracy range is nine percentage points, from 76% to 85%.
The range provides a straightforward description of variation, but it is sensitive to the number and selection of variants.
Researchers may also calculate the standard deviation of variant-level accuracy scores or use statistical models to estimate variation attributable to prompt formulation.
When repeated generations are available, the analysis should distinguish variation between prompts from variation within each prompt.
A model's average accuracy should not be interpreted as evidence of robustness unless the dispersion and relevant item-level behavior are also considered.
How should researchers analyze prompt sensitivity statistically?
Prompt sensitivity studies often have a crossed or repeated-measures structure. The same evaluation items may be tested under multiple prompt formulations, with several generations collected for each combination.
These observations should not automatically be treated as independent.
Depending on the outcome, researchers may use paired comparisons, hierarchical regression models, generalized linear mixed models, or appropriately designed bootstrap procedures.
For example, a hierarchical model may estimate differences associated with prompt formulations while accounting for variation among evaluation items.
When prompt variants are treated as a sample from a broader population of possible formulations, the sampling assumptions should be made explicit. A convenience set of researcher-written prompts does not automatically support generalization to all reasonable prompts.
Statistical significance should be interpreted alongside effect sizes and uncertainty intervals. A small but statistically detectable wording effect may have limited practical importance, while an unstable classification on a consequential task may matter even if the overall accuracy difference is modest.
Can semantic similarity scores measure prompt sensitivity?
Automated semantic similarity measures can help characterize differences between generated texts, but they should not automatically be treated as measures of factual or functional equivalence.
Two responses may express the same conclusion using different vocabulary, resulting in imperfect textual similarity. Conversely, responses can be linguistically similar while disagreeing on a critical number, diagnosis, classification, or research interpretation.
For open-ended tasks, researchers may need claim-level evaluation, structured rubrics, or human assessment.
If another AI model is used as an evaluator, its judgments should be validated against an appropriate reference procedure, particularly when the evaluation concerns subtle factual or methodological differences.
What does high prompt sensitivity mean?
High sensitivity indicates that the measured outcome varies substantially across the tested prompt formulations.
Whether that variation is problematic depends on the application.
For a creative writing system, diverse responses to different instructions may be desirable. For a research classification tool expected to apply stable decision rules, changing labels under equivalent paraphrases may raise concerns about reliability.
Researchers should avoid describing sensitivity as universally good or bad.
Instead, they should assess whether the observed variation is consistent with the intended use and whether it changes the substantive conclusions drawn from the system.
How should prompt sensitivity be reported?
A transparent report should identify the prompt-variation strategy, the exact or accessible prompt texts, the evaluation items, the model configuration, and the outcome measures.
Researchers should describe how semantic equivalence was assessed and whether prompt variants were developed before or after examining model performance.
Results should include relevant variability rather than only the best-performing prompt.
If the study also uses repeated generations, the number of trials per prompt should be reported, following a justified repeated-prompt testing procedure.
When sensitivity differs across models, researchers should explain whether identical or model-adapted prompts were used and how those choices affect the interpretation.