{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/orq/json-schema/orq-evaluator-response-ragas-schema.json",
  "title": "Ragas",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/orq-evals-api-openapi.yml#/components/schemas/EvaluatorResponseRagas",
  "type": "object",
  "properties": {
    "_id": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "created": {
      "type": "string",
      "default": "2026-08-05T15:12:51.947Z"
    },
    "updated": {
      "type": "string",
      "default": "2026-08-05T15:12:51.947Z"
    },
    "updated_by_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "project_id": {
      "type": "string",
      "description": "Unique identifier of the project owning this evaluator."
    },
    "guardrail_config": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean",
              "default": true
            },
            "alert_on_failure": {
              "type": "boolean",
              "default": false
            },
            "type": {
              "type": "string",
              "enum": [
                "boolean"
              ]
            },
            "value": {
              "type": "boolean"
            }
          },
          "required": [
            "type",
            "value"
          ],
          "title": "Boolean"
        },
        {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean",
              "default": true
            },
            "alert_on_failure": {
              "type": "boolean",
              "default": false
            },
            "type": {
              "type": "string",
              "enum": [
                "categorical"
              ]
            },
            "values": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              }
            }
          },
          "required": [
            "type",
            "values"
          ],
          "title": "Categorical"
        },
        {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean",
              "default": true
            },
            "alert_on_failure": {
              "type": "boolean",
              "default": false
            },
            "type": {
              "type": "string",
              "enum": [
                "number"
              ]
            },
            "value": {
              "type": "number"
            },
            "operator": {
              "type": "string",
              "enum": [
                "eq",
                "ne",
                "gt",
                "gte",
                "lt",
                "lte"
              ]
            }
          },
          "required": [
            "type",
            "value",
            "operator"
          ],
          "title": "Number"
        },
        {
          "type": "null"
        }
      ],
      "x-speakeasy-type-override": "any"
    },
    "type": {
      "type": "string",
      "enum": [
        "ragas"
      ]
    },
    "output_type": {
      "type": "string",
      "enum": [
        "boolean",
        "categorical",
        "number",
        "string"
      ],
      "description": "The type of output expected from the evaluator"
    },
    "ragas_metric": {
      "type": "string",
      "enum": [
        "context_precision",
        "context_recall",
        "context_entities_recall",
        "harmfulness",
        "maliciousness",
        "coherence",
        "correctness",
        "conciseness",
        "response_relevancy",
        "faithfulness",
        "summarization",
        "noise_sensitivity"
      ]
    },
    "key": {
      "type": "string",
      "minLength": 1,
      "pattern": "^[a-zA-Z0-9]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$"
    },
    "model": {
      "type": "string"
    }
  },
  "required": [
    "_id",
    "description",
    "type",
    "output_type",
    "ragas_metric",
    "key",
    "model"
  ]
}