name: evaluateDocument
description: Evaluates the quality of generated document content, ensuring compliance with user-configured goals, audiences, and knowledge level requirements.
instructions:
  url: ../../prompts/evaluate/document.md
model:
  model: gpt-5
  temperature: 1
task_render_mode: collapse
task_title: Evaluate document for '{{ title }}'
input_schema:
  type: object
  properties:
    path:
      type: string
      description: Document path to be evaluated
    content:
      type: string
      description: Document content to be evaluated
    translationsString:
      type: string
      description: Document translation content
    description:
      type: string
      description: Document content planning description
    purposes:
      type: string
      description: User-selected document goals
    audiences:
      type: string
      description: User-selected target audiences
    readerKnowledgeLevel:
      type: string
      description: User-selected reader knowledge level
    allDocumentContentList:
      type: array
      description: All document content list for better evaluate
  required:
    - content
    - description
    - purposes
    - audiences
    - readerKnowledgeLevel
output_schema:
  type: object
  properties:
    documentEvaluation:
      type: object
      properties:
        details:
          type: array
          description: Detailed observations contributing to the final score
          items:
            type: object
            properties:
              dimension:
                type: string
                enum: [readability, coherence, contentQuality, consistency, purposeAlignment, audienceAlignment, knowledgeLevelAlignment]
                description: Dimension associated with this observation
              level:
                type: string
                enum: [excellent, good, meets, minor, critical]
                description: Evaluation level applied to the observation
              topic:
                type: string
                description: Short identifier for the assessed passage or section
              line:
                type: integer
                description: Source line number related to the observation (0 if unknown)
              description:
                type: string
                description: Impact-focused explanation of the observation
            required:
              - dimension
              - level
              - topic
              - line
              - description
      required:
        - details
  required:
    - documentEvaluation
includeInputInOutput: true
