VLM Complexity Classifier icon

VLM Complexity Classifier

Classify document complexity and route to LOW/HIGH outputs

VLM Complexity Classifier

AI-generated

Summary

Classifies each input item’s image with the selected VLM model and routes it to the LOW or HIGH output using the configured P(HIGH) threshold. Preserves the item’s binary data and JSON, adds classification results, and can copy the image as base64 into a JSON field.

Inputs

  • Model (required) — Select a model from the configured Ollama or custom API server.
  • Image Source — Choose an n8n binary field (default) or a JSON field containing base64, optionally with a Data URI prefix.
  • Binary Field — Binary property to read; leave empty to auto-detect the first binary whose MIME type starts with image/.
  • Base64 Field — JSON property containing the base64 image when Image Source is From Base64 Field; defaults to data.
  • Output Base64 Field — Optional JSON property name for the extracted image data. When set, the source JSON base64 field is removed if it has a different name.
  • Output Base64 Format — Choose raw base64 or a Data URI for the optional output field; defaults to raw.
  • Advanced Options — Set the per-request timeout (default 30,000 ms), maximum retries for transient HTTP/network failures (default 3), retry base delay (default 1,000 ms), and classification error handling. Errors default to LOW with an error detail; choosing Fail Node throws after retries. Set HIGH Trigger Threshold (default 0.5) to route by P(HIGH); 0 sends successful classifications to HIGH, while 1 sends them to LOW.

Output shape

Two output lists: LOW items on the first output and HIGH items on the second.

Each output item retains its input JSON and binary data. JSON gains complexityClass, complexityConfidence, complexityProbabilityHigh, processingTime, modelUsed, classificationAttempts, and _itemIndex; classificationError is added on failure and removed after success. Missing images are still sent for classification as an empty text request. With the default error behavior, failed classifications route to LOW with confidence 0 and an error detail; Fail Node stops execution after the final failed attempt. Thresholding uses a strict P(HIGH) > threshold comparison, and failed classifications are not re-labeled.

Links

Discussion