Transformation LLM
Transforms data using an LLM prompt. Combines the power of a language model with structured data transformation.
Parameters
| Parameter | Type | Required | Variable | Description |
|---|---|---|---|---|
inputArray | dynamic value | Yes | Yes | Array of data to transform using the AI model. |
itemVariable | text | No | No | Variable name representing each item in the prompt template. (Default: "item") |
promptTemplate | text | Yes | Yes | Transformation instructions applied to each item. Supports {{item}}. |
systemPrompt | text | No | Yes | System instructions sent before the transformation prompt. |
model.provider | text | Yes | No | AI model provider (e.g. openai, anthropic). |
model.model | text | No | No | Model identifier to use (e.g. gpt-4o-mini). |
parameters.temperature | number | No | No | Model creativity (0 = deterministic, 1 = creative). (Default: 0.7, min 0, max 2) |
parameters.maxTokens | number | No | No | Maximum number of tokens per individual response. (Default: 500, min 1, max 128000) |
batchSize | number | No | No | Number of items processed per batch. (Default: 10, min 1, max 100) |
parallelism | number | No | No | Number of batches processed in parallel. (Default: 3, min 1, max 10) |
outputFormat | choice (text, json, structured) | No | No | Output format per item: plain text, JSON, or typed structure. (Default: "text") |
outputField | text | No | No | Field name containing the LLM result in each item. (Default: "llmResult") |
retryOnError | boolean | No | No | Automatically retry on model errors. (Default: true) |
maxRetries | number | No | No | Maximum number of retries on error. (Default: 2, min 0, max 5) |
outputVariable | text | No | No | Output variable name containing the transformed items. |
Parameters marked Variable = Yes accept the
{{blockName.field}}syntax.
Output
Output variable : llmTransformResult
{
"success": false,
"results": [],
"totalItems": 0,
"tokensInput": 0,
"tokensOutput": 0,
"totalTokens": 0,
"durationMs": 0
}
Example
Normalize addresses with an LLM.
Input :
{"address": "12 rue victor hugo 75001 paris"}
Output :
{"content": "12 Rue Victor Hugo, 75001 Paris, France"}
Tip
Useful for semantic transformations impossible with code (spell correction, normalization, classification).