n8n Evaluations: testing and hardening your AI workflows before a client does it for you
Published 19 July 2026 · 6 min read
A regular n8n workflow, once tested, stays stable: the same input always produces the same output. A workflow built on an LLM doesn't get that guarantee. Change one word in the prompt, switch from gpt-4o to a cheaper model, or have the provider quietly update its model on a Tuesday night — and the quality of your RAG chatbot's answers or the accuracy of your email triage can degrade without a single node turning red. The workflow still "works" in the technical sense; it just answers worse. That's exactly the gap n8n's Evaluations feature closes: a native way to replay a test set against your AI workflow and measure, in numbers, whether one version is actually better than another.
Why an AI workflow needs a different kind of safety net
On a regular workflow — a Supabase sync, an email send, a webhook handler — a test checks that a given input produces exactly the expected output. On an AI workflow, the output varies slightly by nature on every run, and "correct" is often a matter of degree rather than strict equality: a meeting summary can be good without matching a reference summary word for word; a RAG chatbot answer can be accurate while being phrased differently. Testing that kind of behavior needs something other than an assert equals — a set of representative cases, a way to score each output, and a history to compare scores over time. That's the job of n8n's native Evaluation Trigger and Evaluation nodes.
The Evaluation Trigger node and the dataset principle
The Evaluation Trigger starts an evaluation run from a dataset stored either in a Google Sheet or in an n8n Data Table. Each row of the dataset represents a test case: the input columns mirror what your workflow normally receives (an email's text, the question asked to the chatbot, an invoice's content), and one or more columns hold the expected output or reference criteria.
Concretely, for the email-triage workflow in an Inbox AI Pack, a minimal dataset looks like:
| source_email | expected_category | expected_urgency |
|---|---|---|
| "Invoice unpaid for 60 days, final reminder" | administrative | high |
| "Weekly newsletter from vendor X" | newsletter | low |
| "Production server is down, need help now" | client | high |
Each row, replayed through the actual workflow (or a copy dedicated to testing), produces an output that is then compared to the expected column.
Light evaluations vs. metric-based evaluations: two uses, one tool
n8n distinguishes two ways to use this mechanism:
- Light evaluations — built for development: you manually re-run a small set of hand-picked cases while tuning a prompt, to spot an obvious regression right away before committing the change.
- Metric-based evaluations — built for production: they run over a larger dataset, compute numeric scores stored and tracked over time in the workflow's Evaluations tab, and let you objectively compare two versions over time — after a model change, a prompt rewrite, or an update to your RAG document base.
The right practice is to use both: light evaluations in a fast loop while you iterate, metric-based evaluations as a regression net before every production rollout of a prompt or model change.
Choosing your metrics
The Evaluation node, in its Set Metrics operation, computes and records a score per run. The most useful metrics fall into two families:
- Exact metrics, fast and with no extra AI cost:
- Categorization — exact match between the predicted category and the expected one (1 or 0), ideal for a triage workflow like the one in the Inbox AI Pack;
- String Similarity — a text-proximity score (0 to 1), useful when an answer should stay close to a reference wording without matching it word for word.
- AI-judged metrics (LLM-as-judge), for outputs where "correct" isn't reducible to equality:
- Correctness — a judge model rates, on a 1-5 scale, whether the answer is factually accurate against a reference;
- Helpfulness — same principle, but judging whether the answer actually addresses the question asked, independent of strict accuracy.
For a RAG chatbot like the one in the RAG Assistant Pack, Correctness is the central metric: it catches the day the model starts answering around the ingested documents rather than from them — exactly the symptom the anti-hallucination prompt described in our Supabase pgvector RAG guide is meant to prevent.
Building a concrete evaluation pipeline
The typical setup looks like this:
- Evaluation Trigger — reads one row from the dataset (Google Sheet or Data Table).
- Execute Sub-workflow — calls the actual business workflow (or its answer-generation logic) with the current row's input. Isolating the business logic in a sub-workflow, as recommended in our guide on GDPR audit trails, avoids duplicating the prompt between the production workflow and the test one here too.
- Evaluation → Set Metrics — compares the obtained output to the expected one and records the scores (Correctness, Categorization, etc.).
- Evaluation → Set Outputs (optional) — writes the detailed result back to the Google Sheet, so you can manually review the cases that scored poorly.
Once this is wired up, the workflow's Evaluations tab shows the run history and average scores — the view that lets you answer, objectively, "did this prompt change improve or degrade quality?" instead of relying on an impression after three manual tries.
Catching drift before a client does
The real value of this setup isn't validating a prompt once — it's replaying it after every change: a provider-side model update, a prompt tweak, new documents added to the RAG base, or switching AI providers (see our guide on connecting Claude or GPT to n8n if you're testing a model switch). A test set of twenty to thirty cases, re-run in a few minutes, turns a question that used to require a risky manual re-read into a numeric, reproducible answer. And every real incident flagged in production — a wrong answer, a missed category — becomes a new case added to the dataset: the test set grows with actual usage, not just with whoever wrote it first imagined.
Common pitfalls
- A dataset that only covers easy cases: a test set full of clean-cut examples never catches the regressions that matter, which show up precisely on ambiguous inputs.
- Confusing light and metric-based evaluations: manually re-running ten cases during development doesn't replace an automated, tracked pass before every production release.
- A single AI judge with no explicit rubric: a vague grading prompt ("rate this answer out of 5") produces scores that aren't reproducible; spell out criteria the way you would for a human grader.
- Never reviewing the low scores: a dropping score doesn't tell you why — the Set Outputs tab, which keeps the full output, is what lets you understand the failed case instead of just noticing it.
Going further
The RAG Assistant Pack (€119) and the Compliance & Audit Pack (€149) both rely on AI-generated answers where accuracy matters directly — a documentary chatbot, an audit summary report. Setting up an evaluation dataset, even a minimal one, is the natural next step once these workflows are in production: it's what lets you switch models or tune a prompt with confidence, instead of waiting for a user to report the problem. If AI reliability is a concern across your whole stack (email triage, RAG, compliance), the Complete FlowKit Bundle (€269) brings all three packs together on that same baseline.
FAQ
Frequently asked questions
Do I need to write code to use n8n Evaluations?
No. The dataset lives in a Google Sheet or an n8n Data Table, no code required, and metrics are computed with standard nodes (exact comparison, or an AI node configured as a judge). It's the same skill level needed to build any regular n8n workflow.
What's the difference between light evaluations and metric-based evaluations?
Light evaluations are for development: you manually re-run a small, hand-picked set of cases to check that a prompt change hasn't broken anything obvious. Metric-based evaluations target production: they run over a larger dataset, compute numeric scores stored in the Evaluations tab, and let you objectively compare two versions of the same workflow.
Isn't LLM-as-judge biased, since an AI is grading another AI?
That's a real, documented limitation: an AI judge can carry its own biases around phrasing or length. The mitigation is to give the judge very explicit grading criteria (a rubric, not just "rate this reply"), cross-check with exact metrics (Categorization, String Similarity) where possible, and periodically hand-review a sample of the judge's scores to confirm they still track your own judgment.
How many test cases does the dataset need to be useful?
Roughly twenty well-chosen cases, covering both typical inputs and known edge cases (an ambiguous email, a document with no answer in the RAG base, an out-of-scope query), already catches most prompt regressions. The key is growing it from real incidents: every time a user flags a bad answer in production, that exact case joins the dataset so it never slips through again.
Bundle FlowKit Complet
€269