ControllerExecutorFlowModule / ControllerExecutorFlow.yaml
martinjosifoski's picture
Minor updates.
cd8c610
raw
history blame
2.26 kB
name: "CtrlEx"
description: "ControllerExecutor (i.e., MRKL, ReAct) interaction implementation with Flows that approaches the problem solving in two phases: one Flow chooses the next step and another Flow executes it. This is repeated until the controller Flow concludes on an answer."
max_rounds: 30
### Information used by the default interface specification implementation
input_interface:
- "goal"
output_interface:
- "answer"
- "status"
### Subflows specification
subflows_config:
Controller:
_target_: aiflows.ControllerAtomicFlow.instantiate_from_default_config
finish:
description: "Signal that the objective has been satisfied, and returns the answer to the user."
input_args: ["answer"]
# E.g.,
# commands:
# wiki_search:
# description: "Performs a search on Wikipedia."
# input_args: ["search_term"]
# ddg_search:
# description: "Query the search engine DuckDuckGo."
# input_args: ["query"]
Executor:
_target_: flows.base_flows.BranchingFlow.instantiate_from_default_config
# E.g.,
# subflows_config:
# wiki_search:
# _target_: .WikiSearchAtomicFlow.instantiate_from_default_config
# ddg_search:
# _target_: flows.application_flows.LCToolFlowModule.LCToolFlow.instantiate_from_default_config
# backend:
# _target_: langchain.tools.DuckDuckGoSearchRun
early_exit_key: "EARLY_EXIT"
topology:
- goal: "Select the next action and prepare the input for the executor."
input_interface:
_target_: flows.interfaces.KeyInterface
additional_transformations:
- _target_: flows.data_transformations.KeyMatchInput
flow: Controller
output_interface:
_target_: ControllerExecutorFlow.detect_finish_or_continue
reset: false
- goal: "Execute the action specified by the Controller."
input_interface:
_target_: flows.interfaces.KeyInterface
keys_to_rename:
command: branch
command_args: branch_input_data
keys_to_select: ["branch", "branch_input_data"]
flow: Executor
output_interface:
_target_: flows.interfaces.KeyInterface
keys_to_rename:
branch_output_data: observation
keys_to_select: ["observation"]
reset: false