mlsanityData to 7 Oct 2026

Repository-Level Prompt Generation for Large Language Models of Code

arXiv 2206.12839 ↗First posted 26 Jun 2022cs.LG cs.AI cs.PLcited by 106

Not on the map. Why?

Abstract (arXiv)

With the success of large language models (LLMs) of code and their use as code assistants (e.g. Codex used in GitHub Copilot), techniques for introducing domain-specific knowledge in the prompt design process become important. In this work, we propose a framework called Repo-Level Prompt Generator that learns to generate example-specific prompts using prompt proposals. The prompt proposals take context from the entire repository, thereby incorporating both the structure of the repository and the context from other relevant files (e.g. imports, parent class files). Our technique doesn't require any access to the weights of the LLM, making it applicable in cases where we only have black-box access to the LLM. We conduct experiments on the task of single-line code-autocompletion using code repositories taken from Google Code archives. We demonstrate that an oracle constructed from our prompt proposals gives a remarkably high relative improvement of 36% over Codex, showing the quality of these proposals. Further, we show that when we train a model to predict a prompt proposal, we can achieve significant performance gains over Codex and other baselines. We release our code, data, and trained checkpoints at: urlhttps://github.com/shrivastavadisha/repolevelpromptgeneration.

Key facts. Cited by 106 papers in the map (data through 7 Oct 2026). Builds on 40 of its 74 references that are in the map. First posted on arXiv 26 Jun 2022.

Builds on

40 of 74 references.

References · 40

  1. 2017Attention Is All You Needcited by 59,932
  2. 2015Deep Residual Learning for Image Recognitioncited by 51,809
  3. 2014Adam: A Method for Stochastic Optimizationcited by 36,960
  4. 2020Language Models are Few-Shot Learnerscited by 32,199
  5. 2021High-Resolution Image Synthesis with Latent Diffusion Modelscited by 18,694
  6. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  7. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  8. 2022Hierarchical Text-Conditional Image Generation with CLIP Latentscited by 6,539
  9. 2016Layer Normalizationcited by 5,579
  10. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
  11. 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
  12. 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,878
28 more
  1. 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
  2. 2021Program Synthesis with Large Language Modelscited by 3,509
  3. 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,222
  4. 2022Competition-Level Code Generation with AlphaCodecited by 1,427
  5. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  6. 2020Making Pre-trained Language Models Better Few-shot Learnerscited by 1,255
  7. 2021What Makes Good In-Context Examples for GPT-3?cited by 1,184
  8. 2020Exploiting Cloze Questions for Few Shot Text Classification and Natural Language Inferencecited by 934
  9. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  10. 2022A Generalist Agentcited by 802
  11. 2019Generalization through Memorization: Nearest Neighbor Language Modelscited by 788
  12. 2022GPT-NeoX-20B: An Open-Source Autoregressive Language Modelcited by 711
  13. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
  14. 2021Prompt Programming for Large Language Models: Beyond the Few-Shot Paradigmcited by 599
  15. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
  16. 2021Learning How to Ask: Querying LMs with Mixtures of Soft Promptscited by 376
  17. 2022A Systematic Evaluation of Large Language Models of Codecited by 360
  18. 2020AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Promptscited by 246
  19. 2022Memorizing Transformerscited by 219
  20. 2018The Adverse Effects of Code Duplication in Machine Learning Models of Codecited by 123
  21. 2021FLEX: Unifying Evaluation for Few-Shot NLPcited by 67
  22. 2021PRIMERA: Pyramid-based Masked Sentence Pre-training for Multi-document Summarizationcited by 62
  23. 2022Investigating Explainability of Generative AI for Code through Scenario-based Designcited by 47
  24. 2021CoCoSum: Contextual Code Summarization with Multi-Relational Graph Neural Networkcited by 22
  25. 2021Capturing Structural Locality in Non-parametric Language Modelscited by 8
  26. 2021Learning to Generate Code Comments from Class Hierarchiescited by 5
  27. 2021Embedding API Dependency Graph for Neural Code Generationcited by 5
  28. 2020On-the-Fly Adaptation of Source Code Models using Meta-Learningcited by 4

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2022: 3; 2023: 21; 2024: 51; 2025: 24; 2026: 7.

106 papers.

Sort:

