{
  "type": "object",
  "properties": {
    "hits": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "chunkId": {
            "type": "string",
            "description": "ID of the matched chunk."
          },
          "documentId": {
            "type": "string",
            "description": "ID of the parent document."
          },
          "filename": {
            "type": "string",
            "description": "Source document filename."
          },
          "content": {
            "type": "string",
            "description": "The matched passage text."
          },
          "pageNumber": {
            "type": [
              "number",
              "null"
            ],
            "description": "Page number in the source document, when known."
          },
          "distance": {
            "type": "number",
            "description": "Vector distance \u2014 lower is more relevant."
          }
        },
        "additionalProperties": false
      },
      "description": "Top-K matching chunks, most relevant first. Empty when nothing matches."
    }
  },
  "required": [
    "hits"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}