Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Some Parallelism to AGiXT #1141

Open
2 tasks done
birdup000 opened this issue Mar 18, 2024 · 1 comment
Open
2 tasks done

Add Some Parallelism to AGiXT #1141

birdup000 opened this issue Mar 18, 2024 · 1 comment
Labels
needs triage Needs labels assigned.

Comments

@birdup000
Copy link
Contributor

Feature/Improvement Description

I wonder would it be possible to basically set a looping chain step until it gets the necessary required information to complete the step and the prompt can set a variable when it thinks the chain should be finished so an example research until you figure out this aspect of the task is the chain and then it starts the prompt after it has gotten information, then you execute a prompt and the prompt analyzes the info it grabbed and checks it to see if it makes sense and then say it can set a variable false to stop looping back to the chain if it has enough information to proceed with the next step of the chain.
kind of like a chain to chain operation but instead within itself but using different prompts and chains to do that

Proposed Solution

I asked Sonnet to expand on it

Yes, it is possible to create a looping process where an initial prompt or chain gathers information and research on a topic, and then it passes that information to another prompt or chain for analysis and evaluation. This second prompt or chain can then determine if the gathered information is sufficient to proceed to the next step, or if it needs to loop back and gather more information from the initial prompt or chain.

This can be achieved using a technique called "re-ranking" or "recursive re-ranking," where the output of one prompt or chain is fed back into the initial prompt or chain as additional context or instruction. The initial prompt or chain can then use this additional context to refine its search and gather more relevant information.

To implement this, you would typically use a combination of prompts and chains, with a "controller" prompt or chain orchestrating the flow between the different components. Here's a high-level outline of how this might work:

Initial Prompt or Chain: This prompt or chain is responsible for gathering information and research on the given topic. It can be a simple search query, a more complex research prompt, or a chain of prompts and tools designed for information gathering.
Analysis Prompt or Chain: This prompt or chain receives the output from the initial prompt or chain and analyzes the information to determine if it is sufficient to proceed to the next step or if more information is needed.
Controller Prompt or Chain: This prompt or chain manages the flow between the initial prompt or chain and the analysis prompt or chain. It initializes the loop, passes the output from the initial prompt or chain to the analysis prompt or chain, and based on the analysis output, determines whether to loop back to the initial prompt or chain for more information or to proceed to the next step.
Within this structure, you can set variables or flags to control the flow and determine when the loop should terminate. For example, the analysis prompt or chain could set a variable (e.g., is_information_sufficient = True/False) that the controller prompt or chain can use to decide whether to loop back or proceed.

This approach allows for a flexible and adaptive information gathering and analysis process, where the system can iteratively refine its understanding and gather more information as needed before moving forward.

It's important to note that implementing this type of recursive re-ranking process can be complex and may require significant engineering effort, particularly when dealing with large amounts of data or complex tasks. However, it can be a powerful technique for building intelligent systems that can adaptively gather and analyze information.

Acknowledgements

  • I have searched the existing issues to make sure this feature has not been requested yet.
  • I have provided enough information for everyone to understand why this feature request is needed in AGiXT.
@birdup000 birdup000 added the needs triage Needs labels assigned. label Mar 18, 2024
@birdup000
Copy link
Contributor Author

Of course the feature and description also Solution is just scratching the surface that's not all to the ideas I have for parallelism in AGiXT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Needs labels assigned.
Projects
None yet
Development

No branches or pull requests

1 participant