unit-mesh / auto-dev

🧙‍AutoDev: The AI-powered coding wizard with multilingual support 🌐, auto code generation 🏗️, and a helpful bug-slaying assistant 🐞! Customizable prompts 🎨 and a magic Auto Dev/Testing/Document/Agent feature 🧪 included! 🚀
https://ide.unitmesh.cc/
Mozilla Public License 2.0
2.62k stars 303 forks source link

实现快速的相似度搜索 #200

Open c913168497 opened 1 month ago

c913168497 commented 1 month ago
  1. 希望能实现一个功能,将文本数据向量化后存储在向量数据库中,以实现快速的相似度搜索,从而检索与输入查询相关的文本片段,再将检索到的文本输入,最终形成我需要的提示词
phodal commented 1 month ago

我们在 VSCode 版本实现了类似的功能,但是导致插件体积太大,暂时没有精力迁移到 IDEA 中。详细可以参考:https://github.com/unit-mesh/auto-dev-vscode

比较理想的形式应该是使用额外的 embedding 包和向量数据库。

欢迎来 PR

c913168497 commented 1 month ago

有没有这方面embedding包和向量数据库推荐呢~

phodal commented 1 month ago

可以参考 VSCode 版本

phodal commented 1 month ago

@c913168497

方式 1:使用 TFIDF 算法。Copilot 主要用的就是他,和 embedding 之类的相比,还是相当靠谱的。 方式 2:在 Unit Mesh 中,可以用我们的 LLM SDK 来开发:https://github.com/unit-mesh/chocolate-factory