Nodes

Every workflow consists of a set of interlinked Nodes. It always starts with a trigger node and ends with a response node. In between are functional nodes, which are self-contained blocks of functionality that can be added to the workflow and linked to other nodes to create chains of connected behaviour. Lleverage provides a large set of out of the box Nodes that should cover all typical uses cases.

Nodes come in different flavours, there are four main types:

  1. Controls help you control the execution of the workflow. Think triggers, loops, conditions and responses.

  2. Connections help you interact with the outside world by connecting to databases, APIs or bespoke integration nodes. Enable new Connection nodes by adding Connections to your organisation.

  3. Prompts are used to call generative services like LLMs, text-to-image or text-to-speech models. Prompts are a self contained concept in Lleverage. Prompts can be reused across workflows and support tooling to optimise on cost, quality and latency.

  4. Tools consist of a diverse array of pre-built nodes designed to simplify a variety of tasks and utilities within your workflows, including a Script node that allows for custom code execution.

Simply add the next node into your workflow to set the execution sequence. Nodes have internal state — you can reference previous node outputs in any subsequent node.

Links are the the lines that connect the Nodes. Links can transfer the state from one node into the next. This is how you can create comprehensive chains of functionality. Different types of data can be exchanged over links:

  1. Data blocks to transfer the complete output state from one Node into the next. Blocks can come in various formats:

    1. Structured data like a JSON object or tabular data.

    2. Text data like a string of text.

    3. Files like an image blob or audio file.

  2. Data streams to pass a continuous stream of data from one node to the next. You can chain subsequent nodes with streams in between them as long as the input and output data types of the streams between nodes is compatible. Streams come in two flavours:

    1. Text streams, often as an output of LLMs or transcription models.

    2. Audio streams, often as an output of text to voice models.

Nodes can have multiple input and output types. A transcription node for example, can accept both an audio file and an audio stream, while it can output a text as well as a text stream. Subsequent nodes can only be added when compatible with the output type of a previous node.

Streaming is recommended where possible, as it can heavily reduce the execution latency of the workflow. An example use case for where streams matter is a low latency live translation app where the users voice is transcribed, translated with an LLM and pushed into a text-to-speech model. If streaming would not be possible, time to first response would be the sum of the execution of all nodes. With streaming it allows for delivery of the first chunk of processed information as soon as possible.

Input and Output

Depending on the input and output specifications of your nodes, various configuration options are available. Although Leverage tries to automatically align these specifications when linking nodes, manual adjustments may be necessary, particularly for structured data. This enables you to directly map specific data elements from preceding nodes into your current node's input and tailor the output accordingly.

Last updated