<!--
{
  "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/Evaluator/metrics(subject:input:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Evaluations"
    ],
    "preciseIdentifier" : "s:11Evaluations9EvaluatorV7metrics7subject5inputSayAA6MetricVGAA12ModelSubjectVy13ExpectedValueQzG_xtYaKF"
  },
  "title" : "metrics(subject:input:)"
}
-->

# metrics(subject:input:)

Evaluates the input and returns an array of metrics.

```
nonisolated(nonsending) func metrics(subject: ModelSubject<Input.ExpectedValue>, input: Input) async throws -> [Metric]
```

## Parameters

`subject`

The model subject that provides the value and transcript to evaluate.

`input`

The sample input that contains the prompt and expected value.

## Return Value

An array that contains the [`Metric`](/documentation/Evaluations/Metric) the evaluation closure produces.

---

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)