arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2306.03091cs.CLcs.AIcs.SE
收藏

RepoBench:基准测试仓库级代码自动补全系统

RepoBench: Benchmarking Repository-Level Code Auto-Completion Systems

University of California, San Diego(加州大学圣迭戈分校)

Tianyang Liu, Canwen Xu, Julian McAuley

AI总结:

针对现有代码补全基准多聚焦单文件、缺乏真实多文件场景评估的问题,研究提出支持Python和Java的RepoBench基准,含检索、代码补全、流水线三项关联任务,可更全面评估仓库级代码补全系统性能。

摘要:

大语言模型(LLMs)极大推动了代码自动补全系统的发展,有望大幅提升开发者的生产效率。但当前基准测试主要聚焦于单文件任务,在更复杂的真实多文件编程场景下存在评估空白。为填补这一空白,我们推出RepoBench,这是一款专门用于评估仓库级代码自动补全系统的新型基准测试工具。RepoBench同时支持Python和Java,包含三项相互关联的评估任务:RepoBench-R(检索)、RepoBench-C(代码补全)和RepoBench-P(流水线)。三项任务分别衡量系统从其他文件中检索最相关代码片段作为跨文件上下文的能力、结合跨文件与文件内上下文预测下一行代码的能力,以及处理需要同时结合检索与下一行预测的复杂任务的能力。RepoBench旨在推动更全面的性能对比,促进自动补全系统的持续迭代。RepoBench已在https://github.com/Leolty/repobench 公开发布。

英文摘要:

Large Language Models (LLMs) have greatly advanced code auto-completion systems, with a potential for substantial productivity enhancements for developers. However, current benchmarks mainly focus on single-file tasks, leaving an assessment gap for more complex, real-world, multi-file programming scenarios. To fill this gap, we introduce RepoBench, a new benchmark specifically designed for evaluating repository-level code auto-completion systems. RepoBench supports both Python and Java and consists of three interconnected evaluation tasks: RepoBench-R (Retrieval), RepoBench-C (Code Completion), and RepoBench-P (Pipeline). Each task respectively measures the system's ability to retrieve the most relevant code snippets from other files as cross-file context, predict the next line of code with cross-file and in-file context, and handle complex tasks that require a combination of both retrieval and next-line prediction. RepoBench aims to facilitate a more complete comparison of performance and encouraging continuous improvement in auto-completion systems. RepoBench is publicly available at https://github.com/Leolty/repobench.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