arrow
Return

Building a Coding Assistant via the Retrieval-Augmented Language Model

delete2025-01-17
delete1
PRE
AI
X
Xinze Li *
H
Hanbin Wang
Z
Zhenghao Liu
S
Shi Yu
S
Shuo Wang
Y
Yukun Yan
Y
Yu-Kai Fu
Y
Yu Gu
G
Ge Yu
DOI:10.1145/3695868delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Pretrained language models have shown strong effectiveness in code-related tasks, such as code retrieval, code generation, code summarization, and code completion tasks. In this article, we propose COde assistaNt viA retrieval-augmeNted language model (CONAN), which aims to build a code assistant by mimicking the knowledge-seeking behaviors of humans during coding. Specifically, it consists of a code structure- aware retriever (CONAN-R) and a dual-view code representation-based retrieval-augmented generation model (CONAN-G). CONAN-R pretrains CodeT5 using Code-Documentation Alignment and Masked Entity Prediction tasks to make language models code structure-aware and learn effective representations for code snippets and documentation. Then CONAN-G designs a dual-view code representation mechanism for implementing a retrieval-augmented code generation model. CONAN-G regards the code documentation

Journal

ACM Transactions on Information Systems cover
ACM Transactions on Information Systems
IF:
9.1
Papers:
1.2K
Citations:
4.7K

Organization

T
tsinghua university
Scholars:
11.8W
Papers: 10.0W
Citations: 137
N
northeastern university - china
Scholars:
3.1W
Papers: 2.7W
Citations: 37
C
chinese academy of sciences
Scholars:
56.5W
Papers: 44.9W
Citations: 704
researcher View more organizations