• Validate the output format; valid JSON alone does not establish a correct answer.
  • Check claims against an applicable source and apply your business rule; an outdated source can support the wrong decision.
  • Hold the proposed action for human review; passing answer checks is not permission to execute.

This guide is for people turning AI answers into draft replies, record updates, or other workflow steps. It uses an invented return-policy example to separate those checks. We ran a small offline rule checker on the example records; we did not run an AI model, an n8n workflow, or a DeepEval evaluation, and no customer record was changed.

One question, three answers

Imagine a store with two policy documents. These are teaching fixtures, not a real retailer’s terms or consumer-rights advice:

  • CURRENT-14: for deliveries on or after November 1, 2026, unopened items can be returned within 14 calendar days after delivery.
  • OLD-30: for deliveries through October 31, 2026, unopened items could be returned within 30 calendar days after delivery.

In both documents, delivery is day 0 and the last day of the window is included. An unopened item was delivered on November 4. The request arrives on November 20, 16 days later. The current policy applies, so this example is outside its return window. Real businesses need to account for their actual terms, exceptions, and applicable law; these two rules deliberately leave those complications out.

Here are three possible structured answers. All three have the same valid fields and types.

Swipe or scroll horizontally to view all columns.

Invented answers to the same return-policy question
Answer Claim and cited source What the check finds Route
A Eligible; 30 days; CURRENT-14 Valid format, but the claim contradicts the cited 14-day policy. Hold
B Not eligible; 14 days; CURRENT-14 Matches the cited policy, its delivery-date scope, and the rule for this order. Ready for human review, not execution
C Eligible; 30 days; OLD-30 Matches the old document, but that document does not apply to this delivery. Hold

The distinction between A and C matters. A source-comparison check should catch A. It could reasonably accept C as consistent with the supplied old source. A separate applicability check must reject C.

1. Check the shape before using the fields

A downstream step needs predictable fields. For example, answer B could look like this:

{
  "return_eligible": false,
  "return_window_days": 14,
  "source_id": "CURRENT-14"
}

Require the fields your workflow actually needs, reject unexpected types, and provide a separate route for missing information. The string "false" is not the Boolean false. A missing source ID should not quietly become permission to continue.

n8n’s Structured Output Parser returns fields based on a JSON Schema. Its documentation also makes a useful distinction: generating a schema from an example uses the property names and types, ignores the example values, and makes every field mandatory. An example containing 14 does not, by itself, enforce the correct return window. [1]

Keep stable facts and calculations outside the model when you can. For this fixture, date arithmetic is enough to establish the elapsed time:

from datetime import date
elapsed_days = (date(2026, 11, 20) - date(2026, 11, 4)).days
within_window = elapsed_days <= 14
# elapsed_days is 16; within_window is False.

That calculation does not establish whether a real customer has a legal right to return an item. It answers one narrow question under the invented rule.

2. Match each material claim to evidence

For a claim such as “the return window is 30 days,” retrieve the passage that establishes the window. Store the source ID, relevant passage, and the version or effective-date information alongside the answer. A plausible-looking citation is not enough: resolve the ID against the documents your workflow actually retrieved.

DeepEval’s Faithfulness documentation describes comparing an actual_output with the contents of its retrieval_context. It documents an LLM-as-a-judge mode, among other evaluation modes. This is a check of agreement with supplied context, not a guarantee that the context itself is current or correct. We did not run that metric for this article. [3]

Our example checker instead compares the return-window field and eligibility decision with the supplied policy fixture. This is a deterministic field-and-rule comparison, not a semantic faithfulness score. It rejects A’s 30-day claim against CURRENT-14, but recognizes that C matches OLD-30.

If you use a model-based evaluator, keep its explanation as well as its score and examine disagreements. Choose a threshold using examples labeled for your task, including costly mistakes. Do not copy a documentation example’s threshold and interpret it as a probability that your answer is true.

3. Check whether the source applies

“Retrieved successfully” and “relevant to this order” are different tests. In the example, OLD-30 is a genuine fixture document and C follows it correctly. Its delivery-date scope is what makes it unsuitable.

  • Effective scope: which purchase, delivery, or request dates does the rule cover?
  • Product and location: does it apply to this item, account type, or region?
  • Authority and version: is this the approved policy, a superseded copy, or an informal note?
  • Missing or conflicting evidence: can the workflow identify one applicable rule, or does it need a person to resolve the conflict?

