LGAICLMay 30, 2025

CoRet: Improved Retriever for Code Editing

arXiv:2505.24715v12 citationsh-index: 6ACL
Originality Incremental advance
AI Analysis

This addresses the challenge of efficient code retrieval for developers or AI agents in software engineering, though it appears incremental as it builds on existing dense retrieval methods with specific enhancements.

The paper tackles the problem of retrieving relevant code portions from repositories for editing tasks like feature implementation or bug fixes, and shows that CoRet improves retrieval recall by at least 15 percentage points over existing models on benchmarks such as SWE-bench and Long Code Arena.

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 a 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.

Foundations

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

Your Notes