The language of prompting: What linguistic properties make a prompt successful?

Alina Leidinger, Robert van Rooij, Ekaterina Shutova

Introduction

Prompt engineering is often treated as a "black art," but recent research brings linguistic rigor to this process. Large Language Models (LLMs) are notoriously "brittle": changing a single word in a prompt can cause performance to fluctuate wildly. This study investigates whether LLMs follow human linguistic intuition or simple statistical patterns, testing the common assumption that models perform best on prompts that resemble their training data—those with low perplexity, frequent words, and simple grammatical structures.

Methodology

The researchers conducted a controlled study using 550 manually constructed prompts. Unlike automated prompt generation, this manual approach allowed for fine-grained control over specific linguistic properties. Prompts were varied across several dimensions: grammatical mood, tense and aspect, modality, and lexico-semantic variation.

Table 1: Examples of linguistically varied prompts across different categories such as mood, aspect, tense, modality, and synonymy.

The evaluation was conducted in a zero-shot setting across five models: LLaMA (30b), OPT (1.3b, 30b), and the instruction-tuned OPT-IML (1.3b, 30b). Six datasets covering sentiment classification (SST-2, IMDB), Natural Language Inference (RTE, CB), and Question Answering (BoolQ, ARC-E) were utilized.

Key Insights

The Perplexity Myth

Contrary to previous high-profile studies, the authors found that lower perplexity does not consistently correlate with better performance. In many cases, models performed better on "less natural" or higher-perplexity prompts. Statistical analysis showed that accuracy generally had no significant correlation with prompt length, word frequency, or word ambiguity across most models and tasks.

Rare Synonyms and Lexical Choice

Surprisingly, replacing common words with rarer synonyms (e.g., using "appraisal" instead of "review") often improved performance. This contradicts the idea that models simply prefer the most frequent tokens from their training sets.

Performance Variability and Instruction Tuning

Instruction tuning (as seen in OPT-IML) improves average performance and robustness but does not eliminate instability. Significant performance swings still occur based on minor linguistic tweaks. For instance, modality—the choice of modal verbs—caused variance up to 17 percentage points on sentiment tasks.

Results and Analysis

The gap between the best and worst prompt for the same task was often massive. As shown in the performance data, accuracy varies significantly even within the same linguistic category depending on the specific model used.

Table 2: Zero-shot accuracy results for SST and IMDB datasets across different linguistic variations and models, highlighting the high variance in performance.

Furthermore, "optimal" prompts are not universal. A prompt that works well for one model or dataset often performs poorly when transferred, suggesting that prompt engineering is frequently overfitted to specific data distributions.

Conclusion

The study reveals that prompt success is highly idiosyncratic to specific model-task combinations. The authors propose a new evaluation standard: instead of reporting "best-case" performance on a single prompt, researchers should report the mean and variance across a linguistically diverse set of prompts to provide a more accurate picture of model capability. Future work should expand this investigation to larger models, few-shot settings, and morphologically richer languages.

Summary updated

BibTeX
@inproceedings{leidinger2023language,
  author = {Alina Leidinger and Robert van Rooij and Ekaterina Shutova},
  title = {{The language of prompting: What linguistic properties make a prompt successful?}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.findings-emnlp.618},
}
Figure