Enrich Data
Enriquece registros agregando campos calculados, inferidos o estandarizados con un LLM.
Añade con el modelo los output_fields pedidos a un record JSON (categorize, standardize, infer o augment) y enruta a success si se añadieron todos los campos o a partial si no.
Elige un modo de enriquecimiento y define los campos de salida que necesitas. El operador lee el registro de entrada, aplica la estrategia elegida y devuelve el registro enriquecido con una puntuación de confianza por campo.
Operaciones:
- Categorize: Agrega etiquetas de categoría a un registro según su contenido.
- Standardize: Normaliza nombres, direcciones, fechas y teléfonos a formatos coherentes.
- Infer: Completa los valores que faltan razonando a partir del contexto disponible.
- Augment: Agrega campos calculados, como la antigüedad a partir del cargo o el sector a partir del nombre de la empresa.
Cómo funciona
- Combina el payload anterior con la configuración del nodo (gana la configuración) y lee
record, que debe ser un objeto;output_fieldsno puede estar vacío. - Si
input_fieldsestá definido, conserva solo esas claves del registro; si no, envía el registro completo, con formato legible, como mensaje de usuario. - Con
knowledge_resource_id, añade elcontentdel recurso como JSON bajoReference data for lookup:; si la carga falla, solo se registra en el log. - Envía una instrucción del modo que lista cada campo de salida como
- name (type): descriptiony un formato JSON estricto;temperature: 0.1. - Interpreta la respuesta como JSON; debe traer
enriched_record. Sale porsuccesssi todos los nombres deoutput_fieldsestán enadded_fields; si no, porpartial.
En un workflow
El nodo tal como aparece en un archivo de workflow (draft_nodes[]) y el envelope de una ejecución exitosa.
{
"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"
}Configuración
-
llm_provider_idstring Opcional -
El `id` de un registro `LlmProviderModel` (p. ej. `wf-llm-provider-*`). El orquestador delega en el backend: `POST /cognitive-infrastructure/cognitive-assets/llm-provider/invoke` en modo sync, o `POST /chat/conversation/execute/stream-ephemeral` (SSE) en modo stream. El backend resuelve endpoint + api-key + deployment a partir del registro y enruta al adaptador correspondiente.
-
invocation_modestring Opcional -
Transporte de la llamada al LLM. `sync` se bloquea hasta recibir la respuesta completa. `stream` consume los tokens mediante SSE (necesario para generaciones largas). Predeterminado: `sync`.
-
timeout_msinteger Opcional -
Tiempo máximo de espera para que termine la invocación (o tiempo máximo de inactividad entre fragmentos en modo stream). Predeterminado: 30000 en sync, 600000 en stream.
-
enrichment_modestring Obligatorio -
Estrategia que se aplica: categorizar, estandarizar, inferir valores faltantes o ampliar con campos calculados.
-
input_fieldsarray<string> Opcional -
Qué campos del registro de entrada se leen.
-
output_fieldsarray<object> Obligatorio -
Campos que se agregan o calculan en el registro enriquecido.
-
knowledge_resource_idstring Opcional -
Opcional: datos de referencia o tablas de consulta para el enriquecimiento.
-
languagestring Opcional -
Idioma de los datos de entrada.
Su configuración muestra los ajustes de ejecución compartidos, pero este nodo aún no aplica reintentos (retryOnFail, maxTries). Ningún nodo aplica continueOnFail.
Comportamiento en el código
Lo que hace la implementación con estas claves más allá de lo que dice el esquema.
-
record - No está en el esquema de configuración (está en el contrato de entrada), pero se lee primero de la configuración y luego del payload anterior.
-
enrichment_mode - Un valor desconocido usa la instrucción de
categorize. -
input_fields - Filtra lo que ve el modelo, pero al modelo se le pide devolver los campos originales en
enriched_record; el código no vuelve a unir los campos que filtraste. -
timeout_ms - Solo en modo stream: timeout de inactividad entre fragmentos, por defecto 600000. En modo sync no se aplica a la petición.
-
execution - Declarado pero ignorado: ni el worker ni el motor leen
retryOnFail,maxTries,waitBetweenTries,continueOnFail,alwaysOutputDatanitimeout_msde este bloque.
Puertos de salida
success por defecto El modelo informó todos los campos pedidos en 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 Falta al menos uno de los campos pedidos en added_fields.
{
"enriched_record": {
"company": "Northwind Logistics",
"title": "Head of Operations",
"industry": "Logistics"
},
"added_fields": [
"industry"
],
"confidence_per_field": {
"industry": 0.93
}
}error Falta el registro o los campos de salida, falló la llamada al modelo o la respuesta no traía enriched_record.
{
"error": "Model did not return valid enrichment output."
}En expresiones
Lo que un nodo posterior puede leer de la salida de este nodo con $("Enrich Data").item.json.<ruta> (escribe la etiqueta de tu nodo en lugar de Enrich Data). Editor marca las rutas que sugiere el editor de workflows en Previous Nodes (el contrato de salida); Worker marca las rutas que el worker devuelve de verdad por success, según la salida que muestra Puertos.
| Expresión | Editor | Worker |
|---|---|---|
$("Enrich Data").item.json.enriched_recordRegistro original combinado con los campos nuevos. | ||
$("Enrich Data").item.json.added_fieldsLista de los nombres de campo agregados correctamente. | ||
$("Enrich Data").item.json.confidence_per_fieldPuntuación de confianza (0-1) de cada campo agregado. | ||
$("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: El worker la devuelve pero el editor no la sugiere: escríbela a mano. Las claves dentro de objetos pueden depender de tus datos o de la configuración (por ejemplo, una clave por etiqueta).
Errores
| Mensaje | Puerto | Causa y solución |
|---|---|---|
Missing or invalid input record. | error | record no existe o no es un objeto. |
At least one output field must be defined. | error | output_fields está vacío. |
Model did not return valid enrichment output. | error | La respuesta no era JSON o no traía 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 está vacío o no es un texto. Elige un registro de proveedor LLM con capacidad de chat. |
LLM Invocation Error: <backend message> | error | El backend rechazó la llamada: registro de proveedor inexistente o inactivo, error del proveedor, cuota o filtro de contenido. Revisa el registro de proveedor y los logs del backend. |
LLM Invocation Error: empty response from backend (<transport error>) | error | Modo sync: falló la llamada HTTP al backend (error de red, estado distinto de 2xx o timeout). Los prompts largos suelen agotar el timeout de la petición; cambia a invocation_mode: "stream". |
RemoteApiService.stream: idle timeout after <timeout_ms>ms | error | Modo stream: no llegó ningún fragmento dentro de timeout_ms. Si la petición de stream falla, el mensaje es RemoteApiService.stream: HTTP <status> — <body>. |
Contrato de entrada
-
recordobject Obligatorio -
El registro de datos que se enriquece.
-
contextstring Opcional -
Contexto opcional para mejorar la precisión del enriquecimiento.
Contrato de salida
-
enriched_recordobject Opcional -
Registro original combinado con los campos nuevos.
-
added_fieldsarray Opcional -
Lista de los nombres de campo agregados correctamente.
-
confidence_per_fieldobject Opcional -
Puntuación de confianza (0-1) de cada campo agregado.
Contratos (JSON Schema)
La definición exactamente como la declara el orquestador. All es el *.definition.js completo; compáralo con las secciones de arriba para ver diferencias entre la documentación y el esquema. Úsala para validar un nodo antes de publicar.
{
"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
}
]Ejecución
- Ejecución
async- Con estado
- No
- Reintentos (
retryOnFail) - No
- Capacidades
aienrichmentdata-qualityaugmentation- Etiquetas
aienrichmentdata-qualityaugmentation
Notas y límites
enriched_recordes lo que devuelva el modelo; el código no lo une con el registro de entrada ni valida tipos de campo. La entradacontextse ignora.- El worker devuelve
rawjunto adata; el motor solo conservadatacomo salida del nodo, así querawno está disponible aguas abajo. - La llamada al modelo pasa por el backend de Sommatic AI, que resuelve el registro de proveedor indicado en
llm_provider_id(endpoint, credenciales, despliegue); el orquestador nunca guarda llaves del proveedor.invocation_mode: "sync"(por defecto) espera la respuesta completa;"stream"la lee como eventos SSE y une los fragmentos. timeout_mssolo tiene efecto en modo stream, como tiempo máximo de inactividad entre fragmentos (por defecto 600000). En modo sync el valor se registra en el log, pero no se aplica a la petición HTTP, así que rige el timeout por defecto de la plataforma.- En modo stream el endpoint del backend no aplica los parámetros de muestreo, así que la
temperature: 0.1fija solo tiene efecto en modo sync. - El recurso de conocimiento se lee del backend en cada ejecución (timeout de 10 s). Un recurso cuyo estado no es
activese usa igual, con una advertencia en el log. - Sin reintentos automáticos: el motor no aplica
execution.retryOnFail,maxTriesniwaitBetweenTriesen este nodo; una llamada fallida sale directamente porerror.
Revisado contra el código del orquestador · 31e874b · 2026-11-26