metrics(subject:input:)
Evaluates tool-call expectations against the actual transcript and returns scored metrics.
Declaration
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.