{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Generated Schema",
  "type": "object",
  "properties": {
    "title": {
      "description": "The official title of a literary work, book, or publication. Contains the complete name by which the work is known and referenced, formatted as a string without additional markup or formatting.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "author": {
      "description": "The full name of the person who wrote or created the literary work. Represents the primary author's name as it appears in publication, formatted as a string containing the complete given and family name.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "Entities": {
      "type": "array",
      "description": "",
      "items": {
        "type": "object",
        "properties": {
          "Character": {
            "description": "Extract all characters in novels",
            "type": "object",
            "properties": {
              "character_name": {
                "description": "Extract the full name of the character, including their title if mentioned (e.g., Mr. Darcy, Lady Catherine de Bourgh).",
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "primary_residence": {
                "description": "Extract the name of the primary estate, house, or city where the character lives. Examples: Longbourn, Netherfield Park, Pemberley.",
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "personality_traits": {
                "description": "From the narrative description of the character, infer and list up to three key personality traits as adjectives. Examples: witty, proud, gentle, arrogant.",
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "character_name",
              "primary_residence",
              "personality_traits"
            ]
          },
          "Relationship": {
            "description": "Relationships between characters.",
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "relationship_type": {
                    "description": "Identify the primary type of relationship between the two characters. Choose from: romantic, sibling, parent-child, friend, adversary, suitor.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "evidence_quote": {
                    "description": "Extract the exact quote from the text that best demonstrates the current status of the relationship. The quote should be verbatim.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "relationship_type",
                  "evidence_quote"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "Event": {
            "description": "Social or narrative events occurring in the story.",
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "event_name": {
                    "description": "Provide a short, descriptive name for the social event or key interaction. Examples: 'The Meryton Ball', 'Darcy's First Proposal', 'Lydia's Elopement with Wickham'.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "event_type": {
                    "description": "Classify the event into one of the following categories: Ball, Dinner, Visit, Journey, Proposal, Confrontation.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "key_outcome": {
                    "description": "Summarize the main consequence or the most important thing that happened during this event in a single, concise sentence.",
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "event_name",
                  "event_type",
                  "key_outcome"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "Character",
          "Relationship",
          "Event"
        ]
      }
    },
    "publisher": {
      "description": "The name of the organization or entity responsible for publishing or distributing the work. Contains the publisher's complete name or brand as it appears in the publication, formatted as a string.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "title",
    "author",
    "Entities",
    "publisher"
  ]
}