Vapi · Schema

ChatEvalAssistantMessageEvaluation

AIVoiceAgentsRealtimeCPaaS

Properties

Name Type Description
role string This is the role of the message author. For an assistant message evaluation, the role is always 'assistant' @default 'assistant'
judgePlan object This is the judge plan that instructs how to evaluate the assistant message. The assistant message can be evaluated against fixed content (exact match or RegEx) or with an LLM-as-judge by defining the
continuePlan object This is the plan for how the overall evaluation will proceed after the assistant message is evaluated. This lets you configure whether to stop the evaluation if this message fails, and whether to over
View JSON Schema on GitHub

JSON Schema

vapi-chatevalassistantmessageevaluation-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/ChatEvalAssistantMessageEvaluation",
  "title": "ChatEvalAssistantMessageEvaluation",
  "type": "object",
  "properties": {
    "role": {
      "type": "string",
      "enum": [
        "assistant"
      ],
      "description": "This is the role of the message author.\nFor an assistant message evaluation, the role is always 'assistant'\n@default 'assistant'",
      "default": "assistant"
    },
    "judgePlan": {
      "description": "This is the judge plan that instructs how to evaluate the assistant message.\nThe assistant message can be evaluated against fixed content (exact match or RegEx) or with an LLM-as-judge by defining the evaluation criteria in a prompt.",
      "oneOf": [
        {
          "$ref": "#/components/schemas/AssistantMessageJudgePlanExact",
          "title": "AssistantMessageJudgePlanExact"
        },
        {
          "$ref": "#/components/schemas/AssistantMessageJudgePlanRegex",
          "title": "AssistantMessageJudgePlanRegex"
        },
        {
          "$ref": "#/components/schemas/AssistantMessageJudgePlanAI",
          "title": "AssistantMessageJudgePlanAI"
        }
      ]
    },
    "continuePlan": {
      "description": "This is the plan for how the overall evaluation will proceed after the assistant message is evaluated.\nThis lets you configure whether to stop the evaluation if this message fails, and whether to override any content for future turns",
      "allOf": [
        {
          "$ref": "#/components/schemas/AssistantMessageEvaluationContinuePlan"
        }
      ]
    }
  },
  "required": [
    "role",
    "judgePlan"
  ]
}