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

# metrics(subject:input:)

Evaluates tool-call expectations against the actual transcript and returns scored metrics.

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

## Parameters

`subject`

The model subject that contains the transcript of actual tool calls.

`input`

The sample providing the expected tool call trajectory.

## Return Value

An array that contains the strict pass or fail metric and the partial score metric.

## Discussion

Runs ordered, unordered, and disallowed expectation checks in a single pass and returns
both a strict all-pass metric and a partial percentage-pass metric.

---

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)