<!--
{
  "availability" : [
    "Xcode: 27.0.0 -",
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Evaluations",
  "identifier" : "/documentation/Evaluations/EvaluationSubject",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Evaluations"
    ],
    "preciseIdentifier" : "s:11Evaluations17EvaluationSubjectP"
  },
  "title" : "EvaluationSubject"
}
-->

# EvaluationSubject

A type that represents the output the system under test produces.

```
protocol EvaluationSubject<Value>
```

## Overview

Conform to this protocol to define custom subject types. The primary
concrete conformance is [`ModelSubject`](/documentation/Evaluations/ModelSubject), which carries a value and
an optional transcript for tool-call evaluation.

```swift
struct MySubject<Value: Codable>: EvaluationSubject {
    var value: Value
    var transcript: StructuredTranscript?
}
```

## Topics

### Associated Types

[`associatedtype Value : Decodable, Encodable`](/documentation/Evaluations/EvaluationSubject/Value-swift.associatedtype)

The type of value the system under test produces.

### Instance Properties

[`var transcript: StructuredTranscript?`](/documentation/Evaluations/EvaluationSubject/transcript)

The structured transcript captured while producing the value, if any.

[`var value: Self.Value`](/documentation/Evaluations/EvaluationSubject/value-swift.property)

The typed value the system under test produces.

## Relationships

### Conforming Types

[`ModelSubject`](/documentation/Evaluations/ModelSubject)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)