mlsanityData to 14 Oct 2026

RAPGen: An Approach for Fixing Code Inefficiencies in Zero-Shot

arXiv 2306.17077 ↗First posted 29 Jun 2023cs.SE cs.AIcited by 14

Not on the map. Why?

Abstract (arXiv)

Performance bugs are non-functional bugs that can even manifest in well-tested commercial products. Fixing these performance bugs is an important yet challenging problem. In this work, we address this challenge and present a new approach called Retrieval-Augmented Prompt Generation (RAPGen). Given a code snippet with a performance issue, RAPGen first retrieves a prompt instruction from a pre-constructed knowledge-base of previous performance bug fixes and then generates a prompt using the retrieved instruction. It then uses this prompt on a Large Language Model (such as Codex) in zero-shot to generate a fix. We compare our approach with the various prompt variations and state of the art methods in the task of performance bug fixing. Our evaluation shows that RAPGen can generate performance improvement suggestions equivalent or better than a developer in ~60% of the cases, getting ~42% of them verbatim, in an expert-verified dataset of past performance changes made by C# developers.

Key facts. Cited by 14 papers in the map (data through 14 Oct 2026). Builds on 21 of its 56 references that are in the map. First posted on arXiv 29 Jun 2023.

Builds on

21 of 56 references.

References · 21

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
  3. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  4. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  5. 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,893
  6. 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,915
  7. 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,795
  8. 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,234
  9. 2019Language Models as Knowledge Bases?cited by 1,936
  10. 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,135
  11. 2019How Can We Know What Language Models Know?cited by 959
  12. 2021GPT Understands, Toocited by 716
9 more
  1. 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 479
  2. 2020Unit Test Case Generation with Transformers and Focal Contextcited by 118
  3. 2021Examining Zero-Shot Vulnerability Repair with Large Language Modelscited by 105
  4. 2022Less Training, More Repairing Please: Revisiting Automated Program Repair via Zero-shot Learningcited by 76
  5. 2021Neural Transfer Learning for Repairing Security Vulnerabilities in C Codecited by 36
  6. 2018Aroma: Code Recommendation via Structural Code Searchcited by 29
  7. 2018A Comprehensive Study of Automatic Program Repair on the QuixBugs Benchmarkcited by 18
  8. 2021DeepDebug: Fixing Python Bugs Using Stack Traces, Backtranslation, and Code Skeletonscited by 17
  9. 2016Learning a Static Analyzer from Datacited by 7

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2023: 2; 2024: 3; 2025: 6; 2026: 3.

14 papers.

Sort:

By area:

Similar, not cited

Close in wording, no citation either way

  1. 2025Retrieval-Augmented Few-Shot Prompting Versus Fine-Tuning for Code Vulnerability Detection
  2. 2023RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program Repair
  3. 2024The Impact of Prompt Programming on Function-Level Code Generation
  4. 2025Towards Effectively Leveraging Execution Traces for Program Repair with Code LLMs
  5. 2025FeedbackEval: A Benchmark for Evaluating Large Language Models in Feedback-Driven Code Repair Tasks
  6. 2026QiMeng-PRepair: Precise Code Repair via Edit-Aware Reward Optimization
  7. 2023Learning Performance-Improving Code Edits
  8. 2025Do Prompt Patterns Affect Code Quality? A First Empirical Assessment of ChatGPT-Generated Code