Lune

EMNLP2024顶会

Optimizing Code Retrieval: High-Quality and Scalable Dataset Annotation through Large Language Models

Rui Li, Qi Liu, Liyang He, Zheng Zhang, Hao Zhang, Shengyu Ye, Junyu Lu, Zhenya Huang

2024年份
4被引次数
8顶会引用

摘要

Code retrieval aims to identify code from extensive codebases that semantically aligns with a given query code snippet. Collecting a broad and high-quality set of query and code pairs is crucial to the success of this task. However, existing data collection methods struggle to effectively balance scalability and annotation quality. In this paper, we first analyze the factors influencing the quality of function annotations generated by Large Language Models (LLMs). We find that the invocation of intra-repository functions and third-party APIs plays a significant role. Building on this insight, we propose a novel annotation method that enhances the annotation context by incorporating the content of functions called within the repository and information on third-party API functionalities. Additionally, we integrate LLMs with a novel sorting method to address the multi-level function call relationships within repositories. Furthermore, by applying our proposed method across a range of repositories, we have developed the Query4Code dataset. The quality of this synthesized dataset is validated through both model training and human evaluation, demonstrating high-quality annotations. Moreover, cost analysis confirms the scalability of our annotation method. 1 * Corresponding Author. 1 Our Code and Dataset is available at https://github. com/smsquirrel/queryAnnotation def export_nb(nb_path): exporter = PythonExporter() output, res = exporter.from_filename(nb_path) if 'outputs' in res: for filename, content in res['outputs'].items(): savefile(filename, content) return output Code Query How to export the content of a Jupyter Notebook file. Docstring Export content from a Jupyter notebook file. Parameters: -nb_path : The file path of the Jupyter notebook to be exported.

问问这篇 Paper

智能体会读完全文。

Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。

可以从这些问题问起

智能体调用

Luneget_paper_fulltext

在 Lune 里问

免费开始,无需绑卡

引用它的顶会 Paper8

问问它们各自怎么用它

它引用的顶会 Paper21

相关 Paper

黄昏的海面,两侧是细线勾勒的悬崖