{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/carbon-arc/json-schema/carbon-arc-match-result-schema.json",
  "title": "MatchResult",
  "description": "Result of the AI-powered data asset matching.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/carbon-arc-explore-use-cases-api-openapi.yml#/components/schemas/MatchResult",
  "properties": {
    "persona": {
      "$ref": "#/$defs/PersonaInput",
      "description": "The input persona"
    },
    "matches": {
      "items": {
        "$ref": "#/$defs/DatasetMatch"
      },
      "type": "array",
      "title": "Matches",
      "description": "Ranked list of matching data assets"
    },
    "total_datasets_evaluated": {
      "type": "integer",
      "title": "Total Datasets Evaluated",
      "description": "Total number of data assets considered"
    }
  },
  "type": "object",
  "required": [
    "persona",
    "matches",
    "total_datasets_evaluated"
  ],
  "$defs": {
    "DatasetMatch": {
      "properties": {
        "dataset_id": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Dataset Id",
          "description": "Dataset ID(s)"
        },
        "dataset_name": {
          "type": "string",
          "title": "Dataset Name",
          "description": "Name of the data asset"
        },
        "description": {
          "type": "string",
          "title": "Description",
          "description": "Data asset description"
        },
        "category": {
          "type": "string",
          "title": "Category",
          "description": "Data asset category (demand/supply/reference)"
        },
        "provider_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Provider Name",
          "description": "Data provider name"
        },
        "match_score": {
          "type": "integer",
          "maximum": 100.0,
          "minimum": 0.0,
          "title": "Match Score",
          "description": "Relevance score 0-100"
        },
        "use_cases": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Use Cases",
          "description": "Example use cases for this data asset",
          "default": []
        }
      },
      "type": "object",
      "required": [
        "dataset_id",
        "dataset_name",
        "description",
        "category",
        "match_score"
      ],
      "title": "DatasetMatch",
      "description": "A matched data asset with relevance score."
    },
    "PersonaInput": {
      "properties": {
        "industry": {
          "type": "string",
          "title": "Industry",
          "description": "User's industry (e.g., 'Financial Services')"
        },
        "company_type": {
          "type": "string",
          "title": "Company Type",
          "description": "Type of company (e.g., 'Hedge Fund', 'Retailer')"
        },
        "use_cases": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Use Cases",
          "description": "Selected use cases of interest",
          "default": []
        },
        "description": {
          "type": "string",
          "title": "Description",
          "description": "Free-text description of data needs"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "industry",
        "company_type",
        "description"
      ],
      "title": "PersonaInput",
      "description": "Input describing the user's persona and data needs."
    }
  }
}