Giter Club home page Giter Club logo

Comments (6)

D-W- avatar D-W- commented on June 19, 2024

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?

from promptflow.

LastRemote avatar LastRemote commented on June 19, 2024

+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:
Screenshot 2024-03-12 at 20 15 39
I hope we can implement this in Prompt Flow!

from promptflow.

D-W- avatar D-W- commented on June 19, 2024

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?

from promptflow.

ElliotWood avatar ElliotWood commented on June 19, 2024

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'?

from promptflow.

D-W- avatar D-W- commented on June 19, 2024

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.

from promptflow.

github-actions avatar github-actions commented on June 19, 2024

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!

from promptflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.