{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/docsbot-ai/json-schema/docsbot-ai-query-schema.json",
  "title": "Query",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/docsbot-ai-openapi.json#/components/schemas/Query",
  "properties": {
    "query": {
      "type": "string",
      "title": "Query"
    },
    "sourceId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Source ID to filter results by"
    },
    "fileId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "File ID to filter results by"
    },
    "use_glossary": {
      "type": "boolean",
      "title": "Use glossary to modify query",
      "default": false
    },
    "top_k": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Top K",
      "default": 5
    },
    "autocut": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "integer"
        }
      ],
      "title": "Autocut results to num groups",
      "default": false
    },
    "alpha": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 1.0,
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Keyword vs semantic search balance",
      "description": "Hybrid search results can favor the keyword component or the semantic component. To change the relative weights of the keyword and vector components, set the alpha value in your query.\n\nAn alpha of 1 is a pure semantic vector search.\nAn alpha of 0 is a pure keyword search.",
      "default": 0.5
    },
    "tags": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tags to filter sources by"
    },
    "include_untagged": {
      "type": "boolean",
      "title": "Include untagged sources when filtering by tags",
      "default": true
    }
  },
  "type": "object",
  "required": [
    "query"
  ]
}