OCNORA
hitlintermediate15 min setupby Mantle

Extract with human clarification on low confidence

Extract structured data from text; when the model is unsure it pauses and asks a person to pick from candidates, then the record is posted.

Drag to pan, pinch to zoom. This is the real graph the template installs.

How it works

What it does

  • Webhook extract-inExtract (pause if unsure): on_ambiguity: pause with confidence_threshold: 0.75. When the model's self-reported confidence is low, or it returns several candidates, the run pauses and a person picks the right one in the run panel.
  • Post order line sends the (possibly human-corrected) fields.

Setup

  • AI connection on the extractor; adjust the schema, threshold and destination url.

Nodes 3

  1. 01Text intrigger.webhookTrigger
  2. 02Extract (pause if unsure)ai.extractAI
  3. 03Post order linehttp.requestHTTP
View template JSON
{
  "format": "mantle-workflow/v1",
  "id": "hitl-extract-with-clarification",
  "name": "Extract with human clarification on low confidence",
  "graph": {
    "nodes": [
      {
        "id": "webhook",
        "type": "trigger.webhook",
        "label": "Text in",
        "config": {
          "slug": "extract-in",
          "input_schema": {
            "required": [
              "text"
            ],
            "properties": {
              "text": {
                "type": "string"
              }
            }
          }
        },
        "connection_id": null,
        "worker_type": "generic-worker",
        "position": {
          "x": 60,
          "y": 220
        }
      },
      {
        "id": "ai_extract",
        "type": "ai.extract",
        "label": "Extract (pause if unsure)",
        "config": {
          "model": "claude-sonnet-4-5",
          "temperature": 0,
          "text": "{{ $json.text }}",
          "schema": {
            "type": "object",
            "required": [
              "product",
              "quantity"
            ],
            "properties": {
              "product": {
                "type": "string"
              },
              "quantity": {
                "type": "number"
              },
              "confidence": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "candidates": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "on_ambiguity": "pause",
          "confidence_threshold": 0.75,
          "confidence_path": "confidence",
          "candidates_path": "candidates",
          "candidate_label_field": "label",
          "ambiguity_question": "Which product did the customer mean?",
          "timeout_seconds": 86400
        },
        "connection_id": null,
        "worker_type": "ai-worker",
        "position": {
          "x": 380,
          "y": 220
        }
      },
      {
        "id": "post_order",
        "type": "http.request",
        "label": "Post order line",
        "config": {
          "method": "POST",
          "url": "https://example.com/order-lines",
          "headers": {
            "Content-Type": "application/json"
          },
          "json": {
            "product": "steps.ai_extract.response.product",
            "quantity": "steps.ai_extract.response.quantity"
          }
        },
        "connection_id": null,
        "worker_type": "generic-worker",
        "position": {
          "x": 700,
          "y": 220
        }
      }
    ],
    "edges": [
      {
        "from": "webhook",
        "to": "ai_extract"
      },
      {
        "from": "ai_extract",
        "to": "post_order"
      }
    ]
  }
}

Use it, then make it yours.

Templates install as drafts. Change anything, and Workflow Health re-checks the graph on every save.