CoRet: Improved Retriever for Code Editing
Fehr, Fabio, Sivaprasad, Prabhu Teja, Franceschi, Luca, Zappella, Giovanni
–arXiv.org Artificial Intelligence
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.
arXiv.org Artificial Intelligence
Jun-2-2025
- Country:
- Asia > Middle East
- Jordan (0.04)
- Europe
- Ireland > Leinster
- County Dublin > Dublin (0.04)
- Spain > Canary Islands
- Gran Canaria > Las Palmas de Gran Canaria (0.04)
- Ireland > Leinster
- North America > United States
- Minnesota > Hennepin County
- Minneapolis (0.14)
- New Mexico > Bernalillo County
- Albuquerque (0.04)
- Minnesota > Hennepin County
- Asia > Middle East
- Genre:
- Research Report (0.50)
- Technology: