然后会再对这k个indexing对应的原始文本再重排序(reranker),这时候是直接用原始文本用一个模型直接去判断相似性,从而提高最终的匹配效果。embedding模型和reranker模型会直接影响到检索的效果。
1. 引言 在现代智能代码编辑器中,代码库索引功能至关重要。其主要目标是让编辑器在用户提问或请求代码建议时,能够快速检索并提供与整个项目相关的上下文信息。Cursor 作为一款集成了 AI 技术的编辑器,不仅继承了 VS Code 的基本功能,还通过对代码库内容进行预处理、嵌入计算和高效检索,使得语言模型可以获得更准确、丰...
4.7 Codebase indexing Codebase indexing 和安装时提到的Codebase-wide是有关系的。前边提到codebase-wide的作用是是否开启代码库范围功能。如果开启这个功能,Cursor会将你的代码库切分成一个个个的小片段上传到服务器中,并计算嵌入向量,这些向量用于理解代码的含义。在计算完嵌入向量后,Cursor服务器会删除你的源代码,...
Some rules become unnecessary as codebase grows as the AI will follow surrounding code styles and conventions The minimal amount of rules, the better - so prune rules as the codebase changes or models improve Contributing Contributions to improve base rules or suggest new templates are welcome. P...
More Stable Codebase Indexing We ship a new version of indexing which should be significantly more stable than previous versions September 20, 2023 0.11.1 0.11.8 - Patches Fixes issues with Cmd-k, SSH, Python support, Vim (rolling back to 1.25.2 until this issue is fixed: VSCodeVim/Vim#...
hidden text-pretty text-base [text-overflow:ellipsis] md:mb-6">UPDATE (0.45.1-0.45.11): Fixes issue with older agent conversations, indexing stability, downloading incorrect extension versions, missing package on windows, crash on opening long composer sessions, latency on pasting code....
function query_codebase(vector_index, metadata_list, query_text, top_k=5): query_embedding = compute_embedding(query_text) # 利用向量索引检索最相似的 top_k 个嵌入 indices, distances = vector_index.search(query_embedding, top_k) results = [] ...
codebase indexing,顾名思义就是对你的vscode打开的代码库,建立索引(indexing)。这个和RAG的技术原理...
Some rules become unnecessary as codebase grows as the AI will follow surrounding code styles and conventions The minimal amount of rules, the better - so prune rules as the codebase changes or models improve A rule you need today, may be a rule you do not need tomorrow, and then again...