Langchain-Chatchat icon indicating copy to clipboard operation
Langchain-Chatchat copied to clipboard

知识库检索的代码

Open misi0202 opened this issue 9 months ago • 2 comments

我想修改一下知识库检索的代码 因为目前的召回率比较差 想改为混合检索的方式 请问在哪个位置 好像0.1版本的检索是根据上下文的,请问一下代码位置 想做参考 还有注意到0.3.x版本有改进这个检索模式的想法 问一下什么时候能上线呢

misi0202 avatar May 08 '24 05:05 misi0202

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


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[bot] avatar May 08 '24 05:05 dosubot[bot]

@DosuBot 混合检索和父子级文档召回,应该在哪里添加?可以通过修改项目代码实现吗

AMAG-AB avatar May 10 '24 07:05 AMAG-AB

这个问题已经被标记为 stale ,因为它已经超过 30 天没有任何活动。

github-actions[bot] avatar Jun 09 '24 21:06 github-actions[bot]