langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
45.07k stars 6.33k forks source link

When multiWay are selected and set to weighted_score, it still requires configuring a rerank model in workflow #6919

Closed Kevin9703 closed 1 month ago

Kevin9703 commented 1 month ago

Self Checks

Dify version

0.6.15

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

image image

✔️ Expected Behavior

When weighted_score is selected, there is no need to configure a rerank model.

❌ Actual Behavior

When multiWay are selected and set to weighted_score, it still requires configuring a rerank model in workflow

dosubot[bot] commented 1 month ago

The system still requires configuring a rerank model when the multiWay option is selected and set to weighted_score because the Multi-Path Recall mode involves querying related text fragments from multiple knowledge bases and then reordering the retrieved documents semantically. This reordering step, known as re-ranking, requires a rerank model to calculate the relevance score between the user question and each candidate document, ensuring the best result is selected [1][2][3].

If you want to bypass the rerank model requirement, you can set the reranking_model to undefined in the multiple_retrieval_config. However, it is generally recommended to configure a rerank model for better performance [4][5].

To continue talking to Dosu, mention @dosu.