config-evals

Contributors

GitHub-linked commit authors for this SKILL.md at the saved revision. Co-authors and history before file renames are not included.

File history ↗

Builds and maintains configuration-based evaluations on a workflow with the eval-config tool. Use when the user asks to set up, add, view, change, or remove an evaluation, score, grade, or judge a workflow's output, or measure answer quality against a test dataset. This is the only eval form Instance AI handles — it does not touch on-canvas evaluation nodes.

packages/@n8n/instance-ai/skills/config-evals/SKILL.md

Download bundle ↓
master · 8bff5da2 bundle filesScanned 2026-09-15

references/config-eval-playbook.md

1,229 tokens · o200k_base · 5,095 bytes

Config Eval Playbook

Recipes and worked examples for the eval-config tool. All actions are discriminated by action and always take a workflowId.

Actions

ActionPurposeExtra fields
listList config evals on a workflow
getRead one config evalconfigId
createAttach a new config evalconfig fields
updateReplace an existing config evalconfigId + config fields
deleteRemove a config evalconfigId

Config fields (create/update): name, startNodeName, endNodeName, dataTableId, metrics.

startNodeName must be a node with an incoming connection — the first node the trigger feeds into, never the trigger itself. An eval run replaces the trigger with a dataset-driven one, so naming the trigger as the start node fails to compile. For a single-agent workflow, startNodeName and endNodeName are usually the same agent node.

create, update, and delete show an approval card automatically. Call the tool and act on the result; do not ask for chat approval beforehand.

Metric Fields

FieldRequiredNotes
namealwayse.g. "Correctness"
presetalwayscorrectness or helpfulness
credentialIdalwayscredential id for the judge model; also determines the provider
modelalwayse.g. gpt-4o
outputTypedefaults to numericnumeric or boolean
actualAnsweralwaysexpression for the produced answer, e.g. ={{ $json.output }}
expectedAnswercorrectness presetexpression for ground truth, e.g. ={{ $json.expected_output }}
userQueryhelpfulness presetexpression for the user's query, e.g. ={{ $json.input }}
promptoptionaloverrides the default judge prompt
provideromitchat-model node type; leave unset — derived from credentialId. Set only if you know it (e.g. @n8n/n8n-nodes-langchain.lmChatOpenAi)

actualAnswer, expectedAnswer, and userQuery are expressions and must begin with = (e.g. ={{ $json.output }}). Without the = the value is stored as literal text and the judge scores {{ $json.output }} verbatim instead of the resolved output. Only omit = for a genuinely fixed constant string.

Worked Example — correctness eval on an agent workflow

  1. Ensure a dataset exists with an input column and a ground-truth column:

    data-tables(action="list")
    // if none fits:
    data-tables(action="create", name="Support agent eval dataset",
      columns=[{ name: "input", type: "string" },
               { name: "expected_output", type: "string" }])
    // then seed rows with data-tables insert
    
  2. Create the config eval, linking the dataset by id:

    eval-config(
      action="create",
      workflowId="<wf_id>",
      name="Support agent correctness",
      startNodeName="AI Agent",        // first node after the trigger — not the trigger itself
      endNodeName="AI Agent",
      dataTableId="<dt_id>",
      metrics=[{
        name: "Correctness",
        preset: "correctness",
        credentialId: "<cred_id>",   // provider is derived from this credential
        model: "gpt-4o",
        actualAnswer: "={{ $json.output }}",
        expectedAnswer: "={{ $json.expected_output }}"
      }]
    )
    
  3. Report: evaluation name, workflow, start/end nodes, dataset name + id, metric.

Worked Example — helpfulness eval (no ground truth)

Use helpfulness when there is no single correct answer. The dataset needs only the input column; no ground-truth column is required.

eval-config(
  action="create",
  workflowId="<wf_id>",
  name="Assistant helpfulness",
  startNodeName="AI Agent",        // first node after the trigger — not the trigger itself
  endNodeName="AI Agent",
  dataTableId="<dt_id>",
  metrics=[{
    name: "Helpfulness",
    preset: "helpfulness",
    credentialId: "<cred_id>",   // provider is derived from this credential
    model: "claude-sonnet-4-5",
    userQuery: "={{ $json.input }}",
    actualAnswer: "={{ $json.output }}"
  }]
)

Changing or Removing

  • To change metrics, nodes, or the dataset, use update with the configId from list/get. update replaces the full config — resend every field you want to keep, not only the changed ones.
  • To read current state before editing, use get with the configId.
  • To remove an eval, use delete with the configId.

Boundary Reminder

This tool never touches the canvas. Do not add EvaluationTrigger or Evaluation nodes; config evals are attached through the evaluation-config API only. Build and seed datasets exclusively through the data-tables tool.

Referenced from SKILL.md