FlowLM allows you to visually build chains of LLMs with conditional logic—no coding required. This guide will help you understand the different block types and how to use them effectively to create complex, no-code workflows using LLMs.
Getting Started
To get started with your project, you need to provide your OpenAI key in the project settings.
Block types
Each block can accept either a single text or an array of texts as input.
- Single text input: Accepts one block of text (e.g., text generated by an LLM).
- Array of texts input: Accepts multiple blocks of text, such as when an LLM generates several strings, and they are split into separate lines (an array) to be processed individually.
To switch a block between single text input and array of text input modes, right-click on the block.
Connecting Blocks
You can connect blocks to create workflows by passing data between them. The connection lines between blocks indicate how data flows, and their color shows whether the connection is valid or needs adjustment.
- Black: The block can accept either a single text input or an array of texts (multiple inputs).
- Red: Invalid connection. This usually happens when you try to connect a block that outputs an array of texts to a block that only accepts a single text input. To fix this, right-click on the accepting block and switch it to array input mode.
- Yellow: Warning: only the first non-empty value will be returned. When connecting multiple single-input blocks to a single output, only the first non-empty value will be used. To ensure all inputs are returned, switch the block to array mode by right-clicking.
If the blocks refuse to connect, it means the connection is invalid. The most common reason for this is trying to link a block with array output to one that only accepts a single text input. Right-click on the receiving block to switch it to array input mode and allow the connection.
Basic blocks
LLM
Basic LLM block: lets you configure each step in a chain of LLMs.
Block | Type |
---|---|
![]() |
Single input Single output |
Parameters:
- Query: The prompt or instruction for the LLM.
- Model: LLM model name (e.g., ‘gpt-4’). Currently, we support OpenAI models.
- Temperature: (0-2) Randomness or creativity of the response.
- Max Tokens: Maximum number of tokens for the response.
Merge
Used to combine outputs from multiple LLM nodes into a single result.
Block | Type |
---|---|
![]() |
Single or multiple input, single output |
- Delimiter: Character or string (e.g., comma, space) to separate the merged outputs. If no delimiter is provided, a newline will be used by default.
Split
Used to divide a single input into multiple parts based on a specified delimiter. This block is useful to brake down LLM output, allowing each part to be processed separately in the following steps.
Block | Type |
---|---|
![]() |
Single input, multiple output |
- Delimiter: Character or string (e.g., comma, space) that will be used to split the input into separate chunks.
Replace
Allows you to find and replace specific parts of the text.
Block | Type |
---|---|
![]() |
Single input, single output |
- Substring: Text or characters you want to search for.
- Replacement: Text or characters that will replace the found substring.
Contains
Checks whether a specific substring exists in the input text. Returns true if the substring is found and false if it is not. It’s useful for setting up conditions based on whether a particular word or phrase appears in the output.
Block | Type |
---|---|
![]() |
Single input, single output |
Equal
Checks whether the input text matches a specified value exactly. Returns true if the input matches the specified value exactly, and false if there is any difference. It’s useful for workflows that require precise text matching to determine subsequent actions.
Block | Type |
---|---|
![]() |
Single input, single output |
Regex
Allows you to use regular expressions (regex) to search for patterns within the input text. This block will check if the input text matches the specified pattern and return true if a match is found, or false otherwise. It’s useful for advanced text matching, such as finding specific formats like emails, phone numbers, or other complex string patterns.
Block | Type |
---|---|
![]() |
Single input, single output |
Constant
The block is used to input a fixed value that remains unchanged throughout the process.
Block | Type |
---|---|
![]() |
Single input, single output |
You enter a value (e.g., a number, string, or predefined text) in the provided field, and this value is then passed to other blocks for use in calculations or as input for other tasks.
Note: The value must be connected to another block in the graph to be included in the calculation process. Without a connection, the constant value will not be part of the workflow.
IF
The If block is a decision-making block used to control the flow based on a condition. Here’s how it works:
Block | Type |
---|---|
![]() |
Single input, single output |
Top inputs:
- Left input: Input for data.
- Right input: Input for the condition to evaluate.
Bottom inputs:
- Left input: Output for the “true” stream (if the condition is met).
- Right input: Output for the “false” stream (if the condition is not met).
Usage Example: Let’s say you want to check if a user’s input contains a specific keyword. You can feed the text into the left input, and the condition (e.g., “Does the input contain ‘apple’?”, using block Contains) into the right input. If the condition is true, the data flows through the “true” stream for further processing. If the condition is false, the data follows the “false” stream.
Subgraph
This block allows you to embed and reuse another graph from your project. This block serves as a shortcut to a more complex sequence of steps, helping you simplify your main workflow by encapsulating repetitive or detailed logic.
Block | Type |
---|---|
![]() |
Single or multiple input, single or multiple output |
This block is particularly useful for recurring processes or tasks that need to be reused in multiple parts of your workflow. By using a subgraph, you avoid duplicating logic and maintain a cleaner, more efficient setup.
For Each
This block is used to apply a specific subgraph to each item in an array or list of inputs.
Block | Type |
---|---|
![]() |
Single or multiple input, single or multiple output |
This block is useful when you need to process multiple items individually by running the same subgraph on each one. For example, if you have an array of texts, the ForEach block will execute the selected subgraph for each text in the array, ensuring every item is processed one by one.