Disable KB retrieval settings not in use #21610

Open
opened 2026-02-21 20:13:28 -05:00 by yindo · 1 comment
Owner

Originally created by @DavideDelbianco on GitHub (Jan 13, 2026).

Originally assigned to: @jubinsoni on GitHub.

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 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.

Since the code suggests that when there's just a single Dataset selected in KB retrieval node, the weights / rerank part will not be executed, this should be reflected in the UI and disable those settings.
#30872

With the exception of top_k and score_threshold which is applied as a filter after the dataset retrieval happened (with possibly different top_k and thresholds.

NOTE: the help tooltip of top_k says: "Used to filter chunks that are most similar to user questions. The system will also dynamically adjust the value of Top K, according to max_tokens of the selected model."

That some fake made-up feature, because the node does not accept a value less than 1 and the top_k value, should it be somehow 0 or not set, will be set to fixed values, not related to model max_tokens capabilities.

2. Additional context or comments

No response

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @DavideDelbianco on GitHub (Jan 13, 2026). Originally assigned to: @jubinsoni on GitHub. ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [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, otherwise it will be closed. - [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. Since the code suggests that when there's just a single Dataset selected in KB retrieval node, the weights / rerank part will not be executed, this should be reflected in the UI and disable those settings. #30872 With the exception of top_k and score_threshold which is applied as a filter after the dataset retrieval happened (with possibly different top_k and thresholds. **NOTE:** the help tooltip of top_k says: "Used to filter chunks that are most similar to user questions. The system will also dynamically adjust the value of Top K, according to max_tokens of the selected model." That some fake made-up feature, because the node does not accept a value less than 1 and the top_k value, should it be somehow 0 or not set, will be set to fixed values, not related to model max_tokens capabilities. ### 2. Additional context or comments _No response_ ### 3. Can you help us with this feature? - [ ] I am interested in contributing to this feature.
yindo added the 💪 enhancementgood first issue labels 2026-02-21 20:13:29 -05:00
Author
Owner

@jubinsoni commented on GitHub (Jan 15, 2026):

pr to fix this
https://github.com/langgenius/dify/pull/31011

@crazywoola pls review

@jubinsoni commented on GitHub (Jan 15, 2026): pr to fix this https://github.com/langgenius/dify/pull/31011 @crazywoola pls review
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#21610