HITL Correction Node
Pause workflow execution for human data correction and editing.
Overview
The HITL Correction Node pauses workflows and presents data to human reviewers for editing or correction. Unlike the Approval Node (which only allows approve/reject), the Correction Node enables reviewers to:
- Edit extracted fields - Fix OCR or LLM extraction errors
- Add missing data - Fill in fields the automation couldn’t extract
- Validate and refine - Verify and improve automated outputs
- Annotate - Add notes or metadata to processed data
Corrected data replaces the original in the workflow context and execution continues.
When to Use
Use a HITL Correction Node when you need:
- Fix extraction errors - OCR misreads or LLM hallucinations
- Handle edge cases - Documents with unusual layouts or missing fields
- Training data collection - Gather human corrections to improve models
- Incremental automation - Start with human review, automate over time
- Quality improvement - Refine outputs before exposing to downstream systems
For simple yes/no approval, use HITL Approval Node instead.
Configuration
Correction Task
Define what reviewers are correcting:
| Field | Description | Example |
|---|---|---|
| Title | Short summary | ”Verify extracted invoice fields” |
| Description | Instructions for reviewer | ”Review and correct any extraction errors” |
| Input source | Data to display for correction | $.nodes.extract_invoice.output |
| Editable fields | Which fields can be edited | See schema configuration below |
Field Schema
Define editable fields with JSON schema:
{
"fields": [
{
"name": "invoice_number",
"label": "Invoice Number",
"type": "string",
"required": true,
"validation": {
"pattern": "^INV-\\d{6}$",
"error_message": "Format: INV-123456"
}
},
{
"name": "date",
"label": "Invoice Date",
"type": "date",
"required": true
},
{
"name": "total_amount",
"label": "Total Amount",
"type": "number",
"required": true,
"validation": {
"min": 0,
"error_message": "Amount must be positive"
}
},
{
"name": "line_items",
"label": "Line Items",
"type": "array",
"items": {
"type": "object",
"properties": {
"description": { "type": "string" },
"quantity": { "type": "number" },
"unit_price": { "type": "number" }
}
}
},
{
"name": "notes",
"label": "Reviewer Notes",
"type": "textarea",
"required": false
}
]
}Supported field types:
- string - Single-line text input
- textarea - Multi-line text input
- number - Numeric input with optional min/max
- date - Date picker
- select - Dropdown with predefined options
- checkbox - Boolean value
- array - Repeating sub-fields (for line items, etc.)
- object - Nested field group
Reviewer Assignment
Specify who can make corrections:
{
"reviewers": ["role:data_entry", "team:processing"],
"assignment_type": "any",
"priority": "high"
}Assignment types:
- any: Any reviewer can correct
- round_robin: Distribute tasks evenly across reviewers
- load_balanced: Assign to reviewer with fewest pending tasks
Reference Data
Display supporting information to help reviewers:
{
"reference_data": {
"original_document": {
"type": "image",
"url": "$.data.document_url",
"label": "Original Invoice"
},
"ocr_confidence": {
"type": "metric",
"value": "$.nodes.ocr.output.confidence",
"label": "OCR Confidence",
"format": "percentage"
}
}
}Reference data appears in a side panel while reviewers edit fields.
Validation Rules
Enforce data quality with validation:
{
"validation": {
"required_fields": ["invoice_number", "date", "total_amount"],
"cross_field_checks": [
{
"rule": "line_items_total == total_amount",
"error_message": "Line items must sum to total amount"
}
],
"custom_validator": {
"endpoint": "validator_executor://validate_invoice",
"function": "check_invoice_fields"
}
}
}Validation runs when reviewer submits corrections. Errors prevent submission until fixed.
Review Interface
Reviewers access correction tasks via:
- In-app queue - OPERATE → Reviews → Corrections tab
- Email notification - Link to specific task
- API integration - Embed correction UI in external tools
Correction UI displays:
- Original values - What automation extracted (grayed out for reference)
- Editable fields - Form inputs matching configured schema
- Reference documents - Original PDFs, images, etc. in side panel
- Confidence indicators - Visual cues for low-confidence fields
- Validation feedback - Real-time error messages for invalid inputs
- Action buttons - Submit, Skip, Escalate
Field-Level Confidence
Highlight low-confidence extractions for reviewer attention:
{
"fields": [
{
"name": "invoice_number",
"value": "INV-123456",
"confidence": 0.95,
"highlight_threshold": 0.8
},
{
"name": "date",
"value": "2026-03-19",
"confidence": 0.65,
"highlight_threshold": 0.8,
"needs_review": true
}
]
}Fields with confidence < highlight_threshold are marked for review (yellow border, warning icon).
Output
The HITL Correction Node produces corrected data accessible in downstream nodes:
{
"correction_result": {
"corrected_data": {
"invoice_number": "INV-654321",
"date": "2026-03-20",
"total_amount": 1234.56,
"line_items": [
{ "description": "Item A", "quantity": 2, "unit_price": 500.00 },
{ "description": "Item B", "quantity": 1, "unit_price": 234.56 }
],
"notes": "Corrected date and line items"
},
"changes": [
{
"field": "invoice_number",
"original": "INV-123456",
"corrected": "INV-654321",
"confidence_original": 0.95
},
{
"field": "date",
"original": "2026-03-19",
"corrected": "2026-03-20",
"confidence_original": 0.65
}
],
"reviewer_id": "user_xyz",
"timestamp": "2026-03-19T15:45:30Z",
"selected_path_id": "corrected"
}
}Access corrected data via JSONPath:
$.nodes.correction_node.output.correction_result.corrected_data- Full corrected object$.nodes.correction_node.output.correction_result.changes- List of changes made$.nodes.correction_node.output.correction_result.reviewer_id- Who made corrections
Routing Paths
Configure paths based on correction outcome:
{
"paths": [
{
"path_id": "corrected",
"target_node_ids": ["validate_corrected", "process_invoice"]
},
{
"path_id": "skipped",
"target_node_ids": ["needs_investigation"]
},
{
"path_id": "escalated",
"target_node_ids": ["expert_review"]
}
]
}Paths:
- corrected: Reviewer submitted corrections
- skipped: Reviewer marked task as unable to correct
- escalated: Reviewer escalated to expert
Example Configurations
Invoice Field Correction
{
"node_id": "correct_invoice",
"node_type": "HITL_CORRECTION",
"definition": {
"title": "Verify Invoice Extraction",
"description": "Review and correct extracted invoice fields",
"input_source": "$.nodes.extract_invoice.output",
"reviewers": ["role:data_entry"],
"assignment_type": "load_balanced",
"fields": [
{
"name": "invoice_number",
"label": "Invoice Number",
"type": "string",
"required": true,
"value": "$.nodes.extract_invoice.output.invoice_number",
"confidence": "$.nodes.extract_invoice.output.confidence.invoice_number"
},
{
"name": "date",
"label": "Invoice Date",
"type": "date",
"required": true,
"value": "$.nodes.extract_invoice.output.date",
"confidence": "$.nodes.extract_invoice.output.confidence.date"
},
{
"name": "total_amount",
"label": "Total Amount",
"type": "number",
"required": true,
"value": "$.nodes.extract_invoice.output.total_amount",
"confidence": "$.nodes.extract_invoice.output.confidence.total_amount"
}
],
"reference_data": {
"original_invoice": {
"type": "pdf",
"url": "$.data.document_url"
}
},
"paths": [
{
"path_id": "corrected",
"target_node_ids": ["process_invoice"]
},
{
"path_id": "skipped",
"target_node_ids": ["flag_for_review"]
}
]
}
}Multi-Page Document Correction
For documents with repeating structures (line items, signatures):
{
"fields": [
{
"name": "header",
"label": "Invoice Header",
"type": "object",
"properties": {
"invoice_number": { "type": "string" },
"date": { "type": "date" },
"vendor": { "type": "string" }
}
},
{
"name": "line_items",
"label": "Line Items",
"type": "array",
"min_items": 1,
"items": {
"type": "object",
"properties": {
"description": { "type": "string", "required": true },
"quantity": { "type": "number", "required": true },
"unit_price": { "type": "number", "required": true },
"subtotal": { "type": "number", "computed": "quantity * unit_price" }
}
},
"actions": ["add_row", "delete_row", "reorder"]
}
]
}Reviewers can add/remove line items and reorder them.
Training Data Collection
Collect correction data to improve automation models:
{
"training_data": {
"enabled": true,
"fields_to_log": ["invoice_number", "date", "total_amount"],
"include_original": true,
"include_corrected": true,
"include_document": true,
"destination": "s3://training-data/invoice-corrections/"
}
}Each correction is logged as:
{
"document_id": "doc_abc123",
"original_extraction": { "invoice_number": "INV-123456", ... },
"corrected_extraction": { "invoice_number": "INV-654321", ... },
"document_url": "s3://...",
"reviewer_id": "user_xyz",
"timestamp": "2026-03-19T15:45:30Z"
}Use this data to retrain extraction models and reduce correction rate over time.
Metrics and Analytics
Track correction performance:
| Metric | Description | Use Case |
|---|---|---|
| Correction rate | % of documents requiring correction | Measure automation quality |
| Fields corrected | Which fields are corrected most often | Identify extraction weaknesses |
| Time per correction | Average reviewer time | Estimate capacity needs |
| Reviewer accuracy | % of corrections later deemed incorrect | Quality control for reviewers |
Access metrics via OPERATE → Analytics → Corrections.
Best Practices
- Prioritize by confidence - Route low-confidence extractions to correction queue first
- Show original document - Always display source PDF/image for reference
- Pre-fill with automation - Start with automated extraction, let reviewers fix
- Validate aggressively - Catch errors before reviewers submit
- Minimize fields - Only show fields that need correction, hide confident extractions
- Track changes - Log all corrections for training data and audit trail
- Set deadlines - Configure timeouts to prevent tasks from aging indefinitely
- Monitor trends - If correction rate increases, investigate automation quality
Start with 100% correction (all documents reviewed) and gradually reduce as automation improves. Monitor metrics to safely decrease correction rate.
Integration with Quality Loops
Use corrections to improve automation:
This creates a feedback loop where human corrections improve the model over time.
API Access
Programmatically manage correction tasks:
// Get pending corrections
const pending = await trpc.corrections.getPending.query();
// Submit corrections
await trpc.corrections.submit.mutate({
task_id: 'task_abc123',
corrected_data: {
invoice_number: 'INV-654321',
date: '2026-03-20',
total_amount: 1234.56
}
});
// Skip a task
await trpc.corrections.skip.mutate({
task_id: 'task_abc123',
reason: 'Document is illegible'
});Related Nodes
- HITL Approval Node - Simple approve/reject
- HITL Router Node - Route to specific reviewers
- Guardrail Node - Automated validation