When Prompts Go Wrong: Evaluating Code Model Robustness to Ambiguous, Contradictory, and Incomplete Task Descriptions
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) have demonstrated impressive performance in code generation tasks under idealized conditions, where task descriptions are clear and precise. However, in practice, task descriptions frequently exhibit ambiguity, incompleteness, or internal contradictions. In this paper, we present the first empirical study examining the robustness of state-of-the-art code generation models when faced with such unclear task descriptions. We extend the HumanEval and MBPP benchmarks by systematically introducing realistic task descriptions flaws through guided mutation strategies, producing a dataset that mirrors the messiness of informal developer instructions. We evaluate multiple LLMs of varying sizes and architectures, analyzing their functional correctness and failure modes across task descriptions categories. Our findings reveal that even minor imperfections in task description phrasing can cause significant performance degradation, with contradictory task descriptions resulting in numerous logical errors. Moreover, while larger models tend to be more resilient than smaller variants, they are not immune to the challenges posed by unclear requirements. We further analyze semantic error patterns and identify correlations between description clarity, model behavior, and error types. Our results underscore the critical need for developing LLMs that are not only powerful but also robust to the imperfections inherent in natural user tasks, highlighting important considerations for improving model training strategies, designing more realistic evaluation benchmarks, and ensuring reliable deployment in practical software development environments.
Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Builds on 16 of its 50 references that are in the map. First posted on arXiv 27 Jul 2025.
Builds on
16 of 50 references.
References · 16
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2021Measuring Coding Challenge Competence With APPScited by 879
- 2022DS-1000: A Natural and Reliable Benchmark for Data Science Code Generationcited by 442
- 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 417
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
- 2022GitHub Copilot AI pair programmer: Asset or Liability?cited by 150
- 2023Towards an Understanding of Large Language Models in Software Engineering Taskscited by 67
- 2024What's Wrong with Your Code Generated by Large Language Models? An Extensive Studycited by 52
- 2025LiveCodeBench Pro: How Do Olympiad Medalists Judge LLMs in Competitive Programming?cited by 52
- 2023DeceptPrompt: Exploiting LLM-driven Code Generation via Adversarial Natural Language Instructionscited by 31
4 more
- 2023Systematic Evaluation of GPT-3 for Zero-Shot Personality Estimationcited by 28
- 2024HumanEvalComm: Benchmarking the Communication Competence of Code Generation for LLMs and LLM Agentcited by 24
- 2021Software Effort Estimation Accuracy Prediction of Machine Learning Techniques: A Systematic Performance Evaluationcited by 3
- 2024Enhancing Software Effort Estimation through Reinforcement Learning-based Project Management-Oriented Feature Selectioncited by 2
Built on by
Citing papers per year: 2025: 2; 2026: 6.
8 papers.
- 2025BIRD-INTERACT: Re-imagining Text-to-SQL Evaluation for Large Language Models via Lens of Dynamic Interactionscited by 17
- 2025Chain-of-Trigger: An Agentic Backdoor that Paradoxically Enhances Agentic Robustnesscited by 4
- 2026Defective Task Descriptions in LLM-Based Code Generation: Detection and Analysiscited by 2
- 2026Obey, Diverge, Collapse: Blind Obedience to Incorrect Instructions Drives Code LLMs to Irrecoverable Code Semantic Collapsecited by 1
- 2026Automatically Evolving Prompt Guidelines for Task-Specific Optimizationcited by 0
- 2026AssumptionMiner: Extracting, Tracing, and Revising Implicit Assumptions in LLM Code Generationcited by 0
- 2026What Makes Software Issue Resolution Tasks Difficult for Agents?cited by 0
- 2026Beyond the Payload: How User Invocation Shapes Coding Agent Vulnerability to Repository Poisoningcited by 0
- 2026Beyond the Payload: How User Invocation Shapes Coding Agent Vulnerability to Repository Poisoning31 Aug 2026
- 2026What Makes Software Issue Resolution Tasks Difficult for Agents?18 Aug 2026
- 2026AssumptionMiner: Extracting, Tracing, and Revising Implicit Assumptions in LLM Code Generation24 Jul 2026
- 2026Obey, Diverge, Collapse: Blind Obedience to Incorrect Instructions Drives Code LLMs to Irrecoverable Code Semantic Collapse5 Jul 2026
- 2026Automatically Evolving Prompt Guidelines for Task-Specific Optimization7 May 2026
- 2026Defective Task Descriptions in LLM-Based Code Generation: Detection and Analysis27 Apr 2026
- 2025Chain-of-Trigger: An Agentic Backdoor that Paradoxically Enhances Agentic Robustness9 Oct 2025
- 2025BIRD-INTERACT: Re-imagining Text-to-SQL Evaluation for Large Language Models via Lens of Dynamic Interactions6 Oct 2025