TL;DR
This paper introduces SpecFix, an automated approach to repairing ambiguous natural language descriptions in code generation tasks, significantly improving LLM performance by reducing ambiguity without human intervention.
Contribution
It presents a novel two-step method combining program analysis and contrastive inference to repair ambiguous descriptions for better code generation with LLMs.
Findings
43.58% of descriptions were modified by SpecFix
Pass@1 improved by 30.9% on modified descriptions
Overall benchmark performance increased by 4.09%
Abstract
The growing use of large language models (LLMs) has increased the importance of natural language (NL) in software engineering. However, ambiguity of NL can harm software quality, as unclear problem descriptions may lead to incorrect program generation. Detecting and resolving such ambiguity is challenging, motivating our introduction of the automated repair of ambiguous NL descriptions, which we approach by reducing code generation uncertainty and better aligning NL with input-output examples. Ambiguity repair is difficult for LLMs because they must understand how their interpretation of a description changes when the text is altered. We find that directly prompting LLMs to clarify ambiguity often produces irrelevant or inconsistent edits. To address this, we decompose this task into two simpler steps: (1) analyzing and repairing the LLM's interpretation of the description - captured by…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
