paper-with-me

홈 › Papers

Class-Level Code Generation from Natural Language Using Iterative, Tool-Enhanced Reasoning over Repository

2024-04-22 · Ajinkya Deshpande, Anmol Agarwal, Shashank Shet, Arun Iyer, Aditya Kanade, Ramakrishna Bairi, Suresh Parthasarathy

LLMs have demonstrated significant potential in code generation tasks, achieving promising results at the function or statement level across various benchmarks. However, the complexities associated with creating code artifacts like classes, particularly within the context of real-world software repositories, remain underexplored. Prior research treats class-level generation as an isolated task, neglecting the intricate dependencies & interactions that characterize real-world software environments. To address this gap, we introduce RepoClassBench, a comprehensive benchmark designed to rigorously evaluate LLMs in generating complex, class-level code within real-world repositories. RepoClassBench includes "Natural Language to Class generation" tasks across Java, Python & C# from a selection of repositories. We ensure that each class in our dataset not only has cross-file dependencies within the repository but also includes corresponding test cases to verify its functionality. We find that current models struggle with the realistic challenges posed by our benchmark, primarily due to their limited exposure to relevant repository contexts. To address this shortcoming, we introduce Retrieve-Repotools-Reflect (RRR), a novel approach that equips LLMs with static analysis tools to iteratively navigate & reason about repository-level context in an agent-based framework. Our experiments demonstrate that RRR significantly outperforms existing baselines on RepoClassBench, showcasing its effectiveness across programming languages & under various settings. Our findings emphasize the critical need for code-generation benchmarks to incorporate repo-level dependencies to more accurately reflect the complexities of software development. Our work shows the benefits of leveraging specialized tools to enhance LLMs' understanding of repository context. We plan to make our dataset & evaluation harness public.

📄 PDF Abstract BibTeX arXiv:2405.01573

Code (1)

microsoft/repoclassbench

Tasks

Class-level Code GenerationCode GenerationNavigate

Similar Papers 제목 키워드 기반

Text2DSL: LLM-Based Code Generation for Domain-Specific Languages

2026-06-21 · Alexander V. Kozachok, Alexander M. Nazimov, Shamil G. Magomedov arxiv

Domain-specific languages (DSLs) are widely used for managing operating system security policies, yet manually authoring rules in such languages demands high expertise and is error-prone. This paper formalises the task o…

Code Generation

DeepRTL: Bridging Verilog Understanding and Generation with a Unified Representation Model

2025-02-20 · Yi Liu, Changran Xu, Yunhao Zhou, Zeju Li 외

Recent advancements in large language models (LLMs) have shown significant potential for automating hardware description language (HDL) code generation from high-level natural language instructions. While fine-tuning has…

Code GenerationSemantic SimilaritySemantic Textual Similarity

Neural Machine Translation for Code Generation

2023-05-22 · Dharma KC, Clayton T. Morrison

Neural machine translation (NMT) methods developed for natural language processing have been shown to be highly successful in automating translation from one natural language to another. Recently, these NMT methods have …

Code CompletionCode GenerationCode TranslationMachine Translation+2

Neural Machine Translation For Paraphrase Generation

2020-06-25 · Alex Sokolov, Denis Filimonov

Training a spoken language understanding system, as the one in Alexa, typically requires a large human-annotated corpus of data. Manual annotations are expensive and time consuming. In Alexa Skill Kit (ASK) user experien…

DecoderMachine TranslationNatural Language UnderstandingParaphrase Generation+4

Controlled Text Generation using T5 based Encoder-Decoder Soft Prompt Tuning and Analysis of the Utility of Generated Text in AI

2022-12-06 · Damith Chamalke Senadeera, Julia Ive

Controlled text generation is a very important task in the arena of natural language processing due to its promising applications. In order to achieve this task we mainly introduce the novel soft prompt tuning method of …

DecoderText Generation