CursorCore: Assist Programming through Aligning Anything

Hao Jiang,Qi Liu,Rui Li,Shengyu Ye,Shijin Wang
2024-10-09
Abstract:Large language models have been successfully applied to programming assistance tasks, such as code completion, code insertion, and instructional code editing. However, these applications remain insufficiently automated and struggle to effectively integrate various types of information during the programming process, including coding history, current code, and user instructions. In this work, we propose a new conversational framework that comprehensively integrates these information sources, collect data to train our models and evaluate their performance. Firstly, to thoroughly evaluate how well models align with different types of information and the quality of their outputs, we introduce a new benchmark, APEval (Assist Programming Eval), to comprehensively assess the performance of models in programming assistance tasks. Then, for data collection, we develop a data generation pipeline, Programming-Instruct, which synthesizes training data from diverse sources, such as GitHub and online judge platforms. This pipeline can automatically generate various types of messages throughout the programming process. Finally, using this pipeline, we generate 219K samples, fine-tune multiple models, and develop the CursorCore series. We show that CursorCore outperforms other models of comparable size. This framework unifies applications such as inline chat and automated editing, contributes to the advancement of coding assistants. Code, models and data are freely available at <a class="link-external link-https" href="https://github.com/TechxGenus/CursorCore" rel="external noopener nofollow">this https URL</a>.
Computation and Language,Artificial Intelligence,Software Engineering
What problem does this paper attempt to address?
The problem that this paper attempts to solve is that in programming - assisted tasks, existing large - language models (LLMs) have problems of insufficient automation and difficulty in effectively integrating multiple information sources when dealing with code completion, code insertion, and directive code editing. Specifically, these models have difficulty in simultaneously using multiple types of information such as coding history, current code, and user instructions during the programming process. This results in poor performance of the models in predicting future code edits, requiring additional operations by programmers, and may be slow or difficult to write prompts for specific tasks. To overcome these problems, the paper proposes a new conversation framework - Assistant - Conversation, which aims to improve programming assistance by comprehensively integrating various information sources in the programming process. In addition, the paper also introduces a new benchmark - APEval (Assist Programming Eval) for evaluating the performance of models in programming - assisted tasks, and develops a data generation pipeline - Programming - Instruct for synthesizing training data from different sources. Through this series of methods, the paper aims to improve the effectiveness and automation of AI programming assistants, enabling them to better predict future code changes and reduce the operations required by users.