Requires a simple retrieval model #5420

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

Originally created by @jiandanfeng on GitHub (Sep 5, 2024).

Self Checks

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

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

Added a new retrieval mode, the existing retrieval mode: "N-of-1 retrieval Mode"
and "Multi-Path retrieval Mode", which are not friendly to simple RAG with only one knowledge base.
If choose "N-of-1 retrieval Mode", it will go through a large model judgment. If you choose "Multi-Path retrieval Mode", you will need to configure the rerank model. If the knowledge base itself has already configured the rerenk model, it will be repeated. Therefore, a simple retrieval mode is required, which requires neither large model judgment nor rerank model.

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 @jiandanfeng on GitHub (Sep 5, 2024). ### Self Checks - [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. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. Added a new retrieval mode, the existing retrieval mode: "N-of-1 retrieval Mode" and "Multi-Path retrieval Mode", which are not friendly to simple RAG with only one knowledge base. If choose "N-of-1 retrieval Mode", it will go through a large model judgment. If you choose "Multi-Path retrieval Mode", you will need to configure the rerank model. If the knowledge base itself has already configured the rerenk model, it will be repeated. Therefore, a simple retrieval mode is required, which requires neither large model judgment nor rerank model. ### 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 💪 enhancement label 2026-02-21 18:10:53 -05:00
yindo closed this issue 2026-02-21 18:10:53 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 5, 2024):

I found a similar unsolved discussion: Support custom reranker [1].

For your request, you can add a simple retrieval mode that does not require large model judgment or a rerank model. The RETRIEVE_TYPE.invertedIndex retrieval method is described as "economical," which implies it does not use large model judgment or rerank models.

Additionally, the RetrievalConfig component in the Dify platform allows for configuring retrieval modes, including simpler ones without reranking models. The handleChange function within this component manages the retrieval configuration, ensuring that reranking models are only applied when necessary [2][3].

Moreover, the N-of-1 retrieval mode autonomously selects the single most relevant dataset to query for related text based on user intent and dataset descriptions, without requiring a rerank model. This mode is suitable for applications with highly distinct and fewer datasets [4].

You can configure these settings to achieve a simpler retrieval mode that meets your requirements.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Sep 5, 2024): <!-- Answer --> I found a similar unsolved discussion: [Support custom reranker](https://github.com/langgenius/dify/discussions/3779) <sup>[[1]](https://github.com/langgenius/dify/discussions/3779)</sup>. For your request, you can add a simple retrieval mode that does not require large model judgment or a rerank model. The `RETRIEVE_TYPE.invertedIndex` retrieval method is described as "economical," which implies it does not use large model judgment or rerank models. Additionally, the `RetrievalConfig` component in the Dify platform allows for configuring retrieval modes, including simpler ones without reranking models. The `handleChange` function within this component manages the retrieval configuration, ensuring that reranking models are only applied when necessary <sup>[[2]](https://github.com/langgenius/dify/blob/main/web/app/components/datasets/common/retrieval-param-config/index.tsx)</sup><sup>[[3]](https://github.com/langgenius/dify/blob/main/web/app/components/workflow/nodes/knowledge-retrieval/components/retrieval-config.tsx)</sup>. Moreover, the N-of-1 retrieval mode autonomously selects the single most relevant dataset to query for related text based on user intent and dataset descriptions, without requiring a rerank model. This mode is suitable for applications with highly distinct and fewer datasets <sup>[[4]](https://github.com/langgenius/dify-docs/blob/main/en/learn-more/extended-reading/retrieval-augment/retrieval.md)</sup>. You can configure these settings to achieve a simpler retrieval mode that meets your requirements. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Sep 5, 2024):

https://docs.dify.ai/guides/knowledge-base/integrate-knowledge-within-application

  • N-to-1 will be deprecated.
  • You choose weighted score which does not need to configure the rerank model.
@crazywoola commented on GitHub (Sep 5, 2024): https://docs.dify.ai/guides/knowledge-base/integrate-knowledge-within-application - N-to-1 will be deprecated. - You choose weighted score which does not need to configure the rerank model.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5420