Langchain-Chatchat
Langchain-Chatchat copied to clipboard
知识库检索的代码
我想修改一下知识库检索的代码 因为目前的召回率比较差 想改为混合检索的方式 请问在哪个位置 好像0.1版本的检索是根据上下文的,请问一下代码位置 想做参考 还有注意到0.3.x版本有改进这个检索模式的想法 问一下什么时候能上线呢
To modify the knowledge base retrieval code for a hybrid approach, you can start by looking at the knowledge_base_chat
function in server/chat/knowledge_base_chat.py
from version 0.1. This function is key for context-based retrieval. For the upcoming improvements in version 0.3.x, the search_docs
function within server/knowledge_base/kb_doc_api.py
introduces advanced features like vector search and metadata filtering, which could be integral to your hybrid retrieval system.
Unfortunately, there's no specific release date mentioned for version 0.3.x updates. You might want to check the issue tracker for any updates on the release plan.
Creating a hybrid retrieval system would involve integrating the context-based approach from version 0.1 with the new features in version 0.3.x. This requires a good understanding of both versions' codebases and the retrieval algorithms they employ.
Details
Sources
- 如何提高知识库检索的正确性?
- 如何使用高级知识库工具,智能选择调用多个或者单个知识库并查询内容。
- 0.3.x 版本
- [FEATURE] 在知识库问答中添加keyBERT支持
- [FEATURE] 建议知识库做成多选,可以同时在多个知识库进行检索
- 关于检索内容的扩展疑问
- 如何提升根据问题搜索到对应知识的准确率
- server/chat/knowledge_base_chat.py
- server/agent/tools/search_knowledgebase_once.py
- server/agent/tools/search_knowledgebase_complex.py
- server/agent/tools/search_knowledgebase_simple.py
- server/knowledge_base/kb_doc_api.py
About Dosu This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
To continue the conversation, mention @dosu.
@DosuBot 混合检索和父子级文档召回,应该在哪里添加?可以通过修改项目代码实现吗
这个问题已经被标记为 stale
,因为它已经超过 30 天没有任何活动。