Use policy metadata supplied by a trusted process rather than asking the answer-generating model to declare its own source current. A recently retrieved page may contain an old rule; an older document may remain the correct one for an earlier transaction.

Retrieval and memory help get information into the conversation. They do not settle whether that information should govern the next action. Our guide to conversation history, RAG, and long-term memory explains those different information paths.

Five gates before an AI action: format, evidence, source applicability, business rules, and action approval. Missing or conflicting information means holding the action.
Original editorial checklist: validate the answer and its evidence before reviewing the proposed action. This is an illustration, not a product screenshot or measured model result.

4. Apply the business rule, then inspect the action

After checking the answer and source, apply the actual rule to the actual inputs. For this simplified case, the relevant conditions are the policy’s delivery-date range, the unopened status, and the elapsed days. In a real workflow, missing order details or unresolved exceptions should produce a hold, not a guessed decision.

Keep this result separate from execution permission. Even answer B, which passes the fixture checks, should not automatically send a refusal, close a case, or change a refund record. Those are different actions with different consequences.

n8n documents human review for selected AI Agent tools: the workflow pauses, the reviewer sees the proposed tool and parameters, and the reviewer can approve or deny that call. This is tool-call oversight, not automatic verification of every statement in the answer. [2]

An approval request should show the proposed operation, target record, relevant amount or status change, supporting policy passage, and any unresolved uncertainty. Reviewing “AI says this is fine” is not the same as reviewing the operation. Denied or unanswered requests should not fall through to execution; define a safe hold or escalation path.

The offline example routes B to REVIEW_REQUIRED and A and C to HOLD. It contains no refund or messaging tool. All three records have action_executed: false.

5. Test the gates, not just the happy path

Start with a small set of cases whose expected handling you can explain. Include a valid answer with the wrong claim, an answer supported by an inapplicable document, a missing field, an unknown source, and inputs at either side of a rule boundary.

n8n’s evaluation guidance describes running test cases through a workflow and adding inputs that exposed bugs to a regression dataset. The useful question is whether a changed prompt, model, or retrieval setup breaks cases that previously worked—not whether one polished demonstration looks convincing. [4]

For this article, our local Python checker produced the A/B/C routes shown above and passed six additional assertions: a string instead of a Boolean, a missing source, an unexpected field, an unknown source, and the inclusive day-14 and outside-window day-15 boundaries. This verifies only the teaching code against its fixtures. Three invented answers and six assertions are not a model accuracy study, a production safety test, or a measured hallucination-detection rate.

For a deployed workflow, retain the input, answer, retrieved evidence, rule version, gate results, proposed tool call, approval outcome, and eventual execution result. Limit access and retention, redact unnecessary customer details, and check where any external model or evaluation service receives data before connecting it. These are design recommendations; this article did not test a hosted service’s privacy settings or pricing.

A small starting point

If your workflow currently passes a free-form answer straight to another tool, begin with three changes: require a parseable output, resolve each material claim to an applicable source, and hold consequential actions for an informed reviewer. Add task-specific rule checks and regression cases before expanding what can run without review.

You do not need to switch platforms to distinguish those jobs. If platform choice is still unresolved, see our n8n versus Dify comparison. This article’s contribution is the checking sequence, not another platform ranking.

The practical test is simple: can you explain why an answer passed, which policy governed it, and exactly what the next tool is allowed to do? If not, keep the action on hold.

Sources and scope

Official documentation reviewed November 8, 2026. Product descriptions below are documentation-based, not results from our own account or workflow deployment. The store policies and answers are explicitly invented. Only the offline deterministic example was executed; no AI inference, paid evaluation, or customer action was performed.

  1. n8n: Structured Output Parser — schema generation and output fields.
  2. n8n: Human-in-the-loop for tools — selected-tool approval and the proposed parameters.
  3. DeepEval: Faithfulness — evaluation against supplied retrieval context.
  4. n8n: Understand why to test — test datasets and regression checks.
← Back to Tech Guides
Tech Guides
Turn a PDF Into Editable Markdown With Docling ↗