Runnable Data Batch
Runnable Data Batch goes through a list of data and, for each item, passes one of its fields to the connected agents or chains. It adds the answer to the item itself, in a new field. A runnable component is a piece that processes a text and returns another, such as an agent or a chain of steps with a model.
When to use it
- Classifying each row of a spreadsheet with an agent.
- Summarising each email in a list and keeping the summary next to the email.
- Enriching each contact with information an agent looks up.
Configuration
| Field | What it does |
|---|---|
| Data | The list of data to go through. |
| Additional Context | Text added before the value, for example “Classify this review: {input}”. |
| Input Key | The field of each item that is passed. Default: text. |
| Data Result Key | The field where the answer is stored. Default: result. |
| Runnables | The agents or chains to run. |
Advanced options
| Field | What it does |
|---|---|
| Output Key From Runnables | The name of the result taken from each answer. Default: output. |
| Check If Value Is Array | If the Input Key value is a comma-separated list, it splits it into items. On by default. |
| Separator For Array | That list’s separator. Default: comma. |
Output
The Data output holds the original list with the answer added to each item.
Example
A shop wants to classify its reviews as positive, neutral or negative.
- Connect the reviews to Data, with Input Key
textand Data Result Keysentiment. - Connect to Runnables a chain that classifies the text.
- Save Data to a spreadsheet.
Related components
- Runnable Executor: runs with a single text.