Manuscript Offprint

arXiv:2608.27621

Predicting LLM Performance from Prompt Linguistic Features: An Empirical Study in Requirements Engineering

Quim Motger, Alessio Miaschi, Xavier Franch, Mohammad Amin Zadenoori, Alessio Ferrari

Abstract

Background. LLM outputs are highly sensitive to prompt formulation. Small changes in wording or phrasing can lead to substantial differences in output quality. This sensitivity is particularly important in software engineering, where prompts guide tasks such as requirements analysis, code generation, and artifact synthesis in general. Ineffective prompt formulations can produce unreliable artefacts, with consequences for both task outcomes and the broader development process. However, practitioners lack principled ways to assess prompt formulation before inference (i.e., LLM execution), making prompt selection dependent on resource-intensive LLM calls and trial-and-error refinement. Aims. We investigate whether measurable linguistic properties of prompts can predict LLM performance before inference, thereby supporting low-cost prompt selection and refinement. We validate this hypothesis in the context of binary requirements classification by targeting performance metrics (F1, F2, precision, recall). Method. We generate 9,000 linguistically controlled prompt variants derived from 100 initial prompts by varying 30 linguistic metrics. Variants are evaluated using five open-source LLMs on 625 requirements annotated with ground-truth labels. Regression predictors are trained using stratified 10-fold cross-validation with permutation-based significance testing. Feature importance analysis identifies cross-LLM and model-specific linguistic predictors. Results. Linguistic features significantly predict prompt performance across all targets ( R2∈[0.38,0.42]R^{2} \in [0.38, 0.42], q < 0.05). Syntactic and morphosyntactic features drive most of the predictive signal. Cross-LLM consistent predictors include compound dependency distribution, conjunction density, and raw-text indicators such as word and sentence length, reflecting sensitivity to domain-specific vocabulary and complex structures. Conclusions. These results draw practical observations for prompt engineering, including the overlap between linguistic patterns that reduce LLM performance and those that increase human comprehension difficulty, as well as the irrelevance of lexical variety as a prompt-quality dimension. More broadly, they show that linguistic profiling combined with standard regression models provides an effective, interpretable signal for prompt characterisation, applicable as a low-cost prior before engaging costly optimisation pipelines.

2012 ACM Subject Classification General and reference → Empirical studies; Human-centered computing → Natural language interfaces; Software and its engineering → Requirements analysis

Keywords and phrases prompt engineering, requirements engineering, computational linguistics, requirements classification, regression modelling

Linguistic Properties of Prompts as Predictors of LLM Performance

1 Introduction

The increasing adoption of large language models (LLMs) in software engineering (SE) has demonstrated great potential to automate a wide range of tasks [18], from code generation [46] to requirements analysis [37]. However, LLM outputs are highly sensitive to prompt formulation: small changes in wording, structure or phrasing can lead to substantial differences in output quality [12]. This effect has been documented across task types and model families, from accuracy swings [40] to inconsistent model rankings [31] under prompt formatting changes. The consequences are particularly acute in SE. While reproducibility, interpretability of prompt artefacts, and developer trust are central concerns, even binary judgements have been shown to flip under minor paraphrasing [16]. This sensitivity makes prompt design a critical — yet poorly understood — determinant of task performance, with no established principles to guide SE practitioners in formulating effective prompts [36].

Prompt engineering has emerged as the community’s response to this challenge, aiming to formulate prompts that elicit reliable, high-quality outputs from LLMs. In SE and requirements engineering (RE), this work has so far been predominantly structural or template-based, with researchers proposing design frameworks [10], role and context patterns [21], and task-specific templates for code generation [41, 4], test generation [33], and requirements classification [2]. Overall, systematic reviews confirm the centrality of structural design choices to LLM performance in these settings [19]. A complementary line of work applies automatic prompt engineering (APE), which frames prompt design as an optimisation problem and searches for high-performing prompts through iterative rewriting, meta-prompting, or reinforcement learning [52, 22, 48, 24, 43, 50]. Yet both directions have limitations: structural and template-based approaches typically prescribe a fixed design and do not account for how small linguistic variations within that design affect output, while APE requires repeated LLM calls to evaluate candidate prompts, making it computationally expensive and energy-intensive [38]. What is missing is a lightweight way to estimate prompt effectiveness from linguistic properties of the prompt itself, before inference. Such a signal would complement both directions by constraining the search space, guiding prompt generation, and supporting the selection of promising prompts without running the LLM at every step.

We therefore hypothesise that measurable linguistic properties of prompts are systematic predictors of LLM performance. If such relationships can be modelled, prompt designers can assess and improve prompts analytically before engaging costly optimisation pipelines, reducing the number of LLM interactions required during prompt development.

