{
  "name": "DeepEval DAG Example",
  "nodes": [
    {
      "parameters": {},
      "id": "manual-trigger",
      "name": "When clicking Execute Workflow",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [0, 0]
    },
    {
      "parameters": {
        "mode": "raw",
        "jsonOutput": "{\"input\":\"Use the calculator when appropriate, then answer: what is 2 + 2?\",\"actualOutput\":\"The answer is 4.\",\"output\":\"The answer is 4.\",\"expectedOutput\":\"The answer is 4.\",\"context\":[\"Two plus two equals four.\"],\"retrievalContext\":[\"[1] Basic arithmetic states that 2 + 2 = 4.\"],\"expectedTools\":[{\"name\":\"calculator\",\"inputParameters\":{\"input\":\"2+2\"}}],\"chatbotRole\":\"A concise and accurate arithmetic assistant\",\"expectedOutcome\":\"The assistant answers that 2 + 2 equals 4.\",\"metadata\":{\"suite\":\"deepeval-e2e\"}}",
        "options": {}
      },
      "id": "evaluation-data",
      "name": "Set Evaluation Data",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [220, 0]
    },
    {
      "parameters": {
        "name": "Decision Graph",
        "dag": "{\"nodes\":{\"judge\":{\"type\":\"BinaryJudgementNode\",\"criteria\":\"Is the actual output correct for the input?\",\"evaluation_params\":[\"input\",\"actual_output\"],\"children\":[\"incorrect\",\"correct\"]},\"incorrect\":{\"type\":\"VerdictNode\",\"verdict\":false,\"score\":0},\"correct\":{\"type\":\"VerdictNode\",\"verdict\":true,\"score\":10}}}",
        "threshold": 0.5,
        "includeReason": true,
        "strictMode": false,
        "asyncMode": true,
        "verboseMode": false,
        "cleanSession": false
      },
      "id": "deepeval-metric",
      "name": "DeepEval DAG",
      "type": "n8n-nodes-deepeval.deepEvalDAG",
      "typeVersion": 1,
      "position": [460, 0]
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "id",
          "value": "REPLACE_WITH_MODEL_ID"
        },
        "options": {
          "baseURL": "http://127.0.0.1:8080/v1",
          "timeout": 120000,
          "maxRetries": 0
        }
      },
      "id": "judge-model",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [460, 240],
      "credentials": {
        "openAiApi": {
          "id": "REPLACE_WITH_OPENAI_CREDENTIAL_ID",
          "name": "Local OpenAI-compatible endpoint"
        }
      }
    }
  ],
  "connections": {
    "When clicking Execute Workflow": {
      "main": [
        [
          {
            "node": "Set Evaluation Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Evaluation Data": {
      "main": [
        [
          {
            "node": "DeepEval DAG",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "DeepEval DAG",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "active": false,
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}