By area:

  1. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
  2. 2024A Survey on Large Language Models for Code Generationcited by 646
  3. 2023LeanDojo: Theorem Proving with Retrieval-Augmented Language Modelscited by 414
  4. 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 357
  5. 2023RepoBench: Benchmarking Repository-Level Code Auto-Completion Systemscited by 346
  6. 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 294
  7. 2023Challenges and Applications of Large Language Modelscited by 251
  8. 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repaircited by 225
  9. 2023CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completioncited by 181
  10. 2023OctoPack: Instruction Tuning Code Large Language Modelscited by 178
  11. 2022DocPrompting: Generating Code by Retrieving the Docscited by 151
  12. 2024OpenCoder: The Open Cookbook for Top-Tier Code Large Language Modelscited by 127
38 more
  1. 2024AdaIR: Adaptive All-in-One Image Restoration via Frequency Mining and Modulationcited by 108
  2. 2023Learning Performance-Improving Code Editscited by 103
  3. 2024RepoGraph: Enhancing AI Software Engineering with Repository-level Code Graphcited by 88
  4. 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)cited by 72
  5. 2023Unleashing the potential of prompt engineering for large language modelscited by 72
  6. 2024EvoCodeBench: An Evolving Code Generation Benchmark Aligned with Real-World Code Repositoriescited by 71
  7. 2024DevEval: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositoriescited by 71
  8. 2022CoCoMIC: Code Completion By Jointly Modeling In-file and Cross-file Contextcited by 64
  9. 2024EffiBench: Benchmarking the Efficiency of Automatically Generated Codecited by 62
  10. 2024Alibaba LingmaAgent: Improving Automated Issue Resolution via Comprehensive Repository Explorationcited by 58
  11. 2024Repoformer: Selective Retrieval for Repository-Level Code Completioncited by 55
  12. 2023Bias Testing and Mitigation in LLM-based Code Generationcited by 53
  13. 2024Iterative Refinement of Project-Level Code Context for Precise Code Generation with Compiler Feedbackcited by 45
  14. 2024AgileCoder: Dynamic Collaborative Agents for Software Development based on Agile Methodologycited by 45
  15. 2024You Name It, I Run It: An LLM Agent to Execute Tests of Arbitrary Projectscited by 45
  16. 2023RepoFusion: Training Code Models to Understand Your Repositorycited by 40
  17. 2024Dataflow-Guided Retrieval Augmentation for Repository-Level Code Completioncited by 40
  18. 2024GraphCoder: Enhancing Repository-Level Code Completion via Code Context Graph-based Retrieval and Language Modelcited by 40
  19. 2024HumanEval Pro and MBPP Pro: Evaluating Large Language Models on Self-invoking Code Generationcited by 39
  20. 2024Automatic Programming: Large Language Models and Beyondcited by 35
  21. 2024REPOFUSE: Repository-Level Code Completion with Fused Dual Contextcited by 32
  22. 2023Fully Autonomous Programming with Large Language Modelscited by 31
  23. 2025Uncertainty-Guided Chain-of-Thought for Code Generation with LLMscited by 30
  24. 2023Exploring Parameter-Efficient Fine-Tuning Techniques for Code Generation with Large Language Modelscited by 28
  25. 2023LLM-Assisted Code Cleaning For Training Accurate Code Generatorscited by 27
  26. 2024Search-Based LLMs for Code Optimizationcited by 27
  27. 2025Code Graph Model (CGM): A Graph-Integrated Large Language Model for Repository-Level Software Engineering Taskscited by 27
  28. 2024MHPP: Exploring the Capabilities and Limitations of Language Models Beyond Basic Code Generationcited by 25
  29. 2024Evaluation of LLMs on Syntax-Aware Code Fill-in-the-Middle Taskscited by 24
  30. 2024LLMDFA: Analyzing Dataflow in Code with Large Language Modelscited by 22
  31. 2024PerfCodeGen: Improving Performance of LLM Generated Code with Execution Feedbackcited by 22
  32. 2024On the Impacts of Contexts on Repository-Level Code Generationcited by 21
  33. 2024M2rc-Eval: Massively Multilingual Repository-level Code Completion Evaluationcited by 21
  34. 2025Agent READMEs: An Empirical Study of Context Files for Agentic Codingcited by 21
  35. 2023Guiding Language Models of Code with Global Context using Monitorscited by 20
  36. 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approachescited by 20
  37. 2024FlashST: A Simple and Universal Prompt-Tuning Framework for Traffic Predictioncited by 18
  38. 2024CodeUpdateArena: Benchmarking Knowledge Editing on API Updatescited by 18

50 most cited of 106 All 106 (JSON)