Don't Complete It! Preventing Unhelpful Code Completion for Productive and Sustainable Neural Code Completion Systems
Abstract
Currently, large pre-trained language models are widely applied in neural code completion systems. Though large code models significantly outperform their smaller counterparts, around 70% of displayed code completions from Github Copilot are not accepted by developers. Being reviewed but not accepted, their help to developer productivity is considerably limited and may conversely aggravate the workload of developers, as the code completions are automatically and actively generated in state-of-the-art code completion systems as developers type out once the service is enabled. Even worse, considering the high cost of the large code models, it is a huge waste of computing resources and energy, which severely goes against the sustainable development principle of AI technologies. However, such waste has never been realized, not to mention effectively addressed, in the research community for neural code completion. Hence, preventing such unhelpful code completions from happening in a cost-friendly way is of urgent need. To fill this significant gap, we first investigate the prompts of unhelpful code completions, called “low-return prompts.” We empirically identify four observable patterns in low-return prompts, each lacking necessary information, making it difficult to address through enhancements to the model’s accuracy alone. This demonstrates the feasibility of identifying such low-return prompts based on the prompts themselves. Motivated by this finding, we propose an early-rejection mechanism to turn down low-return prompts by foretelling the code completion qualities. The prompts that are estimated to receive unhelpful code completions will not be sent to the model. Furthermore, we investigated five types of estimators to demonstrate the feasibility of the mechanism. The experimental results show that the estimator can reject 20% of code completion requests with a 97.4% precision. To the best of our knowledge, it is the first systemic approach to address the problem of unhelpful code completions and this work also sheds light on an important research direction of large code models.
Integrity signals
Registry
Cites
Statistics
Claims the paper makes
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
An early rejection mechanism using a Transformer-based lightweight estimator significantly reduces computational costs and unhelpful completions.
“Sun et al. [35] proposed an early rejection mechanism using a Transformer-based lightweight estimator, significantly reducing computational costs and unhelpful completions.”
From How do Copilot Suggestions Impact Developers' Frustration and Productivity? (2025) · cites this paper as Sun et al. [35]
The citation lists haven’t been fetched yet
References 30 · Cited by 8
- Authors
- Sun, Z., Du, X., Song, F., Wang, S., Ni, M., Li, L., & Lo, D.
- Affiliations
- Singapore Management University (SG)
- Monash University (AU)
- Chinese Academy of Sciences (CN)
- National University of Defense Technology (CN)
- University of Technology Sydney (AU)
- Beihang University (CN)
- Venue
- ACM Transactions on Software Engineering and Methodology
- Published
- 2024-12-28
- Volume
- 34
- Issue
- 1
- Pages
- 1-22
- ISSN
- 1049-331X (ISSN-L)
- 1557-7392
- OpenAlex
- W4401635661
- Cited by
- 8
- References
- 30
- Citations by year
- 2026: 5 · 2025: 2 · 2024: 1
- FWCI
- 3.01
- Type
- journal article
- Language
- en
- Open access
- closed
- Locations
- ACM Transactions on Software Engineering and Methodology (publishedVersion)
- Funders
- National Natural Science Foundation of China (62072309)
- CAS Project for Young Scientists in Basic Research (YSBR-040)
- ISCAS New Cultivation Project (ISCAS-PYFX-202201)
- ISCAS Fundamental Research Project (ISCAS-JCZD-202302)
- Research Foundation from NUDT (ZK24-05)
- Xiaoning Du’s Google Research Scholar Program Award, and National Research Foundation (NRF-NRFI08-2022-0002)
- Topics
- Physical Sciences › Computer Science › Information Systems › Software Engineering Research
- Physical Sciences › Computer Science › Information Systems › Software Engineering Techniques and Practices
- Physical Sciences › Computer Science › Software › Software Testing and Debugging Techniques
- Keywords
- early rejection, prompt filtering, developer productivity, energy efficiency of AI, sustainable AI, GitHub Copilot
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review