TL;DR
Large Language Models (LLMs) are notoriously fickle: changing a single word or punctuation mark in a prompt can flip a correct answer to a wrong one. This paper formalizes the task of Prompt Sensitivity Prediction—predicting whether a specific prompt variation will succeed or fail—and introduces PromptSET, a large-scale benchmark dataset to evaluate how well we can anticipate these failures.
What Problem Does This Paper Address?
We’ve all experienced it: you ask an LLM a question, it fails, you rephrase it slightly, and suddenly it works. This "prompt sensitivity" is a major hurdle for reliable AI applications. While prompt engineering has become a field of its own, we still lack robust tools to predict if a prompt is "fragile."
The authors identify a critical gap: LLMs are often oblivious to their own sensitivity. They might be confident in a response to one phrasing but fail completely on a semantically identical variation. The paper aims to move beyond trial-and-error by treating prompt sensitivity as a predictable phenomenon, drawing parallels to Query Performance Prediction (QPP) in traditional information retrieval.
Methods
The researchers established a systematic four-step process to study this:
- Selection: They started with high-quality question-answering pairs where the "ground truth" is deterministic and concise.
- Generation: Using LLaMA 3.1 (8B) and Mistral-nemo, they generated nine variations for every original prompt, ensuring the core "information need" remained the same.
- Filtering: They removed hallucinations and variations that strayed too far from the original meaning or were too short.
- Evaluation: They ran all variations through the LLMs to see which ones yielded correct answers, creating a labeled dataset of successes and failures.
To predict these outcomes, they tested three categories of baselines:
- LLM Self-Evaluation: Asking the model itself, "Can you answer this correctly?"
- Text Classification: Training a BERT-based classifier to distinguish between "answerable" and "unanswerable" prompt formulations.
- Query Performance Prediction (QPP): Adapting metrics from search engine research (like Closeness Centrality and BERT-PE) to estimate prompt difficulty based on embedding space characteristics.
Datasets
The study utilizes two foundational QA datasets to build its benchmark:
- TriviaQA: A reading comprehension dataset with over 650K triples, known for short, specific answers.
- HotpotQA: A more complex dataset requiring multi-hop reasoning across multiple documents.
The resulting new dataset, PromptSET, contains 11,469 unique prompts and a total of 114,690 variations, each labeled with the performance of LLaMA and Mistral.
Key Insights and Ideas
- The "Correctness Anchor": If an LLM gets the original prompt right, there is a much higher probability that its variations will also be correct. Conversely, if the original fails, the variations almost always fail too.
- Similarity Breeds Predictability: Variations that are semantically very close to the original prompt (measured via cosine similarity) are easier for models to predict and more likely to result in correct answers. This suggests LLMs have a "comfort zone" tied to their training data.
- Self-Evaluation is Unreliable: LLMs struggle to self-assess their ability to handle variations, particularly on complex tasks like HotpotQA. They are often "blind" to why a specific phrasing trips them up.
- Reformulation as a Cure: Interestingly, for questions where both LLMs failed the original prompt, there were often variations that allowed at least one (or both) models to succeed. This proves that prompt sensitivity isn't just about the model's knowledge, but how that knowledge is "unlocked."
Key Results
The benchmarking results show that predicting prompt sensitivity is surprisingly difficult:
- Supervised QPP (BERT-PE) was the strongest performer, achieving an accuracy of 0.710 on HotpotQA.
- Standard Text Classification (BERT) performed reasonably well on TriviaQA (0.660 accuracy) but struggled significantly with recall on HotpotQA.
- Specificity-based metrics (like PageRank or Degree Centrality) performed poorly, often hovering around random chance (0.50). This suggests that prompt sensitivity is driven by more than just how "specific" the words in a prompt are.
Limitations and Future Work
The authors acknowledge that their work focuses on prompts with deterministic and concise answers (QA). It remains to be seen how these findings translate to open-ended generation, creative writing, or coding tasks where "correctness" is harder to define.
Future research directions include developing more sophisticated, "sensitivity-aware" prompt engineering tools that can automatically steer users toward the most robust phrasing of their information needs. The researchers have publicly released PromptSET to encourage the community to tackle these challenges.
Summary updated