infiniflow / ragflow

RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine based on deep document understanding.
https://ragflow.io
Apache License 2.0
16.95k stars 1.73k forks source link

Multiple Retrieval + Generation phases in a single line #1625

Open rhudock opened 1 month ago

rhudock commented 1 month ago

Is there an existing issue for the same feature request?

Is your feature request related to a problem?

No, but I would really like to chain multiple queries I think this would enhance the overall utility of the Graph function.

Describe the feature you'd like

Based on the context provided by the [[RagFlow Fix]], here's an explanation of "Multiple Retrieval + Generation phases in a single line":

Multiple Retrieval + Generation phases in a single line refers to a process where multiple cycles of retrieving information (retrieval phases) and generating new content or responses (generation phases) are executed sequentially within a single, continuous workflow. This means that the system does not stop after one cycle of retrieval and generation but rather continues through several iterations of this cycle, creating a more refined and comprehensive output.

For example, in a note-taking or knowledge management system like Smart Connect — Notes, this could involve retrieving existing notes, generating summaries or insights based on those notes, retrieving additional related notes or information, and further refining the output, all within a single, uninterrupted sequence.

Steps:

  1. Initial Retrieval: Gather relevant existing notes or data.
  2. Initial Generation: Create a first draft or initial response based on the retrieved data.
  3. Secondary Retrieval: Identify gaps or additional information needed, and retrieve more notes or data.
  4. Secondary Generation: Refine the initial response with the newly retrieved information.
  5. Repeat as needed: Continue this cycle until the desired level of detail and completeness is achieved.

This approach enhances the quality and depth of the final output by leveraging iterative improvements through repeated retrieval and generation cycles.

Describe implementation you've considered

I really have not considered the implementation, other than the way state is maintained might have difficulty with nested recursion.

Documentation, adoption, use case

No response

Additional information

No response

KevinHuSh commented 1 month ago

Could you please paste the graph, and elaberate on a real scenario to help us understand that deeply? Realy important, thanks!