Enrich Data
Enrich records by adding computed, inferred, or standardized fields using an LLM.
Adds the requested output_fields to a JSON record with the model (categorize, standardize, infer or augment) and routes to success when every field was added, or partial otherwise.
Select an enrichment mode and define the output fields you need. The operator reads the input record, applies the chosen strategy, and returns the enriched record with confidence scores per field.
Operations:
- Categorize: Add category tags to a record based on its content.
- Standardize: Normalize names, addresses, dates, and phone numbers to consistent formats.
- Infer: Fill missing field values by reasoning from available context.
- Augment: Add computed fields such as seniority from job title or industry from company name.
How it works
- Merges the upstream payload with the node config (config wins) and reads
record, which must be an object;output_fieldsmust be non-empty. - Keeps only the
input_fieldskeys of the record wheninput_fieldsis set; otherwise sends the whole record, pretty-printed, as the user message. - With
knowledge_resource_id, appends the resourcecontentas JSON underReference data for lookup:; a failed fetch is only logged. - Sends a mode instruction listing each output field as
- name (type): descriptionand a strict JSON format;temperature: 0.1. - Parses the answer as JSON; it must contain
enriched_record. Routes tosuccesswhen everyoutput_fieldsname is inadded_fields, else topartial.
In a workflow
The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.
{
"node_id": "node-enrich-lead",
"label": "Enrich lead",
"operator_slug": "ai.enrich",
"operator_version": "1.0.0",
"config": {
"record": "{{ $json.lead }}",
"enrichment_mode": "augment",
"input_fields": [
"company",
"title"
],
"output_fields": [
{
"name": "industry",
"type": "string",
"description": "Industry of the company."
},
{
"name": "seniority",
"type": "string",
"description": "Seniority implied by the job title."
}
],
"language": "en",
"llm_provider_id": "wf-llm-provider-xxxx",
"invocation_mode": "sync"
}
}{
"ok": true,
"data": {
"enriched_record": {
"company": "Northwind Logistics",
"title": "Head of Operations",
"industry": "Logistics",
"seniority": "Director"
},
"added_fields": [
"industry",
"seniority"
],
"confidence_per_field": {
"industry": 0.93,
"seniority": 0.81
}
},
"port": "success"
}Configuration
-
llm_provider_idstring Optional -
The `id` of a `LlmProviderModel` record (e.g. `wf-llm-provider-*`). The orchestrator delegates to the backend: `POST /cognitive-infrastructure/cognitive-assets/llm-provider/invoke` for sync mode, or `POST /chat/conversation/execute/stream-ephemeral` (SSE) for stream mode. The backend resolves endpoint + api-key + deployment from the record and routes to the correct adapter.
-
invocation_modestring Optional -
Transport for the LLM call. `sync` blocks until the full response arrives. `stream` consumes tokens via SSE (required for long generations). Default `sync`.
-
timeout_msinteger Optional -
Maximum time to wait for the invocation to complete (or idle timeout between chunks in stream mode). Default 30000 for sync, 600000 for stream.
-
enrichment_modestring Required -
Strategy to apply: categorize, standardize, infer missing values, or augment with computed fields.
-
input_fieldsarray<string> Optional -
Which fields from the input record to read.
-
output_fieldsarray<object> Required -
Fields to add or compute in the enriched record.
-
knowledge_resource_idstring Optional -
Optional: reference data or lookup tables for enrichment.
-
languagestring Optional -
Language of the input data.
Its configuration shows the shared execution settings, but this node does not apply retries (retryOnFail, maxTries) yet. continueOnFail is not applied by any node.
Behaviour in the code
What the implementation does with these keys beyond what the schema says.
-
record - Not in the config schema (it is in the input contract), but read from the config first and then from the upstream payload.
-
enrichment_mode - An unknown value uses the
categorizeinstruction. -
input_fields - Filters what the model sees, but the model is asked to return the original fields in
enriched_record; fields you filtered out are not merged back by the code. -
timeout_ms - Stream mode only: idle timeout between chunks, default 600000. In sync mode it is not applied to the request.
-
execution - Declared but ignored: neither the worker nor the engine reads
retryOnFail,maxTries,waitBetweenTries,continueOnFail,alwaysOutputDataortimeout_msfrom this block.
Output ports
success default The model reported every requested field in added_fields.
{
"enriched_record": {
"company": "Northwind Logistics",
"title": "Head of Operations",
"industry": "Logistics",
"seniority": "Director"
},
"added_fields": [
"industry",
"seniority"
],
"confidence_per_field": {
"industry": 0.93,
"seniority": 0.81
}
}partial At least one requested field is missing from added_fields.
{
"enriched_record": {
"company": "Northwind Logistics",
"title": "Head of Operations",
"industry": "Logistics"
},
"added_fields": [
"industry"
],
"confidence_per_field": {
"industry": 0.93
}
}error The record or output fields are missing, the model call failed or the answer had no enriched_record.
{
"error": "Model did not return valid enrichment output."
}In expressions
What a later node can read from this node's output with $("Enrich Data").item.json.<path> (write your node's label instead of Enrich Data). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through success, from the output shown in Ports.
| Expression | Editor | Worker |
|---|---|---|
$("Enrich Data").item.json.enriched_recordOriginal record merged with new fields. | ||
$("Enrich Data").item.json.added_fieldsList of field names successfully added. | ||
$("Enrich Data").item.json.confidence_per_fieldConfidence score (0-1) for each added field. | ||
$("Enrich Data").item.json.enriched_record.company | — | |
$("Enrich Data").item.json.enriched_record.title | — | |
$("Enrich Data").item.json.enriched_record.industry | — | |
$("Enrich Data").item.json.enriched_record.seniority | — | |
$("Enrich Data").item.json.confidence_per_field.industry | — | |
$("Enrich Data").item.json.confidence_per_field.seniority | — |
— Worker: The worker returns it but the editor does not suggest it: write it by hand. Keys inside objects can depend on your data or configuration (for example one key per label).
Errors
| Message | Port | Cause and fix |
|---|---|---|
Missing or invalid input record. | error | record is absent or not an object. |
At least one output field must be defined. | error | output_fields is empty. |
Model did not return valid enrichment output. | error | The answer was not JSON or had no enriched_record. |
[AiEnrich] Missing 'llm_provider_id' in node config (LlmProviderModel.id, e.g. 'wf-llm-provider-*'). The legacy 'model_id' alias is no longer supported — update the node config to use 'llm_provider_id'. | error | llm_provider_id is empty or not a string. Pick an LLM provider record with chat capability. |
LLM Invocation Error: <backend message> | error | The backend rejected the call: unknown or inactive provider record, provider error, quota or content filter. Check the provider record and the backend logs. |
LLM Invocation Error: empty response from backend (<transport error>) | error | Sync mode: the HTTP call to the backend failed (network error, non-2xx status or timeout). Long prompts often hit the request timeout; switch to invocation_mode: "stream". |
RemoteApiService.stream: idle timeout after <timeout_ms>ms | error | Stream mode: no chunk arrived within timeout_ms. A failed stream request shows RemoteApiService.stream: HTTP <status> — <body> instead. |
Input contract
-
recordobject Required -
The data record to enrich.
-
contextstring Optional -
Optional context to improve enrichment accuracy.
Output contract
-
enriched_recordobject Optional -
Original record merged with new fields.
-
added_fieldsarray Optional -
List of field names successfully added.
-
confidence_per_fieldobject Optional -
Confidence score (0-1) for each added field.
Contracts (JSON Schema)
The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.
{
"slug": "ai.enrich",
"name": "Enrich Data",
"category": "ai",
"version": "1.0.0",
"description": "Enrich records by adding computed, inferred, or standardized fields using an LLM.\n\n Select an enrichment mode and define the output fields you need. The operator reads the input record, applies the chosen strategy, and returns the enriched record with confidence scores per field.\n\n **Operations:**\n - **Categorize:** Add category tags to a record based on its content.\n - **Standardize:** Normalize names, addresses, dates, and phone numbers to consistent formats.\n - **Infer:** Fill missing field values by reasoning from available context.\n - **Augment:** Add computed fields such as seniority from job title or industry from company name.",
"capabilities": [
"ai",
"enrichment",
"data-quality",
"augmentation"
],
"config_schema": {
"type": "object",
"required": [
"enrichment_mode",
"output_fields"
],
"properties": {
"llm_provider_id": {
"type": "string",
"title": "LLM Provider",
"description": "The `id` of a `LlmProviderModel` record (e.g. `wf-llm-provider-*`). The orchestrator delegates to the backend: `POST /cognitive-infrastructure/cognitive-assets/llm-provider/invoke` for sync mode, or `POST /chat/conversation/execute/stream-ephemeral` (SSE) for stream mode. The backend resolves endpoint + api-key + deployment from the record and routes to the correct adapter.",
"x-ui-widget": "llm-provider-picker",
"x-llm-provider-capabilities": [
"chat"
]
},
"invocation_mode": {
"type": "string",
"title": "Invocation Mode",
"description": "Transport for the LLM call. `sync` blocks until the full response arrives. `stream` consumes tokens via SSE (required for long generations). Default `sync`.",
"enum": [
"sync",
"stream"
],
"default": "sync"
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Maximum time to wait for the invocation to complete (or idle timeout between chunks in stream mode). Default 30000 for sync, 600000 for stream.",
"minimum": 1000
},
"enrichment_mode": {
"type": "string",
"title": "Enrichment Mode",
"enum": [
"categorize",
"standardize",
"infer",
"augment"
],
"default": "categorize",
"description": "Strategy to apply: categorize, standardize, infer missing values, or augment with computed fields."
},
"input_fields": {
"type": "array",
"title": "Input Fields",
"items": {
"type": "string"
},
"description": "Which fields from the input record to read."
},
"output_fields": {
"type": "array",
"title": "Output Fields",
"description": "Fields to add or compute in the enriched record.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Field name to produce."
},
"description": {
"type": "string",
"description": "What this field represents."
},
"type": {
"type": "string",
"description": "Expected data type (string, number, boolean, array)."
}
}
}
},
"knowledge_resource_id": {
"type": "string",
"title": "Knowledge Resource",
"description": "Optional: reference data or lookup tables for enrichment.",
"ui_widget": "knowledge_resource_picker"
},
"language": {
"type": "string",
"title": "Language",
"default": "en",
"description": "Language of the input data."
},
"execution": {
"type": "object",
"title": "Execution Settings",
"properties": {
"alwaysOutputData": {
"type": "boolean",
"title": "Always Output Data",
"description": "Always output data, even on error (if configured).",
"default": false
},
"retryOnFail": {
"type": "boolean",
"title": "Retry On Fail",
"description": "Retry the execution if it fails.",
"default": false
},
"maxTries": {
"type": "integer",
"title": "Max Retries",
"description": "Number of retries.",
"default": 3,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"waitBetweenTries": {
"type": "integer",
"title": "Wait Between Retries (ms)",
"default": 1000,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"continueOnFail": {
"type": "boolean",
"title": "Continue On Fail",
"description": "Do not crash workflow on error.",
"default": false
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
"default": 300000
}
}
}
}
},
"input_contract_schema": {
"type": "object",
"properties": {
"record": {
"type": "object",
"description": "The data record to enrich."
},
"context": {
"type": "string",
"description": "Optional context to improve enrichment accuracy."
}
},
"required": [
"record"
]
},
"output_contract_schema": {
"type": "object",
"properties": {
"enriched_record": {
"type": "object",
"description": "Original record merged with new fields."
},
"added_fields": {
"type": "array",
"description": "List of field names successfully added."
},
"confidence_per_field": {
"type": "object",
"description": "Confidence score (0-1) for each added field."
}
}
},
"ports": [
{
"port_id": "success",
"label": "Enriched",
"description": "All requested fields were added successfully.",
"is_default": true,
"supports_condition": true
},
{
"port_id": "partial",
"label": "Partial",
"description": "Some requested fields could not be computed.",
"is_default": false,
"supports_condition": true
},
{
"port_id": "error",
"label": "Error",
"description": "Enrichment failed.",
"is_default": false,
"supports_condition": false
}
],
"execution_mode": "async",
"tags": [
"ai",
"enrichment",
"data-quality",
"augmentation"
],
"is_stateful": false,
"publisher": {
"identity": "org_sommatic_ai",
"profile": {
"name": "Sommatic AI",
"verified": true,
"url": "https://me.veripass.com/sommatic",
"logo_url": null
}
}
}{
"type": "object",
"required": [
"enrichment_mode",
"output_fields"
],
"properties": {
"llm_provider_id": {
"type": "string",
"title": "LLM Provider",
"description": "The `id` of a `LlmProviderModel` record (e.g. `wf-llm-provider-*`). The orchestrator delegates to the backend: `POST /cognitive-infrastructure/cognitive-assets/llm-provider/invoke` for sync mode, or `POST /chat/conversation/execute/stream-ephemeral` (SSE) for stream mode. The backend resolves endpoint + api-key + deployment from the record and routes to the correct adapter.",
"x-ui-widget": "llm-provider-picker",
"x-llm-provider-capabilities": [
"chat"
]
},
"invocation_mode": {
"type": "string",
"title": "Invocation Mode",
"description": "Transport for the LLM call. `sync` blocks until the full response arrives. `stream` consumes tokens via SSE (required for long generations). Default `sync`.",
"enum": [
"sync",
"stream"
],
"default": "sync"
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Maximum time to wait for the invocation to complete (or idle timeout between chunks in stream mode). Default 30000 for sync, 600000 for stream.",
"minimum": 1000
},
"enrichment_mode": {
"type": "string",
"title": "Enrichment Mode",
"enum": [
"categorize",
"standardize",
"infer",
"augment"
],
"default": "categorize",
"description": "Strategy to apply: categorize, standardize, infer missing values, or augment with computed fields."
},
"input_fields": {
"type": "array",
"title": "Input Fields",
"items": {
"type": "string"
},
"description": "Which fields from the input record to read."
},
"output_fields": {
"type": "array",
"title": "Output Fields",
"description": "Fields to add or compute in the enriched record.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Field name to produce."
},
"description": {
"type": "string",
"description": "What this field represents."
},
"type": {
"type": "string",
"description": "Expected data type (string, number, boolean, array)."
}
}
}
},
"knowledge_resource_id": {
"type": "string",
"title": "Knowledge Resource",
"description": "Optional: reference data or lookup tables for enrichment.",
"ui_widget": "knowledge_resource_picker"
},
"language": {
"type": "string",
"title": "Language",
"default": "en",
"description": "Language of the input data."
},
"execution": {
"type": "object",
"title": "Execution Settings",
"properties": {
"alwaysOutputData": {
"type": "boolean",
"title": "Always Output Data",
"description": "Always output data, even on error (if configured).",
"default": false
},
"retryOnFail": {
"type": "boolean",
"title": "Retry On Fail",
"description": "Retry the execution if it fails.",
"default": false
},
"maxTries": {
"type": "integer",
"title": "Max Retries",
"description": "Number of retries.",
"default": 3,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"waitBetweenTries": {
"type": "integer",
"title": "Wait Between Retries (ms)",
"default": 1000,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"continueOnFail": {
"type": "boolean",
"title": "Continue On Fail",
"description": "Do not crash workflow on error.",
"default": false
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
"default": 300000
}
}
}
}
}{
"type": "object",
"properties": {
"record": {
"type": "object",
"description": "The data record to enrich."
},
"context": {
"type": "string",
"description": "Optional context to improve enrichment accuracy."
}
},
"required": [
"record"
]
}{
"type": "object",
"properties": {
"enriched_record": {
"type": "object",
"description": "Original record merged with new fields."
},
"added_fields": {
"type": "array",
"description": "List of field names successfully added."
},
"confidence_per_field": {
"type": "object",
"description": "Confidence score (0-1) for each added field."
}
}
}[
{
"port_id": "success",
"label": "Enriched",
"description": "All requested fields were added successfully.",
"is_default": true,
"supports_condition": true
},
{
"port_id": "partial",
"label": "Partial",
"description": "Some requested fields could not be computed.",
"is_default": false,
"supports_condition": true
},
{
"port_id": "error",
"label": "Error",
"description": "Enrichment failed.",
"is_default": false,
"supports_condition": false
}
]Execution
- Execution
async- Stateful
- No
- Retries (
retryOnFail) - No
- Capabilities
aienrichmentdata-qualityaugmentation- Tags
aienrichmentdata-qualityaugmentation
Notes and limits
enriched_recordis whatever the model returns; the code does not merge it with the input record or check field types. Thecontextinput is ignored.- The worker returns
rawnext todata; the engine keeps onlydataas the node output, sorawis not available downstream. - The model call goes through the Sommatic AI backend, which resolves the provider record named by
llm_provider_id(endpoint, credentials, deployment); the orchestrator never holds provider keys.invocation_mode: "sync"(default) waits for the full answer;"stream"reads it as server-sent events and joins the chunks. timeout_msonly takes effect in stream mode, as the idle time allowed between chunks (default 600000). In sync mode the value is logged but not applied to the HTTP request, so the platform's default request timeout governs.- In stream mode the backend endpoint does not apply sampling settings, so the fixed
temperature: 0.1only takes effect in sync mode. - The knowledge resource is read from the backend on every run (10 s timeout). A resource whose status is not
activeis used anyway, with a warning in the log. - No automatic retries: the engine does not honour
execution.retryOnFail,maxTriesorwaitBetweenTriesfor this node; a failed call goes straight toerror.
Reviewed against the orchestrator code · 31e874b · 2026-11-26