Don't Complete It! Preventing Unhelpful Code Completion for Productive and Sustainable Neural Code Completion Systems
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. Cited by 12 papers in the map (data through 7 Oct 2026). Builds on 29 of its 61 references that are in the map. First posted on arXiv 13 Sep 2022.
Builds on
29 of 61 references.
References · 29
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
- 2020Knowledge Distillation: A Surveycited by 1,578
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2019Energy and Policy Considerations for Deep Learning in NLPcited by 1,242
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
17 more
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
- 2022Efficient Training of Language Models to Fill in the Middlecited by 248
- 2022Grounded Copilot: How Programmers Interact with Code-Generating Modelscited by 216
- 2019Leveraging Pre-trained Checkpoints for Sequence Generation Taskscited by 182
- 2020You Autocomplete Me: Poisoning Vulnerabilities in Neural Code Completioncited by 112
- 2022Productivity Assessment of Neural Code Completioncited by 97
- 2022Natural Attack for Pre-trained Models of Codecited by 72
- 2022Out of the BLEU: how should we assess quality of the Code Generation models?cited by 65
- 2021Compute and Energy Consumption Trends in Deep Learning Inferencecited by 61
- 2019Pythia: AI-assisted Code Completion Systemcited by 54
- 2017Code Completion with Neural Attention and Pointer Networkscited by 49
- 2020Predicting Performance for Natural Language Processing Taskscited by 49
- 2016Compression of Neural Machine Translation Models via Pruningcited by 43
- 2021CoProtector: Protect Open-Source Code against Unauthorized Training Usage with Data Poisoningcited by 39
- 2019Scaling Video Analytics on Constrained Edge Nodescited by 36
- 2022On the Importance of Building High-quality Training Datasets for Neural Code Searchcited by 30
- 2021Efficient Neural Architecture Search with Performance Predictioncited by 2
Built on by
Citing papers per year: 2024: 4; 2025: 5; 2026: 3.
12 papers.
- 2024Beyond Functional Correctness: Investigating Coding Style Inconsistencies in Large Language Modelscited by 15
- 2024Multi-line AI-assisted Code Authoringcited by 13
- 2025The Hidden Cost of Readability: How Code Formatting Silently Consumes Your LLM Budgetcited by 11
- 2024When Neural Code Completion Models Size up the Situation: Attaining Cheaper and Faster Completion through Dynamic Model Inferencecited by 10
- 2024A Transformer-Based Approach for Smart Invocation of Automatic Code Completioncited by 5
- 2025The Impact of LLM-Assistants on Software Developer Productivity: A Systematic Review and Mapping Studycited by 4
- 2025"My productivity is boosted, but ..." Demystifying Users' Perception on AI Coding Assistantscited by 4
- 2026ShortCoder: Knowledge-Augmented Syntax Optimization for Token-Efficient Code Generationcited by 3
- 2025textttReMind: Understanding Deductive Code Reasoning in LLMscited by 2
- 2026Human-Human-AI Triadic Programming: Uncovering the Role of AI Agent and the Value of Human Partner in Collaborative Learningcited by 1
- 2026Can LLM Aid in Solving Constraints with Inductive Definitions?cited by 1
- 2025Relative Positioning Based Code Chunking Method For Rich Context Retrieval In Repository Level Code Completion Task With Code Language Modelcited by 0
- 2026Can LLM Aid in Solving Constraints with Inductive Definitions?4 Mar 2026
- 2026Human-Human-AI Triadic Programming: Uncovering the Role of AI Agent and the Value of Human Partner in Collaborative Learning17 Jan 2026
- 2026ShortCoder: Knowledge-Augmented Syntax Optimization for Token-Efficient Code Generation14 Jan 2026
- 2025textttReMind: Understanding Deductive Code Reasoning in LLMs1 Nov 2025
- 2025Relative Positioning Based Code Chunking Method For Rich Context Retrieval In Repository Level Code Completion Task With Code Language Model7 Oct 2025
- 2025The Hidden Cost of Readability: How Code Formatting Silently Consumes Your LLM Budget19 Aug 2025
- 2025"My productivity is boosted, but ..." Demystifying Users' Perception on AI Coding Assistants17 Aug 2025
- 2025The Impact of LLM-Assistants on Software Developer Productivity: A Systematic Review and Mapping Study3 Jul 2025
- 2024Beyond Functional Correctness: Investigating Coding Style Inconsistencies in Large Language Models29 Jun 2024
- 2024A Transformer-Based Approach for Smart Invocation of Automatic Code Completion23 May 2024
- 2024Multi-line AI-assisted Code Authoring6 Feb 2024
- 2024When Neural Code Completion Models Size up the Situation: Attaining Cheaper and Faster Completion through Dynamic Model Inference18 Jan 2024