CLAIFeb 19, 2024

EVOR: Evolving Retrieval for Code Generation

arXiv:2402.12317v233 citationsh-index: 12EMNLP
Originality Incremental advance
AI Analysis

This addresses the adaptation of large language models to domains with insufficient knowledge, such as frequently updated libraries and long-tail programming languages, though it appears incremental as it builds on existing RAG pipelines.

The authors tackled the problem of static knowledge bases limiting retrieval-augmented code generation by developing EVOR, a pipeline that evolves queries and diverse knowledge bases synchronously, achieving two to four times higher execution accuracy compared to existing methods on new datasets.

Recently the retrieval-augmented generation (RAG) has been successfully applied in code generation. However, existing pipelines for retrieval-augmented code generation (RACG) employ static knowledge bases with a single source, limiting the adaptation capabilities of Large Language Models (LLMs) to domains they have insufficient knowledge of. In this work, we develop a novel pipeline, EVOR, that employs the synchronous evolution of both queries and diverse knowledge bases. On two realistic settings where the external knowledge is required to solve code generation tasks, we compile four new datasets associated with frequently updated libraries and long-tail programming languages, named EVOR-BENCH. Extensive experiments demonstrate that EVOR achieves two to four times of execution accuracy compared to other methods such as Reflexion (Shinn et al., 2024), DocPrompting (Zhou et al., 2023), etc. We demonstrate that EVOR is flexible and can be easily combined with them to achieve further improvement. Further analysis reveals that EVOR benefits from the synchronous evolution of queries and documents and the diverse information sources in the knowledge base. We hope that our studies will inspire more insights into the design of advanced RACG pipelines in future research. Our model, code, and data are available at https://arks-codegen.github.io.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes