If I set the "score" Slider to the far left, the value of "score" will change to 0.8. #5309

Closed
opened 2026-02-21 18:10:21 -05:00 by yindo · 4 comments
Owner

Originally created by @MrXionGe on GitHub (Aug 29, 2024).

Originally assigned to: @JzoNgKVO on GitHub.

Self Checks

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

Dify version

0.6.14 | 7.0.0 | 7.0.2

Cloud or Self Hosted

Cloud, Self Hosted (Docker)

Steps to reproduce

1. Select an app (chatbot with workflow)
2. Enter the workflow editing page
3. Select the Knowledge Retrieval component
4. Recall Settings
5. Change the "score" value

微信截图_20240830103236

✔️ Expected Behavior

If I set the "score" Slider to the far left, the value of "score" should be 0.
Because in the knowledge base settings, retrieval settings, the "score" value is like this.

Actual Behavior

If I set the "score" Slider to the far left, the value of "score" will change to 0.8.

https://github.com/user-attachments/assets/6e3beb86-3928-481d-ae5a-24b2f42c3ef9

Originally created by @MrXionGe on GitHub (Aug 29, 2024). Originally assigned to: @JzoNgKVO on GitHub. ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.6.14 | 7.0.0 | 7.0.2 ### Cloud or Self Hosted Cloud, Self Hosted (Docker) ### Steps to reproduce **1. Select an app (chatbot with workflow) 2. Enter the workflow editing page 3. Select the Knowledge Retrieval component 4. Recall Settings 5. Change the "score" value** ![微信截图_20240830103236](https://github.com/user-attachments/assets/7f94c577-690e-4095-9485-56c29a7d2850) ### ✔️ Expected Behavior If I set the "score" Slider to the far left, the value of "score" should be 0. Because in the knowledge base settings, retrieval settings, the "score" value is like this. ### ❌ Actual Behavior If I set the "score" Slider to the far left, the value of "score" will change to 0.8. https://github.com/user-attachments/assets/6e3beb86-3928-481d-ae5a-24b2f42c3ef9
yindo added the 🐞 bug label 2026-02-21 18:10:21 -05:00
yindo closed this issue 2026-02-21 18:10:21 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 29, 2024):

@MrXionGe Hello there! I'm here to help you with bug fixes, answer your questions, and guide you on how to contribute. Let's squash those bugs together! 🤖

The "score" Slider changes the value to 0.8 instead of 0 when set to the far left because the min property of the Slider component is set to 80. This means the minimum value of the slider is 80, which corresponds to a score of 0.8.

<Slider
  max={100}
  min={80}
  step={1}
  value={value}
  onChange={onChange}
/>

The min value of 80 translates to a score of 0.8, hence when the slider is set to the far left, the value is 0.8 [1].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Aug 29, 2024): <!-- Greeting --> @MrXionGe Hello there! I'm here to help you with bug fixes, answer your questions, and guide you on how to contribute. Let's squash those bugs together! 🤖 <!-- Answer --> The "score" Slider changes the value to 0.8 instead of 0 when set to the far left because the `min` property of the `Slider` component is set to 80. This means the minimum value of the slider is 80, which corresponds to a score of 0.8. ```tsx <Slider max={100} min={80} step={1} value={value} onChange={onChange} /> ``` The `min` value of 80 translates to a score of 0.8, hence when the slider is set to the far left, the value is 0.8 <sup>[[1]](https://github.com/langgenius/dify/blob/main/web/app/components/app/configuration/toolbox/score-slider/index.tsx)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@MrXionGe commented on GitHub (Aug 29, 2024):

@dosu
Thanks you.
Knowledge Base --> Settings --> Search Settings
On this page, the minimum value of "score" is 0. If I slide the slider to the far left, the value of "score" is 0.
image

It would be best if the rules for the "score" parameter are the same on the "workflow" page and on the "knowledge base settings" page.

@MrXionGe commented on GitHub (Aug 29, 2024): @dosu Thanks you. Knowledge Base --> Settings --> Search Settings On this page, the minimum value of "score" is 0. If I slide the slider to the far left, the value of "score" is 0. ![image](https://github.com/user-attachments/assets/069632be-f6b2-4ba1-ad47-22a29e955447) It would be best if the rules for the "score" parameter are the same on the "workflow" page and on the "knowledge base settings" page.
Author
Owner

@dosubot[bot] commented on GitHub (Aug 29, 2024):

The discrepancy in the minimum value of the score parameter between the workflow page and the knowledge base settings page is likely due to different configurations for the Slider component.

In the workflow page, the Slider component's min value is set to 80, which translates to a score of 0.8. This is why the score changes to 0.8 when the slider is set to the far left.

To align the behavior of the score parameter on both pages, you can adjust the min value of the Slider component in the workflow page to 0. Here is how you can modify the Slider component:

<Slider
  max={100}
  min={0}  // Change this value to 0
  step={1}
  value={value}
  onChange={onChange}
/>

This change will ensure that the minimum value of the score parameter is 0 when the slider is set to the far left, consistent with the knowledge base settings page.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Aug 29, 2024): <!-- Answer --> The discrepancy in the minimum value of the `score` parameter between the workflow page and the knowledge base settings page is likely due to different configurations for the `Slider` component. In the workflow page, the `Slider` component's `min` value is set to 80, which translates to a score of 0.8. This is why the score changes to 0.8 when the slider is set to the far left. To align the behavior of the `score` parameter on both pages, you can adjust the `min` value of the `Slider` component in the workflow page to 0. Here is how you can modify the `Slider` component: ```tsx <Slider max={100} min={0} // Change this value to 0 step={1} value={value} onChange={onChange} /> ``` This change will ensure that the minimum value of the `score` parameter is 0 when the slider is set to the far left, consistent with the knowledge base settings page. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@MH4GF commented on GitHub (Aug 31, 2024):

@JzoNgKVO @crazywoola
I am interested in contributing to this issue! If you haven't already worked on yours, may I get started?

@MH4GF commented on GitHub (Aug 31, 2024): @JzoNgKVO @crazywoola I am interested in contributing to this issue! If you haven't already worked on yours, may I get started?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5309