Ensure that 'inupt' takes effect every time+add 'output' field+RAG structured document recall #6850

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

Originally created by @liuzixiao666 on GitHub (Nov 20, 2024).

Originally assigned to: @Yawen-1010 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).
  • [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.

The requirement has been discussed before :
#7955
#10652
and now needs to be supplemented:

I am building AI chat agents that can capture as many emotional states as possible and serve multiple users as one agent. At the same time, I need to maintain continuous contact with multiple users and try not to reopen a conversation (which may cause sudden disappearance of chat memory)

At the same time, because this "agent" needs to handle different situations, such as introducing topics, getting angry, and being happy, users may also send multiple files and images during the conversation. In order to ensure real-time performance, actively add special tasks to the bot, and have sliding window memory, I need the "input" field to be able to pass values at any time, and pass values multiple times in the same session, so that the agent can decide what content to reply to, and can pass values out as "output"

For example, when an agent replies with a sentence, I may need it to determine whether to send an emoji and what type of emoji to send. My current implementation logic is to use two agents, which poses a problem. Agent 1, which sends text messages, has no idea if it has sent emoticons, and the DIY API does not allow outputting images. If I embed the URL of an image into Agent 1's "answer", it will affect its next reply and the memory of the sliding window will become invalid

The last thing about 'RAG structured document recall' is that I need to store each user's long-term memory separately, but I don't want their memory to be cross recalled. I can control the recall through certain fields. At present, I am a user who establishes a separate knowledge base and then makes HTTP calls on the workflow, while finding the user's knowledge base ID in the input and passing it in. But there is also one thing, a user may have many types of memories, some of which have expired after a certain period of time, and some of which are not needed at the moment (such as when I asked: what is the sales revenue of the fourth quarter, may recall the sales revenue of the third quarter, or may recall the expenses of the fourth quarter). I could have used structured fields to filter these knowledge first and then query, but now they will be queried back and interfere with LLM's decision-making

2. Additional context or comments

The basic information has been explained. If there are any unclear questions, please feel free to ask and I can continue to supplement. We are hoping to rely on DIY to build a commercial product, but we have encountered many practical problems.
I'm sorry, I'm not a professional technician and cannot provide code contributions

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @liuzixiao666 on GitHub (Nov 20, 2024). Originally assigned to: @Yawen-1010 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] [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. The requirement has been discussed before : #7955 #10652 and now needs to be supplemented: I am building AI chat agents that can capture as many emotional states as possible and serve multiple users as one agent. At the same time, I need to maintain continuous contact with multiple users and try not to reopen a conversation (which may cause sudden disappearance of chat memory) At the same time, because this "agent" needs to handle different situations, such as introducing topics, getting angry, and being happy, users may also send multiple files and images during the conversation. In order to ensure real-time performance, actively add special tasks to the bot, and have sliding window memory, I need the "input" field to be able to pass values at any time, and pass values multiple times in the same session, so that the agent can decide what content to reply to, and can pass values out as "output" For example, when an agent replies with a sentence, I may need it to determine whether to send an emoji and what type of emoji to send. My current implementation logic is to use two agents, which poses a problem. Agent 1, which sends text messages, has no idea if it has sent emoticons, and the DIY API does not allow outputting images. If I embed the URL of an image into Agent 1's "answer", it will affect its next reply and the memory of the sliding window will become invalid The last thing about 'RAG structured document recall' is that I need to store each user's long-term memory separately, but I don't want their memory to be cross recalled. I can control the recall through certain fields. At present, I am a user who establishes a separate knowledge base and then makes HTTP calls on the workflow, while finding the user's knowledge base ID in the input and passing it in. But there is also one thing, a user may have many types of memories, some of which have expired after a certain period of time, and some of which are not needed at the moment (such as when I asked: what is the sales revenue of the fourth quarter, may recall the sales revenue of the third quarter, or may recall the expenses of the fourth quarter). I could have used structured fields to filter these knowledge first and then query, but now they will be queried back and interfere with LLM's decision-making ### 2. Additional context or comments The basic information has been explained. If there are any unclear questions, please feel free to ask and I can continue to supplement. We are hoping to rely on DIY to build a commercial product, but we have encountered many practical problems. I'm sorry, I'm not a professional technician and cannot provide code contributions ### 3. Can you help us with this feature? - [ ] I am interested in contributing to this feature.
yindo added the 💪 enhancement👻 feat:rag labels 2026-02-21 18:17:36 -05:00
yindo closed this issue 2026-02-21 18:17:36 -05:00
Author
Owner

@liuzixiao666 commented on GitHub (Nov 20, 2024):

@crazywoola I need you......

@liuzixiao666 commented on GitHub (Nov 20, 2024): @crazywoola I need you......
Author
Owner

@liuzixiao666 commented on GitHub (Nov 20, 2024):

By the way, I heard that RAG2.0 is currently under development and has been reflected in the roadmap. I hope it can support searching for QA timing and return the value of A based on Q, instead of using QA as a whole search. Similar to the index and result of Coze, return the result for further processing

@liuzixiao666 commented on GitHub (Nov 20, 2024): By the way, I heard that RAG2.0 is currently under development and has been reflected in the roadmap. I hope it can support searching for QA timing and return the value of A based on Q, instead of using QA as a whole search. Similar to the index and result of Coze, return the result for further processing
Author
Owner

@crazywoola commented on GitHub (Nov 20, 2024):

@Yawen-1010 Well, she is our PM who is responsible for the RAG 2.0 part.

Regarding the first topic, we have already review it recently. I think we can conclude something later.

@crazywoola commented on GitHub (Nov 20, 2024): @Yawen-1010 Well, she is our PM who is responsible for the RAG 2.0 part. Regarding the first topic, we have already review it recently. I think we can conclude something later.
Author
Owner

@dosubot[bot] commented on GitHub (Dec 21, 2024):

Hi, @liuzixiao666. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • The issue involves enhancing AI chat agents to handle multiple users and emotional states while maintaining conversation memory.
  • Improvements are requested for real-time, multi-value input/output handling and long-term user memory management.
  • Challenges include managing two agents with separate knowledge bases and handling images.
  • @crazywoola mentioned that @Yawen-1010, the PM for RAG 2.0, is involved, and a review of the first topic has been conducted.

Next Steps:

  • Please let us know if this issue is still relevant to the latest version of the Dify repository by commenting on this issue.
  • If there is no further input, the issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Dec 21, 2024): Hi, @liuzixiao666. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog. I'm marking this issue as stale. **Issue Summary:** - The issue involves enhancing AI chat agents to handle multiple users and emotional states while maintaining conversation memory. - Improvements are requested for real-time, multi-value input/output handling and long-term user memory management. - Challenges include managing two agents with separate knowledge bases and handling images. - @crazywoola mentioned that @Yawen-1010, the PM for RAG 2.0, is involved, and a review of the first topic has been conducted. **Next Steps:** - Please let us know if this issue is still relevant to the latest version of the Dify repository by commenting on this issue. - If there is no further input, the issue will be automatically closed in 15 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6850