Understanding data flow in BRX workflows
Flow in BRX refers to how data moves through a BRX workflow, from inputs to outputs, through various BRKs and their dependencies. Understanding flow is essential for designing effective and efficient BRX applications.
In BRX, data flows through a directed graph of BRKs, where each BRK:
This flow of data enables complex workflows where each BRK contributes to the overall process.
Inputs to a BRK can come from several sources:
The most direct source of inputs is from the user:
BRKs can also receive inputs from the outputs of their dependencies:
In this example, the Format BRK receives the output of the Recipe BRK as an input.
BRKs can access environment variables and configuration settings:
Once a BRK receives its inputs, it processes them according to its configuration:
The most common processing flow involves sending a prompt to an LLM:
BRKs can also call external tools as part of their processing:
BRKs can implement conditional processing flows:
After processing, BRKs produce outputs that flow to their dependents:
The simplest output flow is a direct output to the user:
Outputs can flow through chains of dependencies:
Outputs can flow to multiple dependent BRKs in parallel:
BRX provides several mechanisms for controlling the flow of data:
By default, BRKs are executed in a sequence determined by their dependencies:
BRK A is executed first, then BRK B, then BRK C.
Independent BRKs can be executed in parallel:
BRK A and BRK B are executed in parallel, and their outputs are combined for BRK C.
BRKs can implement conditional execution based on inputs or other factors:
Several common flow patterns are used in BRX applications:
The pipeline pattern is a linear sequence of BRKs, where each BRK processes the output of the previous one:
This pattern is useful for sequential processing steps, such as:
The fan-out pattern involves a single BRK that feeds multiple dependent BRKs:
This pattern is useful when you need to process the same data in multiple ways, such as:
The fan-in pattern involves multiple BRKs that feed into a single dependent BRK:
This pattern is useful when you need to combine data from multiple sources, such as:
The feedback loop pattern involves a BRK that feeds back into itself or an earlier BRK in the chain:
This pattern is useful for iterative refinement, such as:
Here’s an example of a content creation workflow that demonstrates various flow patterns:
This workflow demonstrates:
By understanding and applying these flow concepts, you can design effective and efficient BRX workflows that meet your application’s needs.
Understanding data flow in BRX workflows
Flow in BRX refers to how data moves through a BRX workflow, from inputs to outputs, through various BRKs and their dependencies. Understanding flow is essential for designing effective and efficient BRX applications.
In BRX, data flows through a directed graph of BRKs, where each BRK:
This flow of data enables complex workflows where each BRK contributes to the overall process.
Inputs to a BRK can come from several sources:
The most direct source of inputs is from the user:
BRKs can also receive inputs from the outputs of their dependencies:
In this example, the Format BRK receives the output of the Recipe BRK as an input.
BRKs can access environment variables and configuration settings:
Once a BRK receives its inputs, it processes them according to its configuration:
The most common processing flow involves sending a prompt to an LLM:
BRKs can also call external tools as part of their processing:
BRKs can implement conditional processing flows:
After processing, BRKs produce outputs that flow to their dependents:
The simplest output flow is a direct output to the user:
Outputs can flow through chains of dependencies:
Outputs can flow to multiple dependent BRKs in parallel:
BRX provides several mechanisms for controlling the flow of data:
By default, BRKs are executed in a sequence determined by their dependencies:
BRK A is executed first, then BRK B, then BRK C.
Independent BRKs can be executed in parallel:
BRK A and BRK B are executed in parallel, and their outputs are combined for BRK C.
BRKs can implement conditional execution based on inputs or other factors:
Several common flow patterns are used in BRX applications:
The pipeline pattern is a linear sequence of BRKs, where each BRK processes the output of the previous one:
This pattern is useful for sequential processing steps, such as:
The fan-out pattern involves a single BRK that feeds multiple dependent BRKs:
This pattern is useful when you need to process the same data in multiple ways, such as:
The fan-in pattern involves multiple BRKs that feed into a single dependent BRK:
This pattern is useful when you need to combine data from multiple sources, such as:
The feedback loop pattern involves a BRK that feeds back into itself or an earlier BRK in the chain:
This pattern is useful for iterative refinement, such as:
Here’s an example of a content creation workflow that demonstrates various flow patterns:
This workflow demonstrates:
By understanding and applying these flow concepts, you can design effective and efficient BRX workflows that meet your application’s needs.