Repository-Level Prompt Generation for Large Language Models of Code
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
- 2017Attention Is All You Needcited by 59,932
- 2015Deep Residual Learning for Image Recognitioncited by 51,809
- 2014Adam: A Method for Stochastic Optimizationcited by 36,960
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2021High-Resolution Image Synthesis with Latent Diffusion Modelscited by 18,694
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2022Hierarchical Text-Conditional Image Generation with CLIP Latentscited by 6,539
- 2016Layer Normalizationcited by 5,579
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
- 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,878
28 more
- 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,222
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2020Making Pre-trained Language Models Better Few-shot Learnerscited by 1,255
- 2021What Makes Good In-Context Examples for GPT-3?cited by 1,184
- 2020Exploiting Cloze Questions for Few Shot Text Classification and Natural Language Inferencecited by 934
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2022A Generalist Agentcited by 802
- 2019Generalization through Memorization: Nearest Neighbor Language Modelscited by 788
- 2022GPT-NeoX-20B: An Open-Source Autoregressive Language Modelcited by 711
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2021Prompt Programming for Large Language Models: Beyond the Few-Shot Paradigmcited by 599
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2021Learning How to Ask: Querying LMs with Mixtures of Soft Promptscited by 376
- 2022A Systematic Evaluation of Large Language Models of Codecited by 360
- 2020AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Promptscited by 246
- 2022Memorizing Transformerscited by 219
- 2018The Adverse Effects of Code Duplication in Machine Learning Models of Codecited by 123
- 2021FLEX: Unifying Evaluation for Few-Shot NLPcited by 67
- 2021PRIMERA: Pyramid-based Masked Sentence Pre-training for Multi-document Summarizationcited by 62
- 2022Investigating Explainability of Generative AI for Code through Scenario-based Designcited by 47
- 2021CoCoSum: Contextual Code Summarization with Multi-Relational Graph Neural Networkcited by 22
- 2021Capturing Structural Locality in Non-parametric Language Modelscited by 8
- 2021Learning to Generate Code Comments from Class Hierarchiescited by 5
- 2021Embedding API Dependency Graph for Neural Code Generationcited by 5
- 2020On-the-Fly Adaptation of Source Code Models using Meta-Learningcited by 4
Built on by
Citing papers per year: 2022: 3; 2023: 21; 2024: 51; 2025: 24; 2026: 7.
106 papers.
Sort:
By area:
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
- 2024A Survey on Large Language Models for Code Generationcited by 646
- 2023LeanDojo: Theorem Proving with Retrieval-Augmented Language Modelscited by 414
- 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 357
- 2023RepoBench: Benchmarking Repository-Level Code Auto-Completion Systemscited by 346
- 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 294
- 2023Challenges and Applications of Large Language Modelscited by 251
- 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repaircited by 225
- 2023CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completioncited by 181
- 2023OctoPack: Instruction Tuning Code Large Language Modelscited by 178
- 2022DocPrompting: Generating Code by Retrieving the Docscited by 151
- 2024OpenCoder: The Open Cookbook for Top-Tier Code Large Language Modelscited by 127
38 more
- 2024AdaIR: Adaptive All-in-One Image Restoration via Frequency Mining and Modulationcited by 108
- 2023Learning Performance-Improving Code Editscited by 103
- 2024RepoGraph: Enhancing AI Software Engineering with Repository-level Code Graphcited by 88
- 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)cited by 72
- 2023Unleashing the potential of prompt engineering for large language modelscited by 72
- 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
- 2022CoCoMIC: Code Completion By Jointly Modeling In-file and Cross-file Contextcited by 64
- 2024EffiBench: Benchmarking the Efficiency of Automatically Generated Codecited by 62
- 2024Alibaba LingmaAgent: Improving Automated Issue Resolution via Comprehensive Repository Explorationcited by 58
- 2024Repoformer: Selective Retrieval for Repository-Level Code Completioncited by 55
- 2023Bias Testing and Mitigation in LLM-based Code Generationcited by 53
- 2024Iterative Refinement of Project-Level Code Context for Precise Code Generation with Compiler Feedbackcited by 45
- 2024AgileCoder: Dynamic Collaborative Agents for Software Development based on Agile Methodologycited by 45
- 2024You Name It, I Run It: An LLM Agent to Execute Tests of Arbitrary Projectscited by 45
- 2023RepoFusion: Training Code Models to Understand Your Repositorycited by 40
- 2024Dataflow-Guided Retrieval Augmentation for Repository-Level Code Completioncited by 40
- 2024GraphCoder: Enhancing Repository-Level Code Completion via Code Context Graph-based Retrieval and Language Modelcited by 40
- 2024HumanEval Pro and MBPP Pro: Evaluating Large Language Models on Self-invoking Code Generationcited by 39
- 2024Automatic Programming: Large Language Models and Beyondcited by 35
- 2024REPOFUSE: Repository-Level Code Completion with Fused Dual Contextcited by 32
- 2023Fully Autonomous Programming with Large Language Modelscited by 31
- 2025Uncertainty-Guided Chain-of-Thought for Code Generation with LLMscited by 30
- 2023Exploring Parameter-Efficient Fine-Tuning Techniques for Code Generation with Large Language Modelscited by 28
- 2023LLM-Assisted Code Cleaning For Training Accurate Code Generatorscited by 27
- 2024Search-Based LLMs for Code Optimizationcited by 27
- 2025Code Graph Model (CGM): A Graph-Integrated Large Language Model for Repository-Level Software Engineering Taskscited by 27
- 2024MHPP: Exploring the Capabilities and Limitations of Language Models Beyond Basic Code Generationcited by 25
- 2024Evaluation of LLMs on Syntax-Aware Code Fill-in-the-Middle Taskscited by 24
- 2024LLMDFA: Analyzing Dataflow in Code with Large Language Modelscited by 22
- 2024PerfCodeGen: Improving Performance of LLM Generated Code with Execution Feedbackcited by 22
- 2024On the Impacts of Contexts on Repository-Level Code Generationcited by 21
- 2024M2rc-Eval: Massively Multilingual Repository-level Code Completion Evaluationcited by 21
- 2025Agent READMEs: An Empirical Study of Context Files for Agentic Codingcited by 21
- 2023Guiding Language Models of Code with Global Context using Monitorscited by 20
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approachescited by 20
- 2024FlashST: A Simple and Universal Prompt-Tuning Framework for Traffic Predictioncited by 18
- 2024CodeUpdateArena: Benchmarking Knowledge Editing on API Updatescited by 18
50 most cited of 106 All 106 (JSON)
- 2026Adaptive Critical Token-Aware Retrieval for Repository-Level Code Generation1 Sep 2026
- 2026The Illusion of Agentic Complexity in README.md Generation: Evaluating Single-Agent vs. Multi-Agent RAG Systems29 Jun 2026
- 2026BootstrapAgent: Distilling Repository Setup into Reusable Agent Knowledge15 May 2026
- 2026RAT: RunAnyThing via Fully Automated Environment Configuration25 Apr 2026
- 2026WebGen-R1: Incentivizing Large Language Models to Generate Functional and Aesthetic Websites with Reinforcement Learning22 Apr 2026
- 2026Unseen-Codebases-Domain Data Synthesis and Training Based on Code Graphs24 Feb 2026
- 2026In Line with Context: Repository-Level Code Generation via Context Inlining1 Jan 2026
- 2025Agent READMEs: An Empirical Study of Context Files for Agentic Coding17 Nov 2025
- 2025CLASP: Training-Free LLM-Assisted Source Code Watermarking via Semantic-Preserving Transformations13 Oct 2025
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approaches6 Oct 2025
- 2025Agentic Specification Generator for Move Programs29 Sep 2025
- 2025TENET: One Step Toward Test-Driven Development for Repository-Level Code Generation29 Sep 2025
38 more
- 2025Towards Repository-Level Program Verification with Large Language Models31 Aug 2025
- 2025TreeRanker: Fast and Model-agnostic Ranking System for Code Suggestions in IDEs4 Aug 2025
- 2025Enhancing Project-Specific Code Completion by Inferring Internal API Information28 Jul 2025
- 2025Kodezi Chronos: A Debugging-First Language Model for Repository-Scale Code Understanding14 Jul 2025
- 2025Code Graph Model (CGM): A Graph-Integrated Large Language Model for Repository-Level Software Engineering Tasks22 May 2025
- 2025YABLoCo: Yet Another Benchmark for Long Context Code Generation7 May 2025
- 2025Hallucination by Code Generation LLMs: Taxonomy, Benchmarks, Mitigation, and Challenges29 Apr 2025
- 2025RTLRepoCoder: Repository-Level RTL Code Completion through the Combination of Fine-Tuning and Retrieval Augmentation11 Apr 2025
- 2025Towards an Understanding of Context Utilization in Code Intelligence11 Apr 2025
- 2025Societal Impacts Research Requires Benchmarks for Creative Composition Tasks9 Apr 2025
- 2025CCCI: Code Completion with Contextual Information for Complex Data Transfer Tasks Using Large Language Models29 Mar 2025
- 2025Uncertainty-Guided Chain-of-Thought for Code Generation with LLMs19 Mar 2025
- 2025DependEval: Benchmarking LLMs for Repository Dependency Understanding9 Mar 2025
- 2025Static Program Analysis Guided LLM Based Unit Test Generation7 Mar 2025
- 2025Towards Automated Smart Contract Generation: Evaluation, Benchmarking, and Retrieval-Augmented Repair3 Mar 2025
- 2025Deep-Bench: Deep Learning Benchmark Dataset for Code Generation26 Feb 2025
- 2025RAG-Verus: Repository-Level Program Verification with LLMs using Retrieval Augmented Generation7 Feb 2025
- 2025LV-XAttn: Distributed Cross-Attention for Long Visual Inputs in Multimodal Large Language Models4 Feb 2025
- 2025FairCoder: Probing LLM Bias in High-Stakes Decision Making via Coding Tasks9 Jan 2025
- 2024HumanEval Pro and MBPP Pro: Evaluating Large Language Models on Self-invoking Code Generation30 Dec 2024
- 2024The Impact of Prompt Programming on Function-Level Code Generation29 Dec 2024
- 2024Repository Structure-Aware Training Makes SLMs Better Issue Resolver26 Dec 2024
- 2024Top General Performance = Top Domain Performance? DomainCodeBench: A Multi-domain Code Generation Benchmark24 Dec 2024
- 2024CoopetitiveV: Leveraging LLM-powered Coopetitive Multi-Agent Prompting for High-quality Verilog Generation15 Dec 2024
- 2024You Name It, I Run It: An LLM Agent to Execute Tests of Arbitrary Projects13 Dec 2024
- 2024Does Few-Shot Learning Help LLM Performance in Code Synthesis?3 Dec 2024
- 2024Understanding the Fundamental Design Decisions of Retrieval-Augmented Generation Systems29 Nov 2024
- 2024PerfCodeGen: Improving Performance of LLM Generated Code with Execution Feedback18 Nov 2024
- 2024OpenCoder: The Open Cookbook for Top-Tier Code Large Language Models7 Nov 2024
- 2024GitChameleon: Unmasking the Version-Switching Capabilities of Code Generation Models5 Nov 2024
- 2024M2rc-Eval: Massively Multilingual Repository-level Code Completion Evaluation28 Oct 2024
- 2024Strada-LLM: Graph LLM for traffic prediction28 Oct 2024
- 2024RepoGraph: Enhancing AI Software Engineering with Repository-level Code Graph3 Oct 2024
- 2024RAMBO: Enhancing RAG-based Repository-Level Method Body Completion23 Sep 2024
- 2024RepoGenReflex: Enhancing Repository-Level Code Completion with Verbal Reinforcement and Retrieval-Augmented Generation19 Sep 2024
- 2024Pairing Analogy-Augmented Generation with Procedural Memory for Procedural Q&A2 Sep 2024
- 2024Statically Contextualizing Large Language Models with Typed Holes2 Sep 2024
- 2024Search-Based LLMs for Code Optimization22 Aug 2024
50 newest of 106 All 106 (JSON)
- 2023LeanDojo: Theorem Proving with Retrieval-Augmented Language Modelscited by 414
- 2024Repoformer: Selective Retrieval for Repository-Level Code Completioncited by 55
- 2024GraphCoder: Enhancing Repository-Level Code Completion via Code Context Graph-based Retrieval and Language Modelcited by 40
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approachescited by 20
- 2024FT2Ra: A Fine-Tuning-Inspired Approach to Retrieval-Augmented Code Completioncited by 9
- 2024Understanding the Fundamental Design Decisions of Retrieval-Augmented Generation Systemscited by 7
- 2025RTLRepoCoder: Repository-Level RTL Code Completion through the Combination of Fine-Tuning and Retrieval Augmentationcited by 7
- 2024RepoGenReflex: Enhancing Repository-Level Code Completion with Verbal Reinforcement and Retrieval-Augmented Generationcited by 6
- 2025RAG-Verus: Repository-Level Program Verification with LLMs using Retrieval Augmented Generationcited by 3
- 2023Dynamic Retrieval-Augmented Generationcited by 1
- 2024Retrieval-augmented code completion for local projects using large language modelscited by 1
- 2026The Illusion of Agentic Complexity in README.md Generation: Evaluating Single-Agent vs. Multi-Agent RAG Systemscited by 0
- 2026The Illusion of Agentic Complexity in README.md Generation: Evaluating Single-Agent vs. Multi-Agent RAG Systems29 Jun 2026
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approaches6 Oct 2025
- 2025RTLRepoCoder: Repository-Level RTL Code Completion through the Combination of Fine-Tuning and Retrieval Augmentation11 Apr 2025
- 2025RAG-Verus: Repository-Level Program Verification with LLMs using Retrieval Augmented Generation7 Feb 2025
- 2024Understanding the Fundamental Design Decisions of Retrieval-Augmented Generation Systems29 Nov 2024
- 2024RepoGenReflex: Enhancing Repository-Level Code Completion with Verbal Reinforcement and Retrieval-Augmented Generation19 Sep 2024
- 2024Retrieval-augmented code completion for local projects using large language models9 Aug 2024
- 2024GraphCoder: Enhancing Repository-Level Code Completion via Code Context Graph-based Retrieval and Language Model11 Jun 2024
- 2024FT2Ra: A Fine-Tuning-Inspired Approach to Retrieval-Augmented Code Completion2 Apr 2024
- 2024Repoformer: Selective Retrieval for Repository-Level Code Completion15 Mar 2024
- 2023Dynamic Retrieval-Augmented Generation14 Dec 2023
- 2023LeanDojo: Theorem Proving with Retrieval-Augmented Language Models27 Jun 2023
- 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repaircited by 225
- 2024You Name It, I Run It: An LLM Agent to Execute Tests of Arbitrary Projectscited by 45
- 2025Agent READMEs: An Empirical Study of Context Files for Agentic Codingcited by 21
- 2024CoopetitiveV: Leveraging LLM-powered Coopetitive Multi-Agent Prompting for High-quality Verilog Generationcited by 9
- 2025Agentic Specification Generator for Move Programscited by 3
- 2025Agent READMEs: An Empirical Study of Context Files for Agentic Coding17 Nov 2025
- 2025Agentic Specification Generator for Move Programs29 Sep 2025
- 2024CoopetitiveV: Leveraging LLM-powered Coopetitive Multi-Agent Prompting for High-quality Verilog Generation15 Dec 2024
- 2024You Name It, I Run It: An LLM Agent to Execute Tests of Arbitrary Projects13 Dec 2024
- 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repair25 Mar 2024
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
- 2025Uncertainty-Guided Chain-of-Thought for Code Generation with LLMscited by 30
- 2023Leveraging Training Data in Few-Shot Prompting for Numerical Reasoningcited by 11
- 2023Evoke: Evoking Critical Thinking Abilities in LLMs via Reviewer-Author Prompt Editingcited by 11
- 2024Does Few-Shot Learning Help LLM Performance in Code Synthesis?cited by 6
- 2025Uncertainty-Guided Chain-of-Thought for Code Generation with LLMs19 Mar 2025
- 2024Does Few-Shot Learning Help LLM Performance in Code Synthesis?3 Dec 2024
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code12 Mar 2024
- 2023Evoke: Evoking Critical Thinking Abilities in LLMs via Reviewer-Author Prompt Editing20 Oct 2023
- 2023Leveraging Training Data in Few-Shot Prompting for Numerical Reasoning29 May 2023
- 2024A Survey on Large Language Models for Code Generationcited by 646
- 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 357
- 2023RepoBench: Benchmarking Repository-Level Code Auto-Completion Systemscited by 346
- 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 294
- 2023Challenges and Applications of Large Language Modelscited by 251
- 2023CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completioncited by 181
- 2023OctoPack: Instruction Tuning Code Large Language Modelscited by 178
- 2022DocPrompting: Generating Code by Retrieving the Docscited by 151
- 2024OpenCoder: The Open Cookbook for Top-Tier Code Large Language Modelscited by 127
- 2024AdaIR: Adaptive All-in-One Image Restoration via Frequency Mining and Modulationcited by 108
- 2023Learning Performance-Improving Code Editscited by 103
- 2024RepoGraph: Enhancing AI Software Engineering with Repository-level Code Graphcited by 88
12 most cited of 81 All 81 (JSON)
- 2026Adaptive Critical Token-Aware Retrieval for Repository-Level Code Generation1 Sep 2026
- 2026BootstrapAgent: Distilling Repository Setup into Reusable Agent Knowledge15 May 2026
- 2026RAT: RunAnyThing via Fully Automated Environment Configuration25 Apr 2026
- 2026WebGen-R1: Incentivizing Large Language Models to Generate Functional and Aesthetic Websites with Reinforcement Learning22 Apr 2026
- 2026In Line with Context: Repository-Level Code Generation via Context Inlining1 Jan 2026
- 2025TENET: One Step Toward Test-Driven Development for Repository-Level Code Generation29 Sep 2025
- 2025Towards Repository-Level Program Verification with Large Language Models31 Aug 2025
- 2025TreeRanker: Fast and Model-agnostic Ranking System for Code Suggestions in IDEs4 Aug 2025
- 2025Enhancing Project-Specific Code Completion by Inferring Internal API Information28 Jul 2025
- 2025Kodezi Chronos: A Debugging-First Language Model for Repository-Scale Code Understanding14 Jul 2025
- 2025Code Graph Model (CGM): A Graph-Integrated Large Language Model for Repository-Level Software Engineering Tasks22 May 2025
- 2025YABLoCo: Yet Another Benchmark for Long Context Code Generation7 May 2025
12 newest of 81 All 81 (JSON)