{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-cloud-contact-center-ai/json-schema/google-cloud-contact-center-ai-google-cloud-contactcenterinsights-v1-qa-question-schema.json",
  "title": "GoogleCloudContactcenterinsightsV1QaQuestion",
  "description": "A single question to be scored by the Insights QA feature.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-cloud-contact-center-ai-contactcenterinsights-projects-api-openapi.yml#/components/schemas/GoogleCloudContactcenterinsightsV1QaQuestion",
  "type": "object",
  "properties": {
    "questionType": {
      "type": "string",
      "enum": [
        "QA_QUESTION_TYPE_UNSPECIFIED",
        "CUSTOMIZABLE",
        "PREDEFINED"
      ],
      "description": "The type of question."
    },
    "order": {
      "format": "int32",
      "type": "integer",
      "description": "Defines the order of the question within its parent scorecard revision."
    },
    "satisfiesPzs": {
      "readOnly": true,
      "description": "Output only. Whether this resource is zone separated.",
      "type": "boolean"
    },
    "tags": {
      "description": "Questions are tagged for categorization and scoring. Tags can either be: - Default Tags: These are predefined categories. They are identified by their string value (e.g., \"BUSINESS\", \"COMPLIANCE\", and \"CUSTOMER\"). - Custom Tags: These are user-defined categories. They are identified by their full resource name (e.g., projects/{project}/locations/{location}/qaQuestionTags/{qa_question_tag}). Both default and custom tags are used to group questions and to influence the scoring of each question.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "satisfiesPzi": {
      "readOnly": true,
      "type": "boolean",
      "description": "Output only. Whether this resource is zone isolated."
    },
    "abbreviation": {
      "type": "string",
      "description": "Short, descriptive string, used in the UI where it's not practical to display the full question body. E.g., \"Greeting\"."
    },
    "predefinedQuestionConfig": {
      "$ref": "#/$defs/GoogleCloudContactcenterinsightsV1QaQuestionPredefinedQuestionConfig",
      "description": "The configuration of the predefined question. This field will only be set if the Question Type is predefined."
    },
    "createTime": {
      "description": "Output only. The time at which this question was created.",
      "readOnly": true,
      "type": "string",
      "format": "google-datetime"
    },
    "updateTime": {
      "format": "google-datetime",
      "readOnly": true,
      "description": "Output only. The most recent time at which the question was updated.",
      "type": "string"
    },
    "name": {
      "description": "Identifier. The resource name of the question. Format: projects/{project}/locations/{location}/qaScorecards/{qa_scorecard}/revisions/{revision}/qaQuestions/{qa_question}",
      "type": "string"
    },
    "questionBody": {
      "description": "Question text. E.g., \"Did the agent greet the customer?\"",
      "type": "string"
    },
    "tuningMetadata": {
      "$ref": "#/$defs/GoogleCloudContactcenterinsightsV1QaQuestionTuningMetadata",
      "description": "Metadata about the tuning operation for the question.This field will only be populated if and only if the question is part of a scorecard revision that has been tuned."
    },
    "answerInstructions": {
      "description": "Instructions describing how to determine the answer.",
      "type": "string"
    },
    "answerChoices": {
      "items": {
        "$ref": "#/$defs/GoogleCloudContactcenterinsightsV1QaQuestionAnswerChoice"
      },
      "description": "A list of valid answers to the question, which the LLM must choose from.",
      "type": "array"
    },
    "metrics": {
      "$ref": "#/$defs/GoogleCloudContactcenterinsightsV1QaQuestionMetrics",
      "description": "Metrics of the underlying tuned LLM over a holdout/test set while fine tuning the underlying LLM for the given question. This field will only be populated if and only if the question is part of a scorecard revision that has been tuned."
    },
    "qaQuestionDataOptions": {
      "$ref": "#/$defs/GoogleCloudContactcenterinsightsV1QaQuestionQaQuestionDataOptions",
      "description": "Options for configuring the data used to generate the QA question."
    }
  },
  "$defs": {
    "GoogleCloudContactcenterinsightsV1ConversationDataOptions": {
      "properties": {
        "includeDialogflowInteractionData": {
          "description": "Whether to include the per turn Dialogflow interaction data in conversation transcript.",
          "type": "boolean"
        }
      },
      "type": "object",
      "description": "Options for configuring what metadata is included in the conversation data used in QAI and Discovery Engine."
    },
    "GoogleCloudContactcenterinsightsV1QaQuestionAnswerChoice": {
      "properties": {
        "boolValue": {
          "type": "boolean",
          "description": "Boolean value."
        },
        "strValue": {
          "type": "string",
          "description": "String value."
        },
        "score": {
          "format": "double",
          "type": "number",
          "description": "Numerical score of the answer, used for generating the overall score of a QaScorecardResult. If the answer uses na_value, this field is unused."
        },
        "naValue": {
          "type": "boolean",
          "description": "A value of \"Not Applicable (N/A)\". If provided, this field may only be set to `true`. If a question receives this answer, it will be excluded from any score calculations."
        },
        "key": {
          "type": "string",
          "description": "A short string used as an identifier."
        },
        "numValue": {
          "type": "number",
          "format": "double",
          "description": "Numerical value."
        }
      },
      "description": "Message representing a possible answer to the question.",
      "type": "object"
    },
    "GoogleCloudContactcenterinsightsV1QaQuestionMetrics": {
      "type": "object",
      "properties": {
        "accuracy": {
          "format": "double",
          "type": "number",
          "readOnly": true,
          "description": "Output only. Accuracy of the model. Measures the percentage of correct answers the model gave on the test set."
        }
      },
      "description": "A wrapper representing metrics calculated against a test-set on a LLM that was fine tuned for this question."
    },
    "GoogleCloudContactcenterinsightsV1QaQuestionPredefinedQuestionConfig": {
      "properties": {
        "type": {
          "enum": [
            "PREDEFINED_QUESTION_TYPE_UNSPECIFIED",
            "CONVERSATION_OUTCOME",
            "CONVERSATION_OUTCOME_ESCALATION_INITIATOR_ROLE",
            "CONVERSATION_OUTCOME_AI_AVERSION",
            "CONVERSATION_OUTCOME_ESCALATION_REASON"
          ],
          "type": "string",
          "description": "The type of the predefined question."
        }
      },
      "type": "object",
      "description": "Configuration for a predefined question. This field will only be set if the Question Type is predefined."
    },
    "GoogleCloudContactcenterinsightsV1QaQuestionQaQuestionDataOptions": {
      "description": "Options for configuring the data used to generate the QA question.",
      "properties": {
        "conversationDataOptions": {
          "$ref": "#/$defs/GoogleCloudContactcenterinsightsV1ConversationDataOptions",
          "description": "Options for configuring the conversation data used to generate the QA question."
        }
      },
      "type": "object"
    },
    "GoogleCloudContactcenterinsightsV1QaQuestionTuningMetadata": {
      "description": "Metadata about the tuning operation for the question. Will only be set if a scorecard containing this question has been tuned.",
      "properties": {
        "datasetValidationWarnings": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "DATASET_VALIDATION_WARNING_UNSPECIFIED",
              "TOO_MANY_INVALID_FEEDBACK_LABELS",
              "INSUFFICIENT_FEEDBACK_LABELS",
              "INSUFFICIENT_FEEDBACK_LABELS_PER_ANSWER",
              "ALL_FEEDBACK_LABELS_HAVE_THE_SAME_ANSWER"
            ]
          },
          "description": "A list of any applicable data validation warnings about the question's feedback labels."
        },
        "tuningError": {
          "description": "Error status of the tuning operation for the question. Will only be set if the tuning operation failed.",
          "type": "string"
        },
        "totalValidLabelCount": {
          "format": "int64",
          "type": "string",
          "description": "Total number of valid labels provided for the question at the time of tuining."
        }
      },
      "type": "object"
    }
  }
}