dify icon indicating copy to clipboard operation
dify copied to clipboard

knowledge-retrieval: rerank model can’t be closed

Open xiayouran opened this issue 1 year ago • 1 comments

Self Checks

  • [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [x] I have searched for existing issues search for existing issues, including closed ones.
  • [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [x] Please do not modify this template :) and fill in all the required fields.

Dify version

0.15.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I used an external knowledge base (external API) in the knowledge retrieval module, and it was successful in the recall test of the knowledge base, with the retrieval results returning normally. In the "Recall Settings" of the knowledge retrieval module, there is a setting for the rerank model. I did not want to use the rerank model, so I turned off the button. However, during the testing process, the switch for the rerank model automatically turned on, resulting in the knowledge retrieval module returning empty results.

Image

✔️ Expected Behavior

Directly return the search results of the external knowledge base API.

❌ Actual Behavior

Due to the inability to close the rerank model, the returned result is empty.

xiayouran avatar Feb 15 '25 15:02 xiayouran

I found a similar closed issue related to the rerank model switch. The suggested solution was to ensure that the system does not attempt to initialize the rerank model when the switch is off, allowing the knowledge retrieval node to function without it. This might indicate that the problem could be related to a configuration issue where the rerank model is being initialized despite being disabled [1].

Additionally, the rerank model switch turns on automatically under certain conditions, such as when the indexMethod is set to 'high_quality', and either retrievalConfig.reranking_enable is true or retrievalConfig.search_method is RETRIEVE_METHOD.hybrid, among other conditions [2].

You might want to check if any of these conditions are being met in your configuration, which could be causing the rerank model to activate automatically.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

dosubot[bot] avatar Feb 15 '25 15:02 dosubot[bot]

Duplicated, already fixed in https://github.com/langgenius/dify/pull/13721

crazywoola avatar Feb 16 '25 09:02 crazywoola