To validate this hypothesis, a controlled empirical study is required in a setting where (i) prompt variability can be systematically manipulated, (ii) ground-truth performance can be reliably measured, and (iii) a sufficient volume of prompt variants can be generated and evaluated. Requirements engineering (RE) offers a particularly suitable instantiation: RE tasks such as requirements classification are well-defined, supported by established benchmarks, and have been shown to benefit from LLM-based automation [49]. Accordingly, the goal of this study is to validate the above hypothesis in the context of binary requirements classification, using a controlled experimental setting in which linguistic properties of prompts are systematically manipulated and their effect on performance — focusing on functional correctness as defined by ISO/IEC 25010 [20] — is measured and modelled.

Our study makes the following contributions:

■ A prompt variability framework that combines controlled paraphrasing — guided by targeted manipulation of linguistic metrics — with systematic regression-based analysis of the impact of linguistic properties on LLM performance.

■ A benchmark dataset of 9,000 linguistically diverse prompt variants for binary requirements classification, evaluated against five open-source LLMs and annotated with performance metrics.

■ A ranked assessment of linguistic predictors of prompt performance, distinguishing features that generalise across LLMs from those that are model-specific, providing actionable guidance for prompt engineers targeting heterogeneous model deployments.

The remainder of this paper is structured as follows. Section 2 reviews relevant background on prompt engineering and linguistic profiling. Section 3 describes the research method. Section 4 presents the results. Section 5 discusses findings and implications. Section 6 addresses threats to validity. Section 7 surveys related work. Section 8 concludes the paper.

References (50)

  • Assisting early-stage software startups with LLMs: Effective prompt engineering and system instruction design
  • Are prompts all you need? Evaluating prompt-based Large Language Models (LLM) s for software requirements classification
  • Profiling-UD: A Tool for Linguistic Profiling of Texts
  • Benchmarking prompt engineering techniques for secure code generation with gpt models
  • Out of style: RAG's fragility to linguistic variation
  • 6 Jane Cleland-Huang, Sepideh Mazrouee, Huang Liguo, and Dan Port. nfr, 2007. doi:10.5281/zenodo.268542. (opens the publisher in a new tab)
  • Automated classification of non-functional requirements
  • We Know What You're Looking For: Recommendation for Large-Scale Open Source Software
  • Universal dependencies
  • A framework for using llms for repository mining studies in empirical software engineering
  • Read-it: Assessing readability of italian texts with a view to text simplification
  • What did I do wrong? quantifying LLMs' sensitivity and consistency to prompt engineering
  • ChatGPT application in Systematic Literature Reviews in Software Engineering: an evaluation of its accuracy to support the selection activity
  • Large-scale evidence of dependency length minimization in 37 languages
  • Writing Science: Literacy And Discursive Power
  • Prompting instability: An empirical study of llm robustness in code vulnerability detection
  • An empirical study on software defect prediction with a simplified metric set
  • Large language models for software engineering: A systematic literature review
  • Prompt engineering for requirements engineering: A literature review and roadmap
  • The impact of prompt programming on function-level code generation
  • PRewrite: Prompt rewriting with reinforcement learning
  • The language of prompting: What linguistic properties make a prompt successful?, 2023 (opens arXiv in a new tab)
  • Recprompt: A self-tuning prompting framework for news recommendation using large language models
  • What makes a good natural language prompt? In 63rd Annual Meeting of the Association for Computational Linguistics, 2025
  • Native language identification with classifier stacking and ensembles
  • Prompt engineering in large language models
  • Linguistic profiling of a neural language model
  • Evaluating large language models via linguistic profiling
  • State of What Art? A Call for Multi-Prompt LLM Evaluation
  • Characterizing Datasets for LLM-based Requirements Engineering: A Systematic Mapping Study, 2026 (opens arXiv in a new tab)
  • Prompt engineering in LLMs for automated unit test generation: A large-scale study
  • Fine-grained just-in-time defect prediction
  • Secret Breach Detection in Source Code with Large Language Models
  • Prompt engineering guidelines for using large language models in requirements engineering
  • Requirements Engineering Using Generative AI: Prompts and Prompting Patterns
  • Prompt engineering and its implications on the energy consumption of large language models
  • A Vision for Debiasing Confirmation Bias in Software Testing via LLM. In 2025 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement, 2025
  • Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formatting, 2024 (opens arXiv in a new tab)
  • Prompt engineering or fine-tuning: An empirical assessment of llms for code
  • The ABC of software engineering research
  • Automated prompt engineering for cost-effective code generation using evolutionary algorithms
  • Paraphrase types elicit prompt engineering capabilities
  • Do advanced language models eliminate the need for prompt engineering in software engineering? ACM Trans
  • Experimentation in Software Engineering
  • Prompt engineering a prompt engineer
  • Large Language Models (LLMs) for Requirements Engineering (RE): A Systematic Literature Review, 2025 (opens arXiv in a new tab)
  • Automatic prompt engineering: The case of requirements classification
  • Natural Language Processing for Requirements Engineering: A Systematic Mapping Study
  • Large Language Models Are Human-Level Prompt Engineers
  • ProSA: Assessing and understanding the prompt sensitivity of LLMs