More Than a Score: Probing the Impact of Prompt Specificity on LLM Code Generation

Association for Computational Linguistics, Arjun Guha, Harshitha Menon, Yangtian ZiUnderline 2025 · OpenAlex

Abstract

State‐of‐the‐art Large Language Models (LLMs) achieve high pass@1 on general benchmarks like HumanEval but underperform on specialized suites such as ParEval. Is this due to LLMs missing domain knowledge or insufficient prompt detail? To answer this, we introduce PARTIALORDEREVAL, which augments any code generation benchmark with a partial order of prompts from minimal to maximally detailed. Applying it to HumanEval and both serial and OpenMP subsets of ParEval, we measure how pass@1 scales with prompt specificity. Our experiments with Llama‐3.x and Qwen2.5‐Coder demonstrate varying degrees of prompt sensitivity across different tasks, and a qualitative analysis highlights explicit I/O specifications, edge‐case handling, and stepwise breakdowns as the key drivers of prompt detail improvement.

Introduction

Standard benchmarks like HumanEval or MBPP often provide a single "pass@1" score based on a fixed, often minimal, prompt. While state-of-the-art models are nearing saturation on these general benchmarks, they frequently stumble on specialized domains like high-performance computing (OpenMP) or scientific programming. This raises a critical question: is the failure due to a lack of domain knowledge, or simply a lack of prompt detail? Current evaluations fail to distinguish between a model that cannot code and one that simply does not understand a vague request. This paper introduces a systematic way to measure a model's sensitivity to the amount of information provided in a prompt.

The PARTIALORDEREVAL Framework

To address this gap, we developed PARTIALORDEREVAL, a framework designed to augment existing benchmarks with a "partial order" of prompts ranging from minimal to maximally detailed.

Overview of the PARTIALORDEREVAL framework, showing the generation of graduated prompt specificity from a maximally detailed prompt through summarization and masking.

The framework follows a multi-step process:

  1. Maximally Detailed Prompt ($p_{top}$): Using GPT-4 and manual refinement, we created a "gold standard" prompt for every problem that includes stepwise instructions and explicit edge-case handling.
  2. Graduated Specificity: From $p_{top}$, we automatically derived 39 intermediate prompts using three strategies: LLM Summarization (condensing the prompt into specific word-count budgets), Paragraph Sampling (randomly retaining chunks), and Sentence Block Masking (systematically removing blocks of text).
  3. Qualitative Taxonomy: We used Claude-3.5-Sonnet to categorize the types of information added as prompts grew longer, identifying which details—such as I/O specifications or implementation sketches—actually drive performance gains.

Experimental Setup

We applied this framework to three primary sources to create augmented datasets:

  • PO-HumanEval: Based on the industry standard for general Python coding.
  • PO-ParEval-Serial: Focused on scientific C++ code.
  • PO-ParEval-OMP: A challenging benchmark for parallel programming in C++ using OpenMP.

Key Results and Insights

Our experiments reveal that LLM coding performance is not a static number but a curve that scales with prompt detail.

The "Saturation" Illusion vs. Niche Sensitivity

On general benchmarks like HumanEval, models hit a performance ceiling very quickly. As shown in the figure below, adding more detail beyond approximately 100 words yields diminishing returns for most models.

Pass@1 performance on PO-HumanEval as a function of LLM summary word limit, illustrating the rapid saturation of performance on general coding tasks.

In contrast, niche tasks like OpenMP are "detail-hungry." Performance on PO-ParEval-OMP continues to climb even at the highest levels of detail. For example, Qwen2.5-Coder-14B’s performance on OpenMP tasks nearly doubled when given a maximally detailed prompt, improving from a 0.667 pass@1 to 0.967.

Communication vs. Knowledge

In many cases, a model that "failed" a benchmark with a standard prompt was actually capable of solving it—it just needed better instructions. Larger models (like Llama-3-70B) are generally more robust to vague prompts, but the gap between small and large models widens significantly on specialized tasks when prompts are minimal.

Qualitative analysis found that explicit Input/Output specifications, edge-case handling, and stepwise breakdowns are the most influential factors in helping an LLM generate correct code. With enough detail, models can achieve higher scores on "hard" parallel computing tasks than they do on "easy" general tasks, suggesting that benchmark difficulty is often a function of prompt quality.

Limitations and Future Work

While PARTIALORDEREVAL provides a new lens for evaluation, it has limitations. Most intermediate prompts were generated by other LLMs, which may introduce model-specific biases. Additionally, the study focused on high-resource languages like Python and C++; low-resource languages might show different sensitivity profiles. Future work could extend this to interactive prompting, where the model asks clarifying questions to reach the necessary level of specificity, and account for the human effort required to write highly detailed prompts.

Summary updated

Abstract

State‐of‐the‐art Large Language Models (LLMs) achieve high pass@1 on general benchmarks like HumanEval (Chen et al., 2021) but underperform on specialized suites such as ParEval (Nichols et al., 2024). Is this due to LLMs missing domain knowledge or insufficient prompt detail is given? To answer this, we introduce PartialOrderEval, which augments any code generation benchmark with a partial order of prompts from minimal to maximally detailed. Applying it to HumanEval and both serial and OpenMP subsets of ParEval, we measure how pass@1 scales with prompt specificity. Our experiments with Llama‐3.x and Qwen2.5‐Coder demonstrate varying degrees of prompt sensitivity across different tasks, and a qualitative analysis highlights explicit I/O specifications, edge‐case handling, and stepwise breakdowns as the key drivers of prompt detail improvement.
BibTeX
@inproceedings{linguistics2025more,
  author = {Association for Computational Linguistics and Arjun Guha and Harshitha Menon and Yangtian Zi and Arjun Guha},
  title = {{More Than a Score: Probing the Impact of Prompt Specificity on LLM Code Generation}},
  booktitle = {Underline},
  year = {2025},
  doi = {10.48448/599z-yh65},
}

Loading related content...

Figure