CoRet: Improved Retriever for Code Editing
Amazon, Idiap Research Institute and Swiss Federal Institute of Technology Lausanne · Amazon Development Center Germany
PDF 由论文原始站点提供,PaperCompass 不保存论文文件。DOI 10.18653/v1/2025.acl-short.62 ↗
摘要
In this paper, we introduce CoRet, a dense retrieval model designed for code-editing tasks that integrates code semantics, repository structure, and call-graph dependencies. The model focuses on retrieving relevant portions of a code repository based on natural language queries such as requests to implement new features or fix bugs. These retrieved code chunks can then be presented to an user or to a second code-editing model or agent. To train CoRet, we propose a loss function explicitly designed for repository-level retrieval. On SWE-bench and Long Code Arena’s bug localisation datasets, we show that our model substantially improves retrieval recall by at least 15 percentage points over existing models, and ablate the design choices to show their importance in achieving these results.