Guardado en:
Detalles Bibliográficos
Autores principales: Su, Hongjin, Jiang, Shuyang, Lai, Yuhang, Wu, Haoyuan, Shi, Boao, Liu, Che, Liu, Qian, Yu, Tao
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:https://arxiv.org/abs/2402.12317
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866929612231016448
author Su, Hongjin
Jiang, Shuyang
Lai, Yuhang
Wu, Haoyuan
Shi, Boao
Liu, Che
Liu, Qian
Yu, Tao
author_facet Su, Hongjin
Jiang, Shuyang
Lai, Yuhang
Wu, Haoyuan
Shi, Boao
Liu, Che
Liu, Qian
Yu, Tao
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2402_12317
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle EVOR: Evolving Retrieval for Code Generation
Su, Hongjin
Jiang, Shuyang
Lai, Yuhang
Wu, Haoyuan
Shi, Boao
Liu, Che
Liu, Qian
Yu, Tao
Computation and Language
Artificial Intelligence
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.
title EVOR: Evolving Retrieval for Code Generation
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2402.12317