dify icon indicating copy to clipboard operation
dify copied to clipboard

Can the minimum threshold for knowledge base annotation be lowered?

Open kevintsai1202 opened this issue 1 year ago • 6 comments

Self Checks

  • [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.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

Some embedding models yield relatively low scores, and setting the minimum annotation threshold at 0.8 often fails to achieve matches. Could the minimum threshold be lowered to 0.7?

2. Additional context or comments

圖片

3. Can you help us with this feature?

  • [ ] I am interested in contributing to this feature.

kevintsai1202 avatar Dec 17 '24 08:12 kevintsai1202

https://github.com/langgenius/dify/blob/f96fdc2970fe408ca3d671f38b1db25e4959858e/web/app/components/base/features/new-feature-panel/annotation-reply/score-slider/index.tsx#L21-L43

Actually you can, but I would like to know the number you would like.

crazywoola avatar Dec 17 '24 09:12 crazywoola

https://github.com/langgenius/dify/blob/f96fdc2970fe408ca3d671f38b1db25e4959858e/web/app/components/base/features/new-feature-panel/annotation-reply/score-slider/index.tsx#L21-L43

Actually you can, but I would like to know the number you would like.

Currently, testing with 0.7 achieves better matching.

kevintsai1202 avatar Dec 17 '24 18:12 kevintsai1202

Is there a chance to implement this enhancement?

kevintsai1202 avatar Dec 26 '24 02:12 kevintsai1202

Hi, @kevintsai1202. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.

Issue Summary

  • You suggested lowering the minimum threshold for knowledge base annotation from 0.8 to 0.7.
  • This change is due to low scores from some embedding models affecting effective matching.
  • User crazywoola mentioned that the threshold can be adjusted and asked for the desired number.
  • You tested with a 0.7 threshold and found it yielded better results.
  • You inquired about the possibility of implementing this enhancement.

Next Steps

  • Is this issue still relevant to the latest version of the Dify repository? If so, please comment to keep the discussion open.
  • Otherwise, this issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

dosubot[bot] avatar Jan 26 '25 16:01 dosubot[bot]

Hi, @kevintsai1202. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.

Issue Summary

* You suggested lowering the minimum threshold for knowledge base annotation from 0.8 to 0.7.

* This change is due to low scores from some embedding models affecting effective matching.

* User crazywoola mentioned that the threshold can be adjusted and asked for the desired number.

* You tested with a 0.7 threshold and found it yielded better results.

* You inquired about the possibility of implementing this enhancement.

Next Steps

* Is this issue still relevant to the latest version of the Dify repository? If so, please comment to keep the discussion open.

* Otherwise, this issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

Yes, the latest version requires this adjustment. If it's possible to set the minimum value in the .env environment, that would also work.

kevintsai1202 avatar Jan 26 '25 16:01 kevintsai1202

@takatost, the user @kevintsai1202 has confirmed that the adjustment to lower the minimum threshold for knowledge base annotation is still relevant in the latest version. They also mentioned that being able to set the minimum value in the .env environment would be a helpful solution. Could you please assist them with this issue?

dosubot[bot] avatar Jan 26 '25 16:01 dosubot[bot]