More Than a Score: Probing the Impact of Prompt Specificity on LLM Code Generation
Preprint
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 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.Keywords
All Related Versions
This publication has 18 references indexed in Scilit:
- Knowledge Transfer from High-Resource to Low-Resource Programming Languages for Code LLMsProceedings of the ACM on Programming Languages, 2024
- The Widening Gap: The Benefits and Harms of Generative AI for Novice Programmers2024
- Non-Expert Programmers in the Generative AI Future2024
- Can Large Language Models Write Parallel Code?2024
- How Beginning Programmers and Code LLMs (Mis)read Each Other2024
- PromptSet: A Programmer's Prompting Dataset2024
- PromptRobust: Towards Evaluating the Robustness of Large Language Models on Adversarial Prompts2023
- CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-X2023
- MultiPL-E: A Scalable and Polyglot Approach to Benchmarking Neural Code GenerationIEEE Transactions on Software Engineering, 2023
- Kokkos 3: Programming Model Extensions for the Exascale EraIEEE Transactions on Parallel and Distributed Systems, 2021