AI Lead Classifier
● Independent demo • synthetic data
A real LLM call inside n8n that validates structured output, retries transient failures, and refuses to guess when the model misbehaves.
Problem demonstrated
LLM integrations fail quietly: the model returns malformed JSON, the API returns 503, or the output drifts outside the schema — and the workflow routes whatever it got anyway.
What it visibly does
- A real API call returns a structured classification (category, urgency, intent, confidence)
- Output that fails schema validation is rejected with an explicit error instead of a guess
- A simulated 503 triggers retry handling, and a recovered retry is captured as evidence
- Missing input is rejected at validation before any model call is made
What was actually tested
In plain terms, the checks cover three situations a buyer actually worries about:
- A normal message arrives and is classified. Category, urgency and intent are returned, parsed and schema-validated before anything downstream uses them.
- The model returns malformed or invalid output. Parsing or schema validation fails, so the workflow does NOT route the bad result — it takes the explicit failure path instead of trusting whatever came back.
- The model API returns a forced 503. Retries run against a local fixture that always returns 503; after the configured attempts the workflow returns a clean failure with no fabricated classification.
9 acceptance cases were run against the live n8n webhook, using a real Hive API call (GLM 5.3 Flash). Coverage: happy-path classifications, missing input, malformed JSON from the model, forced 503 through all retries, schema-invalid values, and a transient 503 that recovered on retry. All 9 passed.
Outside scope: A schema-valid response is not proof of classification accuracy — these are synthetic test messages, not labelled real-world data, so no accuracy rate is claimed. Not tested under production volume, rate limits or provider outages. No business outcome, time saving or revenue is measured.
Real n8n screenshots and captured responses are in the repo; there is no recorded video for this one.
Technical detail and test evidence
- 9/9 cases passed — results.json with per-case expected vs actual
- Forced-failure path observed 3 attempts (1 initial + 2 retries) with backoff, then a clean failure
- Transient 503 recovered on the second attempt against the real API
- Malformed output returns 502, never a fabricated classification
Techn8nLLM (GLM 5.3 Flash via Hive)JSON schema validationRetry/backoffAPI integration