SpareCodeSearch:在没有备用GPU时搜索代码上下文
SpareCodeSearch: Searching for Code Context When You Have No Spare GPU
AI总结:
本文提出SpareCodeSearch,证明关键词搜索足以在大型代码库中检索相关上下文,无需GPU资源,并在代码上下文竞赛基准上取得Kotlin和Python轨道0.748和0.725的chRF分数。
摘要:
检索增强生成(RAG)框架旨在通过包含另一个模块来检索相关上下文以构建输入提示,从而增强代码语言模型(CLMs)。然而,这些检索模块通常使用语义搜索,需要大量的计算资源来训练和托管这些嵌入模型,使得它们无法集成到轻量级应用程序中,例如IDE内的基于AI的代码补全。在这篇解决方案论文中,我们证明了在大型代码库中使用关键词搜索足以检索相关且有用的代码上下文,而无需大量的GPU资源。我们的解决方案所发现的代码上下文的有用性通过其在代码上下文竞赛基准上的补全结果得到证明,在Kotlin和Python轨道上分别达到0.748和0.725的chRF分数。
英文摘要:
Retrieval-Augmented Generation (RAG) frameworks aim to enhance Code Language Models (CLMs) by including another module for retrieving relevant context to construct the input prompt. However, these retrieval modules commonly use semantic search, requiring substantial computational resources for training and hosting these embedded models, making them infeasible to integrate into lightweight applications such as in-IDE AI-based code completion. In this solution paper, we prove that using keyword-search is sufficient to retrieve relevant and useful code context inside large codebases, without the need for extensive GPU resources. The usefulness of code contexts found by our solution is demonstrated through their completion results on the Code Context Competition's benchmark, reaching 0.748 and 0.725 chRF scores on Kotlin and Python tracks, respectively.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。