-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BGE-M3如何在RAG应用中使用Hybrid Retrieve #458
Comments
我能想到的使用流程大概是这样的, 对原始的文档, 通过BGE-M3 进行向量化, 由于M3 可以同时返回dense 和 sparse embeding. 将两种向量同时存入miluvs中不同的列, 检索的时候, 使用M3 将query同时向量化dense和sparse 同时进行检索. 获得dense+ sparse 再进行rerank. 这个思路是否正确? |
感谢对我们工作的关注! 建好索引后,可让dense和sparse索引分别检索一部分数据,再获得dense+ sparse进行重排,也可以利用其他方法重排。 |
非常感谢您的回复,祝新年快乐,bge越来越好 |
@weiminw BTW , MLDR目录下似乎已经有了使用hybrid检索的例子,您可以看一下 |
qdrant 支持稠密向量和稀疏向量,我打算试一试,实现 Vespa 使用的加权稠密/稀疏/科尔伯特检索。 |
hi 请问您qdrant研究有进展吗,能否交流一下 |
我刚刚完成了我的小型平台,该平台可以批量处理文档,并将嵌入内容保存为 avro 格式。我使用 Podman 而不是 Docker 启动了一个 qdrant 实例,没有出现任何问题。今天晚些时候,我将开始为向量编制索引,并向大家汇报进展情况。 |
If you could, could u make a tutorial for how to use podman to run qdrant and combine them with BGE M3, I think that will be great! |
我刚才试过了,本地模式下,还是采用的暴力求解的方式,通过计算2个稀疏向量的dot #product后排序完成检索过程(https://github.com/qdrant/qdrant-client/blob/master/qdrant_client/local/sparse.py#L60); 不过这不是我想要的,在大数据集下,应该有一种合适的存储 & 索引机制同时能够满足 低成本的存储 以及 高效的topn检索。跟dense向量类似。 qdrant的代码可以参考下面的:
|
The new version of Milvus has been released. Now, you can use the hybrid retrieval of bge-m3 following https://github.com/milvus-io/pymilvus/blob/master/examples/hello_hybrid_sparse_dense.py |
似乎就是分别计算2个向量得分后通过RRF进行重新排序。 |
@staoxiao @c121914yu 不好意思打扰了,感谢BGE模型卓越的性能,请问对于[dense,sparse]的混合搜索结果,能否有方法使用大模型的api进行rerank。目前设计的hybrid_earch方法似乎是根据两种向量的相似度得分用RRF进行rerank的,貌似都是基于milvus的向量之间的重排。您觉得对于RRF之后的结果使用大模型再次重排是否有必要。以及能否有机会针对两种向量使用大模型对于语义进行混合的重排,我们之前的RAG模块是用dense向量找到文本对于文本进行大模型的重排序。再次感谢BGE做出的不可替代的贡献。 |
首先感谢BGE提供的这么强大的模型, 我们在之前的RAG应用中, 对企业的文档通过BGE将资料转成向量存储到milvus中, 用户查询时通过dense retrieve 从milvus召回文档,我们使用的是langchain作为框架. 请问如果用BGE配合使用做 dense+sparse retrieve 有没有例子可以参考. 目前是在不知道如何进行. 万分感谢.
The text was updated successfully, but these errors were encountered: