dify icon indicating copy to clipboard operation
dify copied to clipboard

The same knowledge base search version 1.4 is much slower than 1.3

Open NameJaho opened this issue 7 months ago • 9 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

1.4

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

The same knowledge base search version 1.4 is much slower than 1.3

Image

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

NameJaho avatar May 16 '25 12:05 NameJaho

Hello @NameJaho! I'm Dosu, a friendly bot here to help you with bugs, questions, and anything related to contributing. I'm here while you wait for a human maintainer. Let's tackle this together!

In version 1.4, there are several configuration settings that could affect the performance of the knowledge base search. These include the TopK and Score Threshold parameters, which are used during the Rerank phase. The TopK parameter filters the most similar text chunks to the user's question, and a higher value can increase the number of results processed, potentially slowing down performance. The Score Threshold sets the similarity threshold for filtering text chunks, and a higher value may reduce the number of recalled texts, affecting performance by reducing the number of results to process [1].

Additionally, the Hybrid Search mode combines full-text search and vector search, performing both simultaneously, which can impact performance. This mode includes a reordering step to select the best-matching results, and adjusting the Weight settings for semantic and keyword priorities can influence search performance [2].

If you are experiencing slower performance in version 1.4 compared to 1.3, reviewing and adjusting these settings might help optimize the search speed.

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 May 16 '25 12:05 dosubot[bot]

But version 1.3 is not slow, is there something changed in 1.4?

NameJaho avatar May 16 '25 12:05 NameJaho

@dosu how can i roll back to 1.3

NameJaho avatar May 19 '25 03:05 NameJaho

I couldn't find specific details on changes between versions 1.3 and 1.4 that might affect performance. However, you might want to check the configuration settings like TopK and Score Threshold in version 1.4, as they can impact performance [1].

Regarding rolling back to version 1.3, I couldn't find a specific rollback guide for Dify. Generally, in a Docker environment, you can roll back by pulling the previous version's image and redeploying it. You would typically do this by specifying the version tag for 1.3 in your Docker setup. Make sure to back up your data before proceeding with a rollback.

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 May 19 '25 03:05 dosubot[bot]

me too

hiwuye avatar May 19 '25 06:05 hiwuye

same issue.

YulunCai avatar May 20 '25 01:05 YulunCai

I'm having the same issue, but my version is 1.3.1, which is significantly slower than the previous 1.1.3. Previously, my knowledge base queries always returned results in under 1 second. Now it takes over 10 seconds.

Image

Frank7680 avatar May 22 '25 07:05 Frank7680

+1 Same issue the performance was down @crazywoola could you help us

huynhbaobk avatar May 29 '25 06:05 huynhbaobk

Afaik, we do not receive such kinds of notifications of the performances issues. And the provided information is useless to investigate the root cause. @huynhbaobk

crazywoola avatar May 30 '25 06:05 crazywoola

@hiwuye @YulunCai change vector_store to milvus and done

NameJaho avatar Jun 05 '25 09:06 NameJaho

Image

Image

It doesn't seem to have been resolved

hiwuye avatar Jun 26 '25 02:06 hiwuye