fragment CheckOutputTypeFields on CheckOutputType {
  operator
  criteria
  modifiers {
    ...CheckModifierOutputTypeFields
  }
}

fragment CheckModifierOutputTypeFields on CheckModifierOutputType {
  optional
  severity
  displayMetrics
  examples {
    ...ExampleOutputTypeFields
  }
  extractor
  conditional {
    ...ConditionalCheckOutputTypeFields
  }
  category
}

fragment ExampleOutputTypeFields on ExampleOutputType {
  type
  text
}

fragment ConditionalCheckOutputTypeFields on ConditionalCheckOutputType {
  operator
  criteria
}

fragment MetadataOutputTypeFields on MetadataOutputType {
  inTokens
  outTokens
  durationSeconds
}

fragment ResultJsonElementTypeFields on ResultJsonElementType {
  operator
  criteria
  modifiers {
    ...CheckModifierOutputTypeFields
  }
  autoEval
  feedback
  evalCont
  isGlobal
  severity
  customOperator {
    rubric {
      label
      score
    }
  }
}

fragment TestResultFields on TestResultType {
  id
  llmOutput
  passPercentage
  passPercentageWithWeight
  resultJson {
    ...ResultJsonElementTypeFields
  }
  qaPair {
    context
    outputContext
    errorMessage
  }
  test {
    ...TestFragment
  }
  metadata {
    ...MetadataOutputTypeFields
  }
}
