dify icon indicating copy to clipboard operation
dify copied to clipboard

After updating to 0.9.2, workflow with knowledge retrieval became unexecutable due to lack of rerank model

Open mabuchs opened this issue 2 years ago • 10 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).
  • [ ] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [X] Please do not modify this template :) and fill in all the required fields.

Dify version

0.9.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. In model setup, only setup LLM models. (without any rerank models)
  2. Create workflow and include knowledge retrieval node
  3. Try [Run]

DSL for the workflow is attatched. sampleflow.yml.txt

✔️ Expected Behavior

Workflow can be executed even if rerank model is not enabled on Dify.

❌ Actual Behavior

After reproduction steps, it shows error "Rerank model is required". This didn't occur until v0.9.1. image

mabuchs avatar Oct 14 '24 16:10 mabuchs

Hey @mabuchs! 👋 I'm here to help you with any bugs, questions, or contributions you have for Dify. I'm an expert bot and can assist you while you wait for a human maintainer.

In Dify 0.9.2, the workflow with knowledge retrieval requires a rerank model due to the use of hybrid search techniques that improve recall by combining different retrieval technologies. The rerank model is necessary to merge and normalize query results, ensuring the most relevant content is identified [1][2].

To bypass the rerank model requirement, you can use the Weighted Score setting. This setting uses internal scoring mechanisms without needing an external rerank model, allowing you to adjust the weight ratio sliders for semantics or keywords to select the most appropriate content matching strategy [3].

To continue talking to Dosu, mention @dosu.

dosubot[bot] avatar Oct 14 '24 16:10 dosubot[bot]

Set a rerank model here.

image

crazywoola avatar Oct 15 '24 00:10 crazywoola

Thank you for response.

Yes, I know how to set rerank model. But I want to know if I can use knowledge retrieval node in an environment without rerank model (due to restirction of model selection in company).

Let me confirm: using knowledge retrieval without rerank model became completely unsupported (even if using Weighted Score)? (In v0.9.1, I could use it if I use only one knowledge and weighted score)

mabuchs avatar Oct 15 '24 01:10 mabuchs

@crazywoola Could you kindly confirm the question above?

mabuchs avatar Oct 15 '24 08:10 mabuchs

This issue remains. I cannot run my app from the workflow editor due to this error, while the app can be published without any problem. @crazywoola Could you please reconsider this issue? I have also sent an email for support.

fniu avatar Oct 20 '24 08:10 fniu

@mabuchs @fniu Hi, could you please change the setting of the knowledge retrieval node back to Weighted Score again and check if it works as it did before? image

kurokobo avatar Oct 20 '24 13:10 kurokobo

@mabuchs @fniu Hi, could you please change the setting of the knowledge retrieval node back to Weighted Score again and check if it works as it did before?

I think this issue may only exist for workflows that are created before 0.9.2. I have tested it with new workflows which seem to work fine. For existing workflows, I have changed different settings back and forth, and the issue still remains. One action may be able to fix it though (I came across by accident), which is to click tab "Monitoring" and then back to "Orchestrate" and the error was gone.

fniu avatar Oct 20 '24 19:10 fniu

@crazywoola @kurokobo There is still this problem in the external knowledge

kkjinping avatar Oct 21 '24 04:10 kkjinping

seem problem we meet😭

makabakaxy avatar Oct 26 '24 11:10 makabakaxy

I tried creating new workflow on latest version, then I confirmed this has been resolved. thank you!

mabuchs avatar Oct 31 '24 03:10 mabuchs