paperbot · PL 论文追踪

全部论文 待读 收藏

P2 RepoSim: Evaluating Prompt Strategies for Code Completion via User Behavior Simulation

RepoSim:通过用户行为模拟评估代码补全的提示策略
ASE Proceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering2024匹配度 4/10 · 论文属于 PL 与 AI 交叉的代码补全评估,提出基于用户行为模拟的 benchmark,与用户关注的静态分析、形式化验证、浮点/贝叶斯程序分析等核心方向无直接关联;但其用户行为模拟和接受率指标对 Coding Agent 评估有参考价值,故匹配度中等偏低。引用 2 inbox
Chao Peng, Qinyun Wu, Jiangchao Liu, Jierui Liu, Bo Jiang, Mengqian Xu, Yinghao Wang, Xia Liu, Ping Yang
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出 RepoSim 基准,通过回放 IDE 用户行为、模拟仓库演化来评估代码补全提示策略与用户接受率。

现有代码补全评估多依赖静态代码基准,忽略了真实的人机交互与仓库演化过程。本文提出 RepoSim,一个面向代码补全任务的基准框架:它采集 IDE 插件中的用户行为数据,通过记录与回放用户操作,为评估提供贴近真实的编程上下文,从而支持评估更复杂的提示策略,例如利用最近访问的文件与用户编辑历史。RepoSim 还提出一种基于用户对预测接受或拒绝的新度量,提供以用户为中心的评估标准。初步评估表明,将用户近期编辑历史加入提示可显著提升 LLM 生成代码的质量,说明时间上下文在代码补全中的重要性。总体而言,RepoSim 为代码补全性能评估提供了一个更真实、更聚焦用户的基准框架。

问题
现有代码补全评估依赖静态代码基准,未考虑用户交互行为与仓库随时间演化的真实场景,难以评估复杂提示策略。
方法
提出 RepoSim 基准,基于 IDE 插件采集并回放用户行为,模拟仓库演化以提供真实编程上下文,并支持利用最近访问文件与编辑历史的提示策略。
评估
通过初步评估比较不同提示策略,并使用基于用户接受/拒绝预测的新度量进行以用户为中心的评估。
原文摘要(Abstract)

Large language models (LLMs) have revolutionized code completion tasks. IDE plugins such as MarsCode can generate code recommendations, saving developers significant time and effort. However, current evaluation methods for code completion are limited by their reliance on static code benchmarks, which do not consider human interactions and evolving repositories. This paper proposes RepoSim, a novel benchmark designed to evaluate code completion tasks by simulating the evolving process of repositories and incorporating user behaviors. RepoSim leverages data from an IDE plugin, by recording and replaying user behaviors to provide a realistic programming context for evaluation. This allows for the assessment of more complex prompt strategies, such as utilizing recently visited files and incorporating user editing history. Additionally, RepoSim proposes a new metric based on users’ acceptance or rejection of predictions, offering a user-centric evaluation criterion. Our preliminary evaluation demonstrates that incorporating users’ recent edit history into prompts significantly improves the quality of LLM-generated code, highlighting the importance of temporal context in code completion. RepoSim represents a significant advancement in benchmarking tools, offering a realistic and user-focused framework for evaluating code completion performance.

链接与引用

DOI 原文 · DBLP

BibTeX
@inproceedings{0002WLLJXWLY24,
  title = {RepoSim: Evaluating Prompt Strategies for Code Completion via User Behavior Simulation},
  author = {Chao Peng and Qinyun Wu and Jiangchao Liu and Jierui Liu and Bo Jiang and Mengqian Xu and Yinghao Wang and Xia Liu and Ping Yang},
  booktitle = {ASE},
  year = {2024},
  doi = {10.1145/3691620.3695299}
}