DevIntent: How Much Does LLM-Generated Code Violate Developer Intent?
Susana Haing, Natan Vidra, Spurthi Setty
cs.SE, cs.CL
Submitted: 2026-08-07
Updated: 2026-08-11
Comments: 8 pages, 2 figures, 8 tables
License: http://creativecommons.org/licenses/by/4.0/
The gist: Code generated by LLMs can violate a developer's implicit intentions when given an ambiguous prompt, yet standard benchmarks measure only whether code passes its stated test.
Terminology
Abstract
Code generated by LLMs can violate a developer's implicit intentions when given an ambiguous prompt, yet standard benchmarks measure only whether code passes its stated test. We introduce the Intent Violation Rate (IVR) and a 49-problem pilot benchmark derived from HumanEval+. Each problem strips implicit constraints from a clarified prompt and encodes them as hidden constraint tests. IVR measures the fraction of LLM-generated solutions that pass the stated (visible) tests yet fail hidden constraint tests that capture unstated intent. Evaluating Claude Sonnet 4.6 and OpenAI GPT 4.1, we find both pass over 92% of stated tests yet violate intent in over half of problems (54.5% and 63.5%), following a systematic, bimodal pattern consistent across both models. Out findings indicate that pass rates overstate how well generated code reflects developer intent.
Sources
- Program Synthesis with Large Language Models
- Evaluating Large Language Models Trained on Code
- EvilGenie: A Reward Hacking Benchmark
- LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code
- ClarEval: A Benchmark for Evaluating Clarification Skills of Code Agents under Ambiguous Instructions
- ClarifyGPT: Empowering LLM-based Code Generation with Intention Clarification
- ImpossibleBench: Measuring LLMs' Propensity of Exploiting Test Cases
Related papers
- Falsification-Based Verification of LLM-Generated Optimization Models: Sound Test Batteries and Their Detection Limits
- GitSkills: A Dataset of Agent Skills on GitHub
- For Coding Agents, the Repository Matters
- SABER: Benchmarking Operational Safety of LLM Coding Agents in Stateful Project Workspaces
- PackMonitor: Enabling Zero Package Hallucinations Through Decoding-Time Monitoring
- IntentCoding: Amplifying User Intent in Code Generation