Knowledge Graph Based Repository-Level Code Generation
Mihir Athale, Vishal Vaddina

TL;DR
This paper presents a knowledge graph-based method to improve repository-level code generation by enhancing code search, retrieval, and contextual relevance, outperforming existing approaches on a new benchmark.
Contribution
It introduces a novel knowledge graph framework for repository-level code generation, capturing structural relations to improve context-awareness and code quality.
Findings
Significantly outperforms baseline methods on EvoCodeBench
Enhances contextual relevance in code retrieval
Improves robustness and consistency of generated code
Abstract
Recent advancements in Large Language Models (LLMs) have transformed code generation from natural language queries. However, despite their extensive knowledge and ability to produce high-quality code, LLMs often struggle with contextual accuracy, particularly in evolving codebases. Current code search and retrieval methods frequently lack robustness in both the quality and contextual relevance of retrieved results, leading to suboptimal code generation. This paper introduces a novel knowledge graph-based approach to improve code search and retrieval leading to better quality of code generation in the context of repository-level tasks. The proposed approach represents code repositories as graphs, capturing structural and relational information for enhanced context-aware code generation. Our framework employs a hybrid approach for code retrieval to improve contextual relevance, track…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
