You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@SKKKKYLAR Hello there! 👋 I'm here to help you with any bugs, questions, or contributions you have. I'm Dosu, a bot designed to assist you while you're waiting for a human maintainer.
To modify the VECTOR_SEARCH_TOP_K limit to allow more than 20 matches, you can adjust the top_k parameter in the SearchKbDocsParam class. This parameter is set by default to VECTOR_SEARCH_TOP_K, but you can specify a different value when creating an instance of SearchKbDocsParam. Here's an example:
fromopen_chatcaht.types.knowledge_base.doc.search_kb_docs_paramimportSearchKbDocsParamsearch_params=SearchKbDocsParam(
query="your search query",
knowledge_base_name="your knowledge base name",
top_k=30# Set this to the desired number of matches
)
This will allow you to retrieve more than 20 matches by setting top_k to a higher value [1].
Additionally, there is a similar open issue discussing this limitation, where a suggested solution involves modifying the top_k in the ensemble.py and vectorstore.py files within the retrievers directory of your project. If this doesn't work, you might need to modify it in your project's virtual environment [2].
问题描述 / Problem Description
匹配知识条数最多只能20,为啥不能修改的更高呢?
匹配的条数限制了我最后正确答案的输出,如果我的正确匹配答案有27个,就没办法找全
即使是使用了history,由于每次都是按照分数排列再取前VECTOR_SEARCH_TOP_K条信息,我就一直没办法找全
有什么办法修改VECTOR_SEARCH_TOP_K的限制吗?
或者其他的方法来解决
The text was updated successfully, but these errors were encountered: