AceCoder: Utilizing Existing Code to Enhance Code Generation
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) have shown great success in code generation. LLMs take as the input a prompt and output the code. A key question is how to make prompts (i.e., Prompting Techniques). Existing prompting techniques are designed for natural language generation and have low accuracy in code generation. In this paper, we propose a new prompting technique named AceCoder. Our motivation is that code generation meets two unique challenges (i.e., requirement understanding and code implementation). AceCoder contains two novel mechanisms (i.e., guided code generation and example retrieval) to solve these challenges. (1) Guided code generation asks LLMs first to analyze requirements and output an intermediate preliminary (e.g., test cases). The preliminary is used to clarify requirements and tell LLMs "what to write". (2) Example retrieval selects similar programs as examples in prompts, which provide lots of relevant content (e.g., algorithms, APIs) and teach LLMs "how to write". We apply AceCoder to three LLMs (e.g., Codex) and evaluate it on three public benchmarks using the Pass@k. Results show that AceCoder can significantly improve the performance of LLMs on code generation. (1) In terms of Pass@1, AceCoder outperforms the state-of-the-art baseline by up to 56.4% in MBPP, 70.7% in MBJP, and 88.4% in MBJSP. (2) AceCoder is effective in LLMs with different sizes (i.e., 6B to 13B) and different languages (i.e., Python, Java, and JavaScript). (3) Human evaluation shows human developers prefer programs from AceCoder.
Key facts. Cited by 25 papers in the map (data through 7 Oct 2026). Builds on 28 of its 47 references that are in the map. First posted on arXiv 31 Mar 2023.
Builds on
28 of 47 references.
References · 28
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
- 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,747
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2019The Curious Case of Neural Text Degenerationcited by 2,881
- 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,674
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
16 more
- 2022Least-to-Most Prompting Enables Complex Reasoning in Large Language Modelscited by 1,397
- 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,371
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2022CodeT: Code Generation with Generated Testscited by 369
- 2021Unified Pre-training for Program Understanding and Generationcited by 361
- 2022Multi-lingual Evaluation of Code Generation Modelscited by 158
- 2021Retrieval Augmented Code Generation and Summarizationcited by 148
- 2022ReACC: A Retrieval-Augmented Code Completion Frameworkcited by 117
- 2021Jigsaw: Large Language Models meet Program Synthesiscited by 103
- 2018A Retrieve-and-Edit Framework for Predicting Structured Outputscited by 73
- 2023SkCoder: A Sketch-based Approach for Automatic Code Generationcited by 40
- 2019Retrieve and Refine: Exemplar-based Neural Comment Generationcited by 36
- 2022Fault-Aware Neural Code Rankerscited by 33
- 2022AixBench: A Code Generation Benchmark Datasetcited by 22
- 2022CodeEditor: Learning to Edit Source Code with Pre-trained Modelscited by 12
Built on by
Citing papers per year: 2023: 3; 2024: 12; 2025: 6; 2026: 4.
25 papers.
Sort:
By area:
- 2024A Survey on Large Language Models for Code Generationcited by 646
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 352
- 2023Self-Edit: Fault-Aware Code Editor for Code Generationcited by 110
- 2024EvoCodeBench: An Evolving Code Generation Benchmark Aligned with Real-World Code Repositoriescited by 71
- 2024DevEval: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositoriescited by 71
- 2024Agents in Software Engineering: Survey, Landscape, and Visioncited by 60
- 2024Exploring and Unleashing the Power of Large Language Models in Automated Code Translationcited by 57
- 2023Large Language Model-Aware In-Context Learning for Code Generationcited by 42
- 2024Dataflow-Guided Retrieval Augmentation for Repository-Level Code Completioncited by 40
- 2024A Survey on Data Synthesis and Augmentation for Large Language Modelscited by 40
- 2023Hot or Cold? Adaptive Temperature Sampling for Code Generation with Large Language Modelscited by 37
- 2025Large Language Models for Code Generation: A Comprehensive Survey of Challenges, Techniques, Evaluation, and Applicationscited by 26
13 more
- 2024NLPerturbator: Studying the Robustness of Code LLMs to Natural Language Variationscited by 19
- 2025GraphCodeAgent: Dual Graph-Guided LLM Agent for Retrieval-Augmented Repo-Level Code Generationcited by 17
- 2025Is Relevance Propagated from Retriever to Generator in RAG?cited by 11
- 2024SABER: Model-agnostic Backdoor Attack on Chain-of-Thought in Neural Code Generationcited by 7
- 2026From Brute Force to Semantic Insight: Performance-Guided Data Transformation Design with LLMscited by 7
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completioncited by 7
- 2026CodeScaler: Scaling Code LLM Training and Test-Time Inference via Reward Modelscited by 5
- 2026RepoReasoner: Evaluating Repository-Level Code Reasoning Ability of Long-Context Language Modelscited by 5
- 2025A Study on Thinking Patterns of Large Reasoning Models in Code Generationcited by 4
- 2024NLP4PBM: A Systematic Review on Process Extraction using Natural Language Processing with Rule-based, Machine and Deep Learning Methodscited by 3
- 2024Applying Fine-Tuned LLMs for Reducing Data Needs in Load Profile Analysiscited by 2
- 2025A Systematic Approach for Assessing Large Language Models' Test Case Generation Capabilitycited by 1
- 2025Knowledge-Graph-Driven Data Synthesis for Low-Resource Software Development: A HarmonyOS Case Studycited by 1
- 2026RepoReasoner: Evaluating Repository-Level Code Reasoning Ability of Long-Context Language Models28 Jul 2026
- 2026CodeScaler: Scaling Code LLM Training and Test-Time Inference via Reward Models4 Feb 2026
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completion27 Jan 2026
- 2026From Brute Force to Semantic Insight: Performance-Guided Data Transformation Design with LLMs7 Jan 2026
- 2025Knowledge-Graph-Driven Data Synthesis for Low-Resource Software Development: A HarmonyOS Case Study29 Nov 2025
- 2025A Study on Thinking Patterns of Large Reasoning Models in Code Generation17 Sep 2025
- 2025GraphCodeAgent: Dual Graph-Guided LLM Agent for Retrieval-Augmented Repo-Level Code Generation14 Apr 2025
- 2025Large Language Models for Code Generation: A Comprehensive Survey of Challenges, Techniques, Evaluation, and Applications3 Mar 2025
- 2025Is Relevance Propagated from Retriever to Generator in RAG?20 Feb 2025
- 2025A Systematic Approach for Assessing Large Language Models' Test Case Generation Capability5 Feb 2025
- 2024SABER: Model-agnostic Backdoor Attack on Chain-of-Thought in Neural Code Generation8 Dec 2024
- 2024A Survey on Data Synthesis and Augmentation for Large Language Models16 Oct 2024
13 more
- 2024Agents in Software Engineering: Survey, Landscape, and Vision13 Sep 2024
- 2024NLP4PBM: A Systematic Review on Process Extraction using Natural Language Processing with Rule-based, Machine and Deep Learning Methods10 Sep 2024
- 2024NLPerturbator: Studying the Robustness of Code LLMs to Natural Language Variations28 Jun 2024
- 2024Applying Fine-Tuned LLMs for Reducing Data Needs in Load Profile Analysis2 Jun 2024
- 2024A Survey on Large Language Models for Code Generation1 Jun 2024
- 2024DevEval: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositories30 May 2024
- 2024Dataflow-Guided Retrieval Augmentation for Repository-Level Code Completion30 May 2024
- 2024Exploring and Unleashing the Power of Large Language Models in Automated Code Translation23 Apr 2024
- 2024EvoCodeBench: An Evolving Code Generation Benchmark Aligned with Real-World Code Repositories31 Mar 2024
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Survey29 Feb 2024
- 2023Large Language Model-Aware In-Context Learning for Code Generation15 Oct 2023
- 2023Hot or Cold? Adaptive Temperature Sampling for Code Generation with Large Language Models6 Sep 2023
- 2023Self-Edit: Fault-Aware Code Editor for Code Generation6 May 2023
- 2024A Survey on Large Language Models for Code Generationcited by 646
- 2023Self-Edit: Fault-Aware Code Editor for Code Generationcited by 110
- 2024EvoCodeBench: An Evolving Code Generation Benchmark Aligned with Real-World Code Repositoriescited by 71
- 2024DevEval: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositoriescited by 71
- 2024Exploring and Unleashing the Power of Large Language Models in Automated Code Translationcited by 57
- 2023Large Language Model-Aware In-Context Learning for Code Generationcited by 42
- 2024Dataflow-Guided Retrieval Augmentation for Repository-Level Code Completioncited by 40
- 2023Hot or Cold? Adaptive Temperature Sampling for Code Generation with Large Language Modelscited by 37
- 2025Large Language Models for Code Generation: A Comprehensive Survey of Challenges, Techniques, Evaluation, and Applicationscited by 26
- 2024NLPerturbator: Studying the Robustness of Code LLMs to Natural Language Variationscited by 19
- 2026From Brute Force to Semantic Insight: Performance-Guided Data Transformation Design with LLMscited by 7
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completioncited by 7
12 most cited of 15 All 15 (JSON)
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completion27 Jan 2026
- 2026From Brute Force to Semantic Insight: Performance-Guided Data Transformation Design with LLMs7 Jan 2026
- 2025Large Language Models for Code Generation: A Comprehensive Survey of Challenges, Techniques, Evaluation, and Applications3 Mar 2025
- 2025A Systematic Approach for Assessing Large Language Models' Test Case Generation Capability5 Feb 2025
- 2024NLP4PBM: A Systematic Review on Process Extraction using Natural Language Processing with Rule-based, Machine and Deep Learning Methods10 Sep 2024
- 2024NLPerturbator: Studying the Robustness of Code LLMs to Natural Language Variations28 Jun 2024
- 2024Applying Fine-Tuned LLMs for Reducing Data Needs in Load Profile Analysis2 Jun 2024
- 2024A Survey on Large Language Models for Code Generation1 Jun 2024
- 2024DevEval: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositories30 May 2024
- 2024Dataflow-Guided Retrieval Augmentation for Repository-Level Code Completion30 May 2024
- 2024Exploring and Unleashing the Power of Large Language Models in Automated Code Translation23 Apr 2024
- 2024EvoCodeBench: An Evolving Code Generation Benchmark Aligned with Real-World Code Repositories31 Mar 2024
12 newest of 15 All 15 (JSON)