Use LLM to decide whether RAG query should be sent #3978

Closed
opened 2026-02-21 18:04:13 -05:00 by yindo · 3 comments
Owner

Originally created by @lschaupp on GitHub (Jun 4, 2024).

Originally assigned to: @VincePotato on GitHub.

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).
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing?

RAG

2. Describe the feature you'd like to see

I tried to use the RAG feature. However it could be better. I was wondering if you are planning the functionality that during a RAG query, another query goes to the chat LLM asking it whether a query to the embedding model is actually necessary. If so, it should extract the necessary information from the user chat. This feature should be optional but it would improve the RAG.

3. How will this feature improve your workflow or experience?

It will improve the RAG.

4. Additional context or comments

No response

5. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @lschaupp on GitHub (Jun 4, 2024). Originally assigned to: @VincePotato on GitHub. ### 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] Please do not modify this template :) and fill in all the required fields. ### 1. Is this request related to a challenge you're experiencing? RAG ### 2. Describe the feature you'd like to see I tried to use the RAG feature. However it could be better. I was wondering if you are planning the functionality that during a RAG query, another query goes to the chat LLM asking it whether a query to the embedding model is actually necessary. If so, it should extract the necessary information from the user chat. This feature should be optional but it would improve the RAG. ### 3. How will this feature improve your workflow or experience? It will improve the RAG. ### 4. Additional context or comments _No response_ ### 5. Can you help us with this feature? - [ ] I am interested in contributing to this feature.
yindo added the 👻 feat:rag label 2026-02-21 18:04:13 -05:00
yindo closed this issue 2026-02-21 18:04:13 -05:00
Author
Owner

@AndyMik90 commented on GitHub (Jun 4, 2024):

I believe you can achieve this by using Chatflow and having a question classifier to make the decision to retrieve from RAG or answer without.

@AndyMik90 commented on GitHub (Jun 4, 2024): I believe you can achieve this by using Chatflow and having a question classifier to make the decision to retrieve from RAG or answer without.
Author
Owner

@lschaupp commented on GitHub (Jun 4, 2024):

@AndyMik90 Thanks for the info. However it would be nice to have an integrated solution for this.

@lschaupp commented on GitHub (Jun 4, 2024): @AndyMik90 Thanks for the info. However it would be nice to have an integrated solution for this.
Author
Owner

@crazywoola commented on GitHub (Jul 11, 2024):

See this https://github.com/langgenius/dify/issues/6019

@crazywoola commented on GitHub (Jul 11, 2024): See this https://github.com/langgenius/dify/issues/6019
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#3978