Check Compliance
Evaluate content against compliance policies, regulatory rules, or business guidelines.
Audits text against the rules of a policy knowledge resource with the model and routes to compliant or non_compliant with the list of violations.
Link a Knowledge Resource containing your compliance policy and this node will automatically check any text for violations — returning severity levels, specific rule citations, and remediation suggestions.
Operations:
- Full Check: Deep analysis against all policy rules with detailed violation reports.
- Quick Check: Fast scan for critical violations only.
Ideal for regulatory compliance (GDPR, HIPAA, SOX), internal policy enforcement, content review workflows, and audit automation.
How it works
- Merges the upstream payload with the node config (config wins) and reads
text(falling back toinput) anddocument_type. Fails whenknowledge_resource_idis empty. - Loads the policy:
content.structured_data.rules(or.policies) as a rule list, each rendered as- **<name>** [<severity>]: <description>(severity defaultmajor); otherwisecontent.textas free text. Fails if both are empty. - Sends an auditor system prompt (all rules for
check_mode: "full", only critical and major for"quick") with the severity levels and a strict JSON format;textis the user message;temperature: 0. - Parses the answer as JSON; it must contain a boolean
compliant. Each violation'sseverityis lower-cased and replaced bymajorwhen it is not inseverity_levels. - Recomputes
compliantitself: true only when no violation has a severity other thaninfo. Routes tocompliantornon_compliant.
In a workflow
The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.
{
"node_id": "node-check-contract",
"label": "Check contract",
"operator_slug": "ai.compliance.check",
"operator_version": "1.0.0",
"config": {
"knowledge_resource_id": "<knowledge_resource_id>",
"text": "{{ $json.text }}",
"document_type": "contract",
"check_mode": "full",
"severity_levels": [
"critical",
"major",
"minor",
"info"
],
"language": "en",
"llm_provider_id": "wf-llm-provider-xxxx",
"invocation_mode": "stream",
"timeout_ms": 120000
}
}{
"ok": true,
"data": {
"compliant": false,
"violations": [
{
"rule": "Payment terms",
"severity": "major",
"description": "The contract sets payment at 90 days; the policy allows at most 60.",
"location": "Clause 7: \"payment within ninety (90) days\"",
"remediation": "Change the payment term to 60 days or fewer."
}
],
"violation_count": 1,
"risk_level": "medium",
"summary": "One major violation on payment terms."
},
"port": "non_compliant"
}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.
-
knowledge_resource_idstring Required -
REQUIRED: Knowledge Resource containing the compliance rules/policy to check against.
-
check_modestring Optional -
Full: deep analysis of all rules. Quick: critical violations only.
-
severity_levelsarray<string> Optional -
Severity classification for violations.
-
languagestring Optional
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.
-
text, document_type - Not in the config schema, but read from the config first and then from the upstream payload.
document_typeaddsThe document is a <type>.to the prompt. Thecontextinput is ignored. -
severity_levels - Listed in the prompt and used to validate answers; unknown severities become
major. Only the literalinfois excluded from the compliance decision. -
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
compliant default No violations, or only info ones (they stay in violations).
{
"compliant": true,
"violations": [],
"violation_count": 0,
"risk_level": "none",
"summary": "The contract meets all payment and data rules."
}non_compliant At least one violation above info.
{
"compliant": false,
"violations": [
{
"rule": "Payment terms",
"severity": "major",
"description": "The contract sets payment at 90 days; the policy allows at most 60.",
"location": "Clause 7: \"payment within ninety (90) days\"",
"remediation": "Change the payment term to 60 days or fewer."
}
],
"violation_count": 1,
"risk_level": "medium",
"summary": "One major violation on payment terms."
}error Policy or text is missing, the model call failed or the answer was not valid.
{
"error": "Model did not return valid compliance check output."
}In expressions
What a later node can read from this node's output with $("Check Compliance").item.json.<path> (write your node's label instead of Check Compliance). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through compliant, from the output shown in Ports.
| Expression | Editor | Worker |
|---|---|---|
$("Check Compliance").item.json.compliantWhether the content passes all checks. | ||
$("Check Compliance").item.json.violationsList of violations found. | ||
$("Check Compliance").item.json.violation_countTotal number of violations. | ||
$("Check Compliance").item.json.risk_levelOverall risk assessment. | ||
$("Check Compliance").item.json.summaryHuman-readable compliance summary. |
Errors
| Message | Port | Cause and fix |
|---|---|---|
A Knowledge Resource with compliance rules is required. Link a policy document in the node configuration. | error | knowledge_resource_id is empty. |
Knowledge Resource has no policy content. Add rules as text or structured_data.rules array. | error | The resource has neither content.text nor a structured_data.rules / policies array. |
Model did not return valid compliance check output. | error | The answer was not JSON or had no boolean compliant. |
Knowledge resource not found: <knowledge_resource_id> | error | The id does not match any knowledge resource. A deleted resource fails with Knowledge resource "<name>" has been deleted. Update the node config to reference an active resource. |
[AiComplianceCheck] 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
-
textstring Required -
Content to evaluate for compliance.
-
document_typestring Optional -
Optional: type of document (contract, email, report).
-
contextobject Optional -
Optional: additional context for evaluation.
Output contract
-
compliantboolean Optional -
Whether the content passes all checks.
-
violationsarray Optional -
List of violations found.
-
violation_countnumber Optional -
Total number of violations.
-
risk_levelstring Optional -
Overall risk assessment.
-
summarystring Optional -
Human-readable compliance summary.
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.compliance.check",
"name": "Check Compliance",
"category": "ai",
"version": "1.0.0",
"description": "Evaluate content against compliance policies, regulatory rules, or business guidelines.\n\n Link a Knowledge Resource containing your compliance policy and this node will automatically check any text for violations — returning severity levels, specific rule citations, and remediation suggestions.\n\n **Operations:**\n - **Full Check:** Deep analysis against all policy rules with detailed violation reports.\n - **Quick Check:** Fast scan for critical violations only.\n\n Ideal for regulatory compliance (GDPR, HIPAA, SOX), internal policy enforcement, content review workflows, and audit automation.",
"capabilities": [
"compliance",
"audit",
"governance",
"policy",
"risk"
],
"config_schema": {
"type": "object",
"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
},
"knowledge_resource_id": {
"type": "string",
"title": "Compliance Policy",
"description": "REQUIRED: Knowledge Resource containing the compliance rules/policy to check against.",
"ui_widget": "knowledge_resource_picker"
},
"check_mode": {
"type": "string",
"title": "Check Mode",
"enum": [
"full",
"quick"
],
"default": "full",
"description": "Full: deep analysis of all rules. Quick: critical violations only."
},
"severity_levels": {
"type": "array",
"title": "Severity Levels",
"default": [
"critical",
"major",
"minor",
"info"
],
"items": {
"type": "string"
},
"description": "Severity classification for violations."
},
"language": {
"type": "string",
"title": "Language",
"default": "en"
},
"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
}
}
}
},
"required": [
"knowledge_resource_id"
]
},
"input_contract_schema": {
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "Content to evaluate for compliance."
},
"document_type": {
"type": "string",
"description": "Optional: type of document (contract, email, report)."
},
"context": {
"type": "object",
"description": "Optional: additional context for evaluation."
}
},
"required": [
"text"
]
},
"output_contract_schema": {
"type": "object",
"properties": {
"compliant": {
"type": "boolean",
"description": "Whether the content passes all checks."
},
"violations": {
"type": "array",
"description": "List of violations found."
},
"violation_count": {
"type": "number",
"description": "Total number of violations."
},
"risk_level": {
"type": "string",
"description": "Overall risk assessment."
},
"summary": {
"type": "string",
"description": "Human-readable compliance summary."
}
}
},
"ports": [
{
"port_id": "compliant",
"label": "Compliant",
"description": "Content passes all compliance checks.",
"is_default": true,
"supports_condition": true
},
{
"port_id": "non_compliant",
"label": "Non-Compliant",
"description": "One or more violations detected.",
"is_default": false,
"supports_condition": true
},
{
"port_id": "error",
"label": "Error",
"description": "Compliance check failed.",
"is_default": false,
"supports_condition": false
}
],
"execution_mode": "async",
"tags": [
"ai",
"compliance",
"audit",
"governance",
"policy"
],
"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",
"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
},
"knowledge_resource_id": {
"type": "string",
"title": "Compliance Policy",
"description": "REQUIRED: Knowledge Resource containing the compliance rules/policy to check against.",
"ui_widget": "knowledge_resource_picker"
},
"check_mode": {
"type": "string",
"title": "Check Mode",
"enum": [
"full",
"quick"
],
"default": "full",
"description": "Full: deep analysis of all rules. Quick: critical violations only."
},
"severity_levels": {
"type": "array",
"title": "Severity Levels",
"default": [
"critical",
"major",
"minor",
"info"
],
"items": {
"type": "string"
},
"description": "Severity classification for violations."
},
"language": {
"type": "string",
"title": "Language",
"default": "en"
},
"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
}
}
}
},
"required": [
"knowledge_resource_id"
]
}{
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "Content to evaluate for compliance."
},
"document_type": {
"type": "string",
"description": "Optional: type of document (contract, email, report)."
},
"context": {
"type": "object",
"description": "Optional: additional context for evaluation."
}
},
"required": [
"text"
]
}{
"type": "object",
"properties": {
"compliant": {
"type": "boolean",
"description": "Whether the content passes all checks."
},
"violations": {
"type": "array",
"description": "List of violations found."
},
"violation_count": {
"type": "number",
"description": "Total number of violations."
},
"risk_level": {
"type": "string",
"description": "Overall risk assessment."
},
"summary": {
"type": "string",
"description": "Human-readable compliance summary."
}
}
}[
{
"port_id": "compliant",
"label": "Compliant",
"description": "Content passes all compliance checks.",
"is_default": true,
"supports_condition": true
},
{
"port_id": "non_compliant",
"label": "Non-Compliant",
"description": "One or more violations detected.",
"is_default": false,
"supports_condition": true
},
{
"port_id": "error",
"label": "Error",
"description": "Compliance check failed.",
"is_default": false,
"supports_condition": false
}
]Execution
- Execution
async- Stateful
- No
- Retries (
retryOnFail) - No
- Capabilities
complianceauditgovernancepolicyrisk- Tags
aicomplianceauditgovernancepolicy
Notes and limits
- When
textis empty, the worker falls back toinput, which at runtime is always the whole upstream payload object. The missing-text check therefore never fires and the object is sent to the model as the message. Always maptextexplicitly. risk_levelandsummarycome from the model; whenrisk_levelis missing it isnone(compliant) ormedium(non-compliant).- 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: 0only 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