-
Notifications
You must be signed in to change notification settings - Fork 816
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
Recursive flows #2279
Comments
Hi @iceman3000 , we don't have plan to introduce recursion/loops in DAG flow since it's not easy to write it in YAML. But we'll introduce a flexible way to execute code script with prompt flow, where your can define orchestration logic with python code. Will that meet your need? |
+1 on this request as well. There are some advanced LLM flows (e.g. Self-RAG) that utilize recursion to enhance LLM reliability on various tasks. @D-W- Thanks for looking into this. I think it might be useful if the orchestration logic, like @iceman3000 said, can trigger part of the flow (usually there will be multiple steps) in a recursive way. Here is an example from the Knowledge Card paper that uses conditional recursion in its knowledge retrieval process: |
Hi @LastRemote , in my understanding, in we model above process as a flow, it can be implemented with flex mode: def entry():
while need_more_information(question, result):
auto_selection_result = auto_select(question)
exp_selection_result = explain_select(question)
result = retrive(auto_selection_result, exp_selection_result) Will this meet your requirements? |
Could we please see a complete example of this - also a description of 'flex mode'? |
Hi @ElliotWood , flex mode is a mode we're working on to directly execute code script with prompt flow with tracing ability. The code script will be provided by user so user can run complex orchestration logic in it. (e.g. the while loop in above example). Since it's still working in progress, we currently don't have examples/docs about it. I'll update here when it's publicly available. |
Hi, we're sending this friendly reminder because we haven't heard back from you in 30 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 7 days of this comment, the issue will be automatically closed. Thank you! |
Is your feature request related to a problem? Please describe.
Inability to have recursion in flows.
Describe the solution you'd like
Ability to have a loop within the flow
Describe alternatives you've considered
Build recursion into a python node and complete all logic in that.
Additional context
Especially with the introduction of tool calling, and more "agent like" uses of OpenAI, it would be handy to be able to (based on logic), repeat a section of the flow.
e.g. Customer asks a question, search query is generated, request is made to docs, docs are reviewed, new search query is generated based off learning from the docs, docs are reviewed, then response is given to the customer (if AI is now happy with answer).
The text was updated successfully, but these errors were encountered: