External Knowledge Base Retrieval Setting (Top K and Score Threshold) Not Taking Effect #17012

Closed
opened 2026-02-21 19:30:13 -05:00 by yindo · 0 comments
Owner

Originally created by @oiuv on GitHub (Sep 9, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • 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, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.8.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When using the External Knowledge Base, I found that the Retrieval Setting parameters don't work as expected. During testing, the Top K is always fixed at 4, and the Score Threshold is always fixed at 0.0, regardless of the values I set in the configuration interface. I expected the retrieval results to change according to the customized Top K and Score Threshold values, but this isn't happening.

My settings:
Image

debug output:

Image

✔️ Expected Behavior

I expected the retrieval results to change according to the customized Top K and Score Threshold values, but this isn't happening.

Actual Behavior

I expected the retrieval results to change according to the customized Top K and Score Threshold values, but this isn't happening.

Originally created by @oiuv on GitHub (Sep 9, 2025). ### 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] 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, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.8.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce When using the External Knowledge Base, I found that the Retrieval Setting parameters don't work as expected. During testing, the Top K is always fixed at 4, and the Score Threshold is always fixed at 0.0, regardless of the values I set in the configuration interface. I expected the retrieval results to change according to the customized Top K and Score Threshold values, but this isn't happening. My settings: <img width="889" height="638" alt="Image" src="https://github.com/user-attachments/assets/a81174f8-1079-45e0-bbf0-7f7d530d0c39" /> debug output: <img width="761" height="356" alt="Image" src="https://github.com/user-attachments/assets/425f50a9-ba6f-47f9-89e7-5f3920a48135" /> ### ✔️ Expected Behavior I expected the retrieval results to change according to the customized Top K and Score Threshold values, but this isn't happening. ### ❌ Actual Behavior I expected the retrieval results to change according to the customized Top K and Score Threshold values, but this isn't happening.
yindo added the 🐞 bug label 2026-02-21 19:30:13 -05:00
yindo closed this issue 2026-02-21 19:30:13 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#17